installMcpTlsTrust
installMcpTlsTrust(
config):Promise<void>
Defined in: packages/agent/src/mcp/tlsTrust.ts:108
Install the process-global undici dispatcher from config.tls, if any. Idempotent (installs at
most once per process). Fail-soft: an unreadable cert is warned about and skipped, never fatal.
Emits a loud security warning when verification is disabled.
Wired into getMcpClient before the MCP client is created; because it is global it also covers
LLM/tool fetches — which is desired for the CA case and is the danger to flag for the latch.
undici is imported only when there is a dispatcher to install: importing it registers its own
global dispatcher as a side effect, which Node’s built-in fetch then uses for every request.
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”Promise<void>