[BUG] disabledMcpjsonServers disabled when listing incorrect mcp value
Resolved 💬 3 comments Opened May 14, 2026 by nicolas-vivot Closed Jun 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?
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
- Install some MCP servers in your claude code setup and have them enabled on projects
- Add the configuration ``
"disabledMcpjsonServers": ["your_mcp_key"]`` to your settings.json - 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.
- Edit the settings.json and to have this configuration: ``
"disabledMcpjsonServers": ["your_mcp_key", "unexisting"]`` - 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_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗