Skip to content

fix(mcp): preserve default CAs with NODE_EXTRA_CA_CERTS#2432

Merged
fahreddinozcan merged 10 commits intomasterfrom
fix/node-extra-ca-certs-support
Apr 10, 2026
Merged

fix(mcp): preserve default CAs with NODE_EXTRA_CA_CERTS#2432
fahreddinozcan merged 10 commits intomasterfrom
fix/node-extra-ca-certs-support

Conversation

@fahreddinozcan
Copy link
Copy Markdown
Contributor

@fahreddinozcan fahreddinozcan commented Apr 10, 2026

Summary

  • preserve Node's default trusted CAs when NODE_EXTRA_CA_CERTS is configured
  • keep custom CA support for both direct and proxy MCP requests
  • add regression coverage for custom CA loading
  • keep only the follow-up fix changeset in this PR

Validation

  • pnpm --dir packages/mcp lint:check
  • pnpm --dir packages/mcp test
  • live repro verified: old custom-CA-only behavior failed with UNABLE_TO_GET_ISSUER_CERT_LOCALLY, patched behavior succeeded

mvanhorn and others added 8 commits March 17, 2026 23:29
When NODE_EXTRA_CA_CERTS is set, reads the CA certificate file and
injects it into undici's global dispatcher. This fixes fetch failures
behind enterprise transparent SSL intercept proxies (Zscaler, etc.)
where the default TLS context does not trust the corporate CA.

The CA certs are also passed through when an explicit HTTPS_PROXY is
configured, so both proxy modes work with custom certificates.

Fixes #2268

This contribution was developed with AI assistance (Claude Code).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…/node-extra-ca-certs-support

# Conflicts:
#	packages/mcp/src/lib/api.ts
@fahreddinozcan fahreddinozcan changed the title Fix/node extra ca certs support fix(mcp): preserve default CAs with NODE_EXTRA_CA_CERTS Apr 10, 2026
@fahreddinozcan fahreddinozcan merged commit 00833f9 into master Apr 10, 2026
3 checks passed
@fahreddinozcan fahreddinozcan deleted the fix/node-extra-ca-certs-support branch April 10, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants