--strict-mcp-config does not override disabledMcpServers
Description
The --strict-mcp-config flag does not override the disabledMcpServers list stored in ~/.claude.json. This makes the flag unusable for its intended purpose of loading a custom MCP configuration that ignores all other settings.
Expected Behavior
According to the docs, --strict-mcp-config should "only use MCP servers from --mcp-config, ignoring all other MCP configurations." The disabledMcpServers setting should be part of "all other MCP configurations" and therefore ignored.
Actual Behavior
MCP servers listed in disabledMcpServers for a project remain disabled even when:
- Using
--mcp-configto load a config containing that server - Using
--strict-mcp-configto ignore all other configurations - Passing the MCP config as an inline JSON string
Reproduction Steps
- Have a project with an MCP server (e.g., "axiom") in
disabledMcpServersin~/.claude.json - Run: e.g.
claude --strict-mcp-config --mcp-config '{"mcpServers":{"axiom":{"type":"stdio","command":"npx","args":["-y","mcp-remote","https://mcp.axiom.co/mcp"]}}}' - Observe that axiom is still disabled
Environment
- Claude Code version: 2.0.72
- OS: macOS Darwin 24.3.0
Workaround
Manually edit ~/.claude.json to remove the server from disabledMcpServers, which defeats the purpose of having CLI flags for temporary/debug configurations.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗