claude-code - 💡(How to fix) Fix [BUG] disabledMcpjsonServers disabled when listing incorrect mcp value [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58874Fetched 2026-05-14 03:37:19
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×4commented ×2renamed ×1

Error Message

Error Messages/Logs

Code Example

"disabledMcpjsonServers": ["portal", "github", "asana", "unexisting"]

---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When configuring disabledMcpjsonServers to the ~/.claude/settings.json with a list of MCP server, but one of the value does not match a real mcp server, then the entire configuration get ignored. As a result, all mcp servers are enabled.

Invalid configuration example:

"disabledMcpjsonServers": ["portal", "github", "asana", "unexisting"]

This issue is also silent, no logs, no warning, /doctor does not show anything.

What Should Happen?

The incorrect MCP server "unexisting" should be ignored, allowing to disable the valid ones.

Error Messages/Logs

Steps to Reproduce

  1. Install some MCP servers in your claude code setup and have them enabled on projects
  2. Add the configuration "disabledMcpjsonServers": ["your_mcp_key"] to your settings.json
  3. Launch a new session, you should see your context window being smaller at startup than when having all mcp enabled. /mcp should also show the mcp disabled for those matching the configuration.
  4. Edit the settings.json and to have this configuration: "disabledMcpjsonServers": ["your_mcp_key", "unexisting"]
  5. Launch a new session, the context window is maxed and all mcp servers are enabled

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.141

Platform

Google Vertex AI

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] disabledMcpjsonServers disabled when listing incorrect mcp value [2 comments, 2 participants]