Skip to main content
Model Context Protocol (MCP) servers can use cordon to make authenticated API calls without holding credentials directly.

Node.js MCP servers

Node.js MCP servers can use cordon transparently by adding the bootstrap loader. In your MCP server config:
{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "@some/mcp-server"],
      "env": {
        "NODE_OPTIONS": "--import @c6o/cordon/register"
      }
    }
  }
}
The @c6o/cordon/register import sets up undici’s EnvHttpProxyAgent as the global dispatcher, so Node’s fetch respects the HTTPS_PROXY and HTTP_PROXY environment variables.
The @c6o/cordon npm package must be installed in the project or globally for the register import to resolve.

Python MCP servers

Python MCP servers using requests or httpx respect HTTPS_PROXY and HTTP_PROXY environment variables automatically. No additional configuration is needed — just ensure the env vars are set:
{
  "mcpServers": {
    "my-python-server": {
      "command": "python",
      "args": ["-m", "my_mcp_server"],
      "env": {
        "HTTPS_PROXY": "http://127.0.0.1:6790",
        "HTTP_PROXY": "http://127.0.0.1:6790"
      }
    }
  }
}

Other languages

Most HTTP clients in Go, Rust, Ruby, and other languages respect the standard HTTPS_PROXY environment variable. Set it in the MCP server’s environment and ensure the CA certificate is trusted (via cordon trust).