Description
MCP servers added with --scope user do not actually apply user-wide. There are two related issues:
Issue 1: Legacy ~/.claude.json no longer loads MCP servers
The old ~/.claude.json file (which had a top-level mcpServers key) was deprecated in v2.0.8, but:
- The documentation still references it in some places
- Users with existing configs there find their MCP servers suddenly stop working
- There was no clear migration path or notice
Issue 2: New location is project-specific, not user-wide
The --scope user flag now writes to ~/.claude/.claude.json under projects["<path>"].mcpServers, which means:
- Servers are tied to a specific project path (e.g.,
/Users/<user>/project1, /Users/<user>/project2)
- Child project paths with their own
mcpServers key (even empty {}) override the parent
- There is no inheritance from parent project configs (eg. if you start claude in
/Users/<user>/project1 but the mcp servers are defined for /Users/<user> the project1 does not inherit the parent config (evenif the mcpServers key is removed)
Steps to Reproduce
Reproducing Issue 1 (legacy file ignored):
- Have MCP servers configured in
~/.claude.json under a top-level mcpServers key
- Start Claude Code
- Run
/mcp → "No MCP servers configured"
Reproducing Issue 2 (no inheritance):
- Add an MCP server with user scope:
claude mcp add test-server --transport http https://example.com/mcp --scope user
- Note it's stored in
~/.claude/.claude.json under projects["/Users/<user>"].mcpServers
- Navigate to a subdirectory project (e.g.,
~/dev/myproject)
- Start Claude Code and run
/mcp
- Expected: Server appears (inherited from parent)
Actual: "No MCP servers configured" (child project has "mcpServers": {})
Root Cause
In ~/.claude/.claude.json, MCP servers are stored per-project:
{
"projects": {
"/Users/user": {
"mcpServers": {
"my-server": { "type": "http", "url": "..." }
}
},
"/Users/user/dev": {
"mcpServers": {
"chrome-devtools": {...}
} // MCP server overrides, but does not inherit from parent
},
"/Users/user/dev/project": {
"mcpServers": {} // Empty - also overrides, no inheritance, same if key is removed entirely
}
}
}
When Claude Code starts, it matches the most specific project path and uses that config with no inheritance. So each set of MCP Servers must be added to each project.
Expected Behavior
--scope user should mean "available in ALL projects" via one of:
- True user-wide scope - a top-level
mcpServers key that applies regardless of project configs
- Inheritance - child projects inherit from parent project configs
- No empty overrides - don't create empty
mcpServers: {} entries that override parents
Current Workarounds
- Manually add MCP servers to every project entry in
~/.claude/.claude.json
- Always start Claude from a single parent directory
- Remove
mcpServers keys from child project entries (may get recreated)
Environment
- Claude Code Version: 2.1.1
- Platform: macOS
- Installation: npm (global)
Related Issues
Impact
- Breaking change without migration: Users with MCP servers in the old
~/.claude.json suddenly have no servers
- Misleading flag:
--scope user doesn't mean "user-wide"
- Brittle config: Any new project dir can silently zero out your MCP servers
- Poor DX: Users must manually manage config across every project
Description
MCP servers added with
--scope userdo not actually apply user-wide. There are two related issues:Issue 1: Legacy
~/.claude.jsonno longer loads MCP serversThe old
~/.claude.jsonfile (which had a top-levelmcpServerskey) was deprecated in v2.0.8, but:Issue 2: New location is project-specific, not user-wide
The
--scope userflag now writes to~/.claude/.claude.jsonunderprojects["<path>"].mcpServers, which means:/Users/<user>/project1,/Users/<user>/project2)mcpServerskey (even empty{}) override the parent/Users/<user>/project1but the mcp servers are defined for/Users/<user>the project1 does not inherit the parent config (evenif the mcpServers key is removed)Steps to Reproduce
Reproducing Issue 1 (legacy file ignored):
~/.claude.jsonunder a top-levelmcpServerskey/mcp→ "No MCP servers configured"Reproducing Issue 2 (no inheritance):
~/.claude/.claude.jsonunderprojects["/Users/<user>"].mcpServers~/dev/myproject)/mcpActual: "No MCP servers configured" (child project has
"mcpServers": {})Root Cause
In
~/.claude/.claude.json, MCP servers are stored per-project:{ "projects": { "/Users/user": { "mcpServers": { "my-server": { "type": "http", "url": "..." } } }, "/Users/user/dev": { "mcpServers": { "chrome-devtools": {...} } // MCP server overrides, but does not inherit from parent }, "/Users/user/dev/project": { "mcpServers": {} // Empty - also overrides, no inheritance, same if key is removed entirely } } }When Claude Code starts, it matches the most specific project path and uses that config with no inheritance. So each set of MCP Servers must be added to each project.
Expected Behavior
--scope usershould mean "available in ALL projects" via one of:mcpServerskey that applies regardless of project configsmcpServers: {}entries that override parentsCurrent Workarounds
~/.claude/.claude.jsonmcpServerskeys from child project entries (may get recreated)Environment
Related Issues
claude mcp addscope storage locations #6888 - Docs: Discrepancy in scope storage locationsImpact
~/.claude.jsonsuddenly have no servers--scope userdoesn't mean "user-wide"