[BUG] Unable to disable MCP servers at system level for Claude-code (via /etc/claude-code/managed-settings.json or /Library/Application Support/ClaudeCode/managed-settings.json)
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ X] Other: Claude-code
- Claude CLI version: <!-- output of
claude --version--> - Operating System: macOS 15.5
- Terminal: <!-- e.g. iTerm2, Terminal App -->
Bug Description
I am testing to see if the precedence works for disabling all MCP servers. As per documentation, the system level settings should take precedence over everything else. I have a local MCP server defined in ~/.claude.json. Despite disabling MCP servers at system level as:
{
"mcpServers": {},
"allowUserMcpServers": false
}
the local MCP server always works from Claude-code. Any idea? I am trying to see if we can get this control to work org wide to disable to start with. But it is not working as Claude-code suggests.
Steps to Reproduce
- Create a managed-settings.json under /etc/claude-code or /Library/Application Support/ClaudeCode with contents: {
"mcpServers": {},
"allowUserMcpServers": false
}
- Add an MCP server to Claude code using a python file as argument with local scope and a name
- Call the MCP function
- See that the MCP server is getting called.
Expected Behavior
As per the documentation the MCP server invocation should be denied. When the MCP server is added under the deny permission with the exact name (map__<name>), it works properly. But at admin level, there should be a way to deny permission to invoke all servers.
Actual Behavior
MCP server invocation is not denied
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗