[BUG] MCP servers are overridden per project due to ~/.claude.json empty mcpServers objects per project

Resolved 💬 3 comments Opened Apr 3, 2026 by jtarallo Closed May 13, 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?

This is the issue as reported by claude code:

"This is a Claude Code bug. When you open a new project directory for the first time, Claude Code writes a project entry to ~/.claude.json with "mcpServers": {}. That empty
object overrides the global ~/.claude/mcp_servers.json config, so all your MCP servers disappear for that project.

The core issue is that an empty
"mcpServers": {} should not override global config — it should be treated as "no per-project overrides, fall through to global."

What Should Happen?

Per-project "mcpServers": {} entries in ~/.claude.json should not override global config — it should be treated as "no per-project overrides, fall through to global."

Error Messages/Logs

Steps to Reproduce

  1. Configure MCP servers globally in ~/.claude/mcp_servers.json:

{
"mcpServers": {
"ElevenLabs": { "command": "uvx", "args": ["--python", "3.13", "elevenlabs-mcp"], "env": { "ELEVENLABS_API_KEY": "..." } }
}
}

  1. Open Claude Code in any new project directory:

cd ~/some-new-project && claude

  1. Observe that ~/.claude.json now has a new project entry with empty MCP overrides:

{
"projects": {
"/Users/me/some-new-project": {
"mcpServers": {},
"enabledMcpjsonServers": [],
"disabledMcpjsonServers": []
}
}
}

  1. Run /mcp — no MCP servers are available, even though they're configured globally.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.91

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗