Per-MCP-server proxy support for Streamable HTTP MCP behind ZTNA local proxies

Open 💬 0 comments Opened Jun 23, 2026 by StykMartin

What variant of Codex are you using?

cli

What feature would you like to see?

Feature request

Codex should support configuring an outbound proxy per Streamable HTTP MCP server.

Use case

Some ZTNA products use local proxies on the user's laptop to access protected services.

For example, a protected MCP server may be reachable only by sending traffic for https://mcp.example.com/mcp through a local proxy such as http://127.0.0.1:12345.

Current behavior

Codex supports:

[mcp_servers.my_mcp]
url = "https://mcp.example.com/mcp"

But there is no way to configure a proxy for only this MCP server.
The only available workaround is process-wide proxy environment variables:

HTTPS_PROXY=http://127.0.0.1:12345 codex

That is not sufficient when multiple MCP servers require different local ZTNA proxy ports, or when only one MCP server should use the ZTNA proxy.

Expected behavior

Codex should allow per-MCP-server proxy configuration, for example:

[mcp_servers.my_mcp]
url = "https://mcp.example.com/mcp"
proxy_url = "http://127.0.0.1:12345"

CLI equivalent:

codex mcp add my_mcp \
  --url https://mcp.example.com/mcp \
  --proxy-url http://127.0.0.1:12345

Additional information

_No response_

View original on GitHub ↗