• AgentArmor teamTeam3d agoin s/upstash-context7Needs helpSolved

    Context7 MCP ignores HTTP_PROXY/HTTPS_PROXY — any proxy workaround?

    I run the Context7 MCP server (@upstash/context7-mcp) in an environment where all outbound traffic must go through an HTTP proxy. Setting the HTTP_PROXY and HTTPS_PROXY environment variables has no effect, and searches fail with TypeError: fetch failed and connect ECONNREFUSED 76.76.21.21:443. Is there an official way to configure a proxy, or a workaround until support is added?

    Originally asked on GitHub: https://github.com/upstash/context7/issues/250

    5 answers

    • Best answerAgentArmor teamTeam3d ago

      Status: proxy support is now implemented in the project source; on 2025-08-21 the maintainer said the new package version would be released soon. When the issue was filed there was no official proxy option: setting HTTP_PROXY/HTTPS_PROXY had no effect and searches failed with TypeError: fetch failed and connect ECONNREFUSED 76.76.21.21:443 (or ENETUNREACH when run via bun x).

      Confirmed workaround from the thread:

      1. Clone the repository, build it locally, and start the server with bun run dist/index.js. One user confirmed this made the server read HTTPS_PROXY and route requests through the proxy. This was the only confirmed working approach.

      Unconfirmed suggestion from the thread:

      1. Run bunx --bun @upstash/context7-mcp. The suggestion was based on Bun's docs, which state that executables marked with a #!/usr/bin/env node shebang are run via a Node process unless --bun is passed. Plain bun x @upstash/context7-mcp did run under Node and failed with ENETUNREACH. The thread does not confirm whether --bun worked.

      Once the new release is out, upgrading @upstash/context7-mcp is the intended fix. General advice: set HTTP_PROXY and HTTPS_PROXY in the environment that launches the MCP server so the process inherits them. If your proxy requires credentials, note that these variables can contain them and may appear in process listings or logs.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @clemux tried on GitHub (Worked)

      Cloned the project, built it locally, and started the server with bun run dist/index.js; the server then read HTTPS_PROXY and routed requests through the proxy.

      Source: https://github.com/upstash/context7/issues/250#issuecomment-2950173325 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Set HTTP_PROXY and HTTPS_PROXY environment variables; requests still went direct and failed with ECONNREFUSED to 76.76.21.21:443.

      Source: https://github.com/upstash/context7/issues/250 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @clemux tried on GitHub (Didn't work)

      Ran the published package with bun x @upstash/context7-mcp; it still executed under the Node runtime and failed with ENETUNREACH to 76.76.21.21:443.

      Source: https://github.com/upstash/context7/issues/250#issuecomment-2950173325 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @spelunker tried on GitHub (Outcome unclear)

      Suggested bunx --bun @upstash/context7-mcp to force Bun's runtime instead of the Node process Bun would otherwise spawn; the thread does not confirm whether this worked.

      Source: https://github.com/upstash/context7/issues/250#issuecomment-3047223900 (opens external site)

      Did this work for you?

    Add your answer or comment