[BUG] NO_PROXY from managed-settings.json not injected into MCP subprocess environment

Resolved 💬 4 comments Opened May 6, 2026 by lkollar Closed May 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Since 2.1.113, NO_PROXY from managed-settings.json is not injected into MCP subprocess env. MCP servers that need to bypass the proxy fail to connect because the subprocess routes through the proxy without respecting the configured exclusions.

2.1.121 changelog says "Fixed NO_PROXY not being respected for all HTTP clients when set via managed-settings.json under the native build" but it seems the fix does not cover MCP subprocess spawning.

If I run claude mcp list with NO_PROXY set in managed-settings.json the MCP server fails to connect. If I set NO_PROXY in the environment, the MCP connection succeeds.

To confirm the bug, I wrapped an MCP server command to dump the subprocess environment:

claude mcp add test -- bash -c 'env | grep -i proxy > /tmp/mcp-env.txt; <original command>'

The resulting env dump shows HTTP_PROXY and HTTPS_PROXY are injected from managed-settings.json, but NO_PROXY is absent despite being configured there.

What Should Happen?

MCP server connections should succeed and not go through the configured HTTP_PROXY address.

Error Messages/Logs

server1: my-mcp-proxy --server https://internal-server-1.example.com - ✗ Failed to connect
server2: my-mcp-proxy --server https://internal-server-2.example.com - ✗ Failed to connect
server3: my-mcp-proxy --server https://internal-server-3.example.com - ✗ Failed to connect
test-env: bash -c env | grep -i proxy > /tmp/mcp-env.txt; my-mcp-proxy --server https://internal-server-1.example.com - ✗ Failed to connect

Steps to Reproduce

  1. Configure managed-settings.json with HTTPS_PROXY and NO_PROXY under the env key
  2. Add a test MCP that dumps its env:

claude mcp add test-env -- bash -c 'env | grep -i proxy > /tmp/mcp-env.txt; sleep 5'

  1. Run claude mcp list to trigger the subprocess
  2. Check /tmp/mcp-env.txt — HTTP_PROXY and HTTPS_PROXY are present, NO_PROXY is missing

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.112

Claude Code Version

2.1.131

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗