`disabledMcpServers` in `~/.claude.json` project entry has no effect on user-scope MCP servers (still connect, tools + instructions loaded)

Status Closed — not planned
Reported on v2.1.211
Maintainer reply None cached
Activity 3 comments · opened Jul 17, 2026 · closed Aug 24, 2026

Description

disabledMcpServers set in the per-project entry of ~/.claude.json (the same key the /mcp UI writes, cf #44026) has no effect on user-scoped MCP servers: they still connect, their tools are exposed to the session, and their server instructions are loaded into the system prompt.

Environment

  • Claude Code 2.1.211, Linux (headless VPS)
  • Two HTTP MCP servers declared at user scope (~/.claude.json top-level mcpServers)

Steps to Reproduce

  1. Declare an HTTP MCP server at user scope: claude mcp add -s user my-server https://example.com/mcp
  2. In ~/.claude.json, add it to a project's disabled list:

``json
"projects": {
"/path/to/project": {
"disabledMcpServers": ["my-server"]
}
}
``

  1. From /path/to/project, run claude mcp list, and/or start a session there.

Expected Behavior

The server is not connected in that project: no health-check connection, no tools in the (deferred) tools list, no server instructions in the system prompt.

Actual Behavior

  • claude mcp list from the project shows the server as ✔ Connected (health check actually connects).
  • A session started in the project loads the server's instructions into the system prompt and lists its tools as available (deferred) tools.

Observed with two different HTTP servers, on two different projects, config verified intact before each test (jq '.projects["/path/to/project"].disabledMcpServers' returns the servers).

Notes

  • #41809 (closed as stale, locked) reported a weaker symptom of what looks like the same root cause — disabled servers' tools still listed in the deferred tools list. Here the servers are not just listed: they connect and their instructions are loaded.
  • Distinct from #44026 (array being cleared by /mcp): in this case the array is present and intact, it just has no effect for user-scope servers.
  • Workaround used: remove the servers from user scope entirely and re-add them with local scope (claude mcp add -s local) in the projects that need them.

View original on GitHub ↗

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