diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2b75c50..075d874e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: '20.x' + node-version: '22.x' cache: 'npm' - name: Install dependencies (root + all clients) diff --git a/clients/cli/README.md b/clients/cli/README.md index c1f81d73..2ea909ad 100644 --- a/clients/cli/README.md +++ b/clients/cli/README.md @@ -84,7 +84,7 @@ When a server is loaded from a `--catalog`/`--config` file, its per-server setti Connections to remote HTTP/SSE servers honor the conventional proxy environment variables: `HTTPS_PROXY` / `HTTP_PROXY` (and their lowercase forms) select the proxy, and `NO_PROXY` exempts hosts. This applies to the Node transport shared by the CLI and the web backend — no inspector-specific flag is needed. When a proxy variable is set, outbound requests are routed through undici's `EnvHttpProxyAgent`. -Proxy routing is powered by the [`undici`](https://www.npmjs.com/package/undici) package (`^8.5.0`, which requires Node `>= 22.7.5` — the inspector's supported floor). It is imported lazily only when a proxy variable is set, so runs without a proxy configured pay no cost. +Proxy routing is powered by the [`undici`](https://www.npmjs.com/package/undici) package (`^8.5.0`, which requires Node `>= 22.19.0` — the inspector's supported floor). It is imported lazily only when a proxy variable is set, so runs without a proxy configured pay no cost. ## Options diff --git a/clients/web/README.md b/clients/web/README.md index 7dbf7ebf..fcb72b06 100644 --- a/clients/web/README.md +++ b/clients/web/README.md @@ -71,3 +71,7 @@ export default defineConfig([ }, ]) ``` + +## HTTP proxy support + +The web backend connects to remote MCP servers through the shared Node transport (`core/mcp/node/transport.ts`), which honors the conventional proxy environment variables: `HTTPS_PROXY` / `HTTP_PROXY` (and their lowercase forms) select the proxy, and `NO_PROXY` exempts hosts. Routing is powered by [`undici`](https://www.npmjs.com/package/undici)'s `EnvHttpProxyAgent`, imported lazily only when a proxy variable is set, so runs without a proxy configured pay no cost. See the CLI README for more detail. diff --git a/core/mcp/node/transport.ts b/core/mcp/node/transport.ts index 01ab036d..2942fb67 100644 --- a/core/mcp/node/transport.ts +++ b/core/mcp/node/transport.ts @@ -140,6 +140,8 @@ export function createTransportNode( const sseConfig = config as SseServerConfig; const url = new URL(sseConfig.url); + // A caller-supplied eventSourceInit.fetch wins as-is (explicit fetch is not + // re-wrapped for proxying); the default path uses the proxy-aware baseFetch. const sseFetch = (sseConfig.eventSourceInit?.fetch as typeof fetch) || baseFetch; const trackedFetch = onFetchRequest diff --git a/package.json b/package.json index 28fe4151..1b2c2659 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,6 @@ "ink-select-input": "^6.2.0" }, "engines": { - "node": ">=22.7.5" + "node": ">=22.19.0" } } diff --git a/specification/v2_cli_tui_launcher.md b/specification/v2_cli_tui_launcher.md index fd03aee5..96c0ea3d 100644 --- a/specification/v2_cli_tui_launcher.md +++ b/specification/v2_cli_tui_launcher.md @@ -65,7 +65,7 @@ Root scripts `inspector`, `web`, and `web:dev` are thin wrappers around the laun **Production web caveat:** launcher `prebuild` chains `build:runner` for web, not a full `vite build`. Running `mcp-inspector --web` (without `--dev`) requires `clients/web/dist/` from a prior `cd clients/web && npm run build`. CI builds CLI, TUI, and launcher before the launcher smoke step but does not currently validate prod web startup end-to-end. -**Build targets:** client `tsup` bundles target `node22`, aligned with root `engines.node` (`>=22.7.5`). +**Build targets:** client `tsup` bundles target `node22`, aligned with root `engines.node` (`>=22.19.0`). ---