Skip to content

core: honor HTTPS_PROXY/HTTP_PROXY/NO_PROXY in the Node transport #1563

Description

@cliffhall

Summary

Make the Node transport factory honor the standard HTTPS_PROXY / HTTP_PROXY / NO_PROXY environment variables (CLI and web backend) by wrapping fetch with undici's EnvHttpProxyAgent.

Why

Users behind corporate proxies currently can't reach remote MCP servers from the CLI or the web backend without inspector-specific configuration. Honoring the conventional env vars fixes that with zero new flags.

Reference implementation (PR #1510)

Re-implement informed by these changes at 33fac3f:

Depends on

Nothing — Wave 1 foundation, parallel-safe.

Notes

  • undici is lazily imported only when a proxy env var is set, so non-proxy users pay nothing.
  • Check undici@^8.x's Node engine floor against our supported Node range and document it in the README (dependency + proxy behavior) per AGENTS.md's docs rule.
  • Integration tests live under clients/web/src/test/integration/mcp/node/ (auto-picked-up by the integration vitest project).

Part of the PR #1510 decomposition (see tracking issue).

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions