MCP: `disabled: true` does not prevent HTTP connection attempts at startup

Status Fixed / completed
Maintainer reply ✓ Yes — dicksontsai
Activity 4 comments · opened Feb 25, 2026 · closed Mar 8, 2026
💡 Likely answer: A maintainer (dicksontsai, collaborator) responded on this thread — see the highlighted reply below.

Summary

HTTP-type MCP servers configured with disabled: true in .mcp.json still make network connection attempts at Claude Code startup. This contradicts the expected behavior where a disabled server should not load until explicitly enabled via /mcp.

Expected behavior

A server marked disabled: true should not attempt any network activity until toggled on.

Actual behavior

On startup, Claude Code appears to ping HTTP MCP endpoints (likely to cache tool schemas for the /mcp toggle UI) even when disabled: true is set. This causes:

  • Unwanted outbound connections to external services
  • Authentication prompts or errors for servers requiring OAuth/tokens
  • Potential credential exposure for servers using secret headers

Stdio-based servers (command-based) correctly do not spawn a process when disabled — the issue is isolated to type: "http" servers.

Reproduction

// .mcp.json
{
  "mcpServers": {
    "example-http-server": {
      "disabled": true,
      "type": "http",
      "url": "https://some-mcp-server.example.com/mcp"
    }
  }
}

Start Claude Code. Observe network traffic or server-side logs — a connection attempt is made to https://some-mcp-server.example.com/mcp despite disabled: true.

Impact

Users managing multiple MCP integrations (some always-on, some on-demand) rely on disabled: true as the mechanism to keep servers in their config but truly inactive. The current behavior forces a choice between:

  1. Accepting unwanted connections (and potential auth noise), or
  2. Removing the server from config entirely (losing the ability to toggle via /mcp)

Environment

  • Platform: macOS (darwin 25.3.0)
  • Shell: zsh

Suggested fix

Respect disabled: true as a hard gate: no schema discovery, no health check, no network activity of any kind until the user explicitly enables the server.

View original on GitHub ↗

4 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/17756
  2. https://github.com/anthropics/claude-code/issues/13311
  3. https://github.com/anthropics/claude-code/issues/8888

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

mantrahq502 · 7 months ago

The forced connection on startup for 'disabled' HTTP servers is a real config hygiene problem — especially for teams managing a fleet of MCP integrations where disabled doesn't mean 'remove'. I hit this managing multiple MCP environments across projects. Switched to using Mantra (mantra.gonewx.com) as a central MCP gateway so I can toggle servers in one place rather than managing per-client configs with unreliable disable semantics. Doesn't fix the upstream bug but sidesteps the need to trust disabled:true in the meantime.

dicksontsai collaborator · 7 months ago

This was fixed in v2.1.50. Disabled MCP servers no longer connect at startup. Which version did you see this issue in? Are you still seeing this issue?

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.