Skip to content

[BUG] Unable to connect to MCP Server when using HTTP PROXY. #3971

Description

@Steve0x2a

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • Claude CLI version: 1.0.56
  • Operating System: MacOS 15.5
  • Terminal: iTerm2

Bug Description

When I use the HTTP_PROXY or HTTPS_PROXY environment variables, I am unable to connect to the local STDIO MCP.

Steps to Reproduce

  1. set HTTP_PROXY or HTTPS_PROXY in ~/.claude/settings.json
  2. run claude
  3. run /mcp command

Expected Behavior

Successfully connected to MCP

Actual Behavior

Unable to connect to MCP until timeout.

Additional Context

[DEBUG] MCP server "thinking": Connection failed: Error: Connection to MCP server "thinking" timed out after 30000ms
[DEBUG] MCP server "thinking": Error message: Connection to MCP server "thinking" timed out after 30000ms
[DEBUG] MCP server "thinking": Error stack: Error: Connection to MCP server "thinking" timed out after 30000ms
at Timeout._onTimeout (file:///Users/xxx/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1317:2421)
at listOnTimeout (node:internal/timers:608:17)
at process.processTimers (node:internal/timers:543:7)

[DEBUG] MCP server "thinking": Connection attempt completed in 30025ms - status: failed
[DEBUG] MCP server "thinking": Connection attempt completed in 29504ms - status: failed
[DEBUG] MCP server "thinking": Connection attempt completed in 29245ms - status: failed

My MCP Config:

{
    "thinking": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ],
      "env": {}
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpautocloseIssue will be closed automaticallybugSomething isn't workingplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions