MCP servers in .claude/.mcp.json not loading properly
MCP Configuration Issue: .claude/.mcp.json Not Loading All Servers
Summary
MCP servers configured in .claude/.mcp.json are not being loaded properly by Claude Code, while the same configuration works correctly when placed in the root directory as .mcp.json.
Environment
- Claude Code Version: 1.0.67
- Platform: Linux (WSL2)
- OS: Linux 6.6.87.2-microsoft-standard-WSL2
- Working Directory: /mnt/e/CodeProjects/TWC_Meta
Expected Behavior
All MCP servers defined in .claude/.mcp.json should be loaded and available, similar to how they work when the configuration is in the root .mcp.json file.
Actual Behavior
Only one MCP server (snap-happy) loads from .claude/.mcp.json, while other servers (puppeteer, ElevenLabs, xero, microsoft, markitdown) are ignored.
Steps to Reproduce
- Create a
.claude/.mcp.jsonfile with multiple MCP server configurations:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"],
"env": {}
},
"ElevenLabs": {
"command": "uvx",
"args": ["elevenlabs-mcp"],
"env": {
"ELEVENLABS_API_KEY": "sk_xxx"
}
},
"snap-happy": {
"command": "node",
"args": ["/path/to/snap-happy/dist/index.js"],
"env": {
"SNAP_HAPPY_SCREENSHOT_PATH": "/path/to/screenshots"
}
}
}
}
- Run
claude mcp list - Observe that only
snap-happyis loaded - Move the file to root directory as
.mcp.json - Run
claude mcp listagain - Observe that all servers now load correctly
Test Results
With .claude/.mcp.json:
Checking MCP server health...
snap-happy: npx @mariozechner/snap-happy - ✓ Connected
With root .mcp.json:
Checking MCP server health...
puppeteer: npx -y @modelcontextprotocol/server-puppeteer - ✓ Connected
ElevenLabs: uvx elevenlabs-mcp - ✓ Connected
snap-happy: npx @mariozechner/snap-happy - ✓ Connected
Debug Output
When running with --debug, only the snap-happy server shows connection attempts:
[DEBUG] MCP server "snap-happy": Starting connection attempt
[DEBUG] MCP server "snap-happy": Connection attempt completed in 1077ms - status: connected
No debug output appears for other servers, suggesting they're not being read from the configuration file.
Impact
This prevents users from organizing their MCP configurations within the .claude/ directory structure, forcing them to clutter the root directory with configuration files.
Possible Cause
The MCP configuration loader may not be properly reading or processing the .claude/.mcp.json file format, or there may be a path resolution issue when loading servers from this location.
Workaround
Move .mcp.json to the root directory of the project.
29 Comments
Found 3 possible duplicate issues:
If your issue is a duplicate, please close it and 👍 the existing issue instead.
🤖 Generated with Claude Code
Same problem - there seem to be too many places where mcp servers are stored in Claude Code. My .claude.json is a giant file with at least two sections of mcp servers - one I had no idea existed and both had mcp servers I thought I had uninstalled.
Same here. Was working earlier, not sure what broke it – tried various older versions. macOS update to 15.6...?
same issue here, wondering why this isn't already fixed
Same issue.
Try using:
thanks, this was ruining my day :)
good tip, but this now only loads from mcp servers from .mcp.json
To get both (seems like it should be the default behavior):
now mcps are loaded from local, project, and user scopes.
I am using
1.0.109 (Claude Code)Same
still an issue in
At least update https://docs.claude.com/en/docs/claude-code/mcp#mcp-installation-scopes
with details to run
project scoped mcp file
.mcp.jsonisn't being picked up.2.0.1 (Claude Code)
Big regression in terms of UI/UX to not load the
.mcp.jsonby default.Anthropic, please fix this 🙏
This did it for me. I don't recall toggling any settings to have that file even ignored to begin with. Interestingly .mcp.json inside a plugin folder does NOT get ignored. only root-level.
The annoying thing is that I have to run
claude --mcp-config .mcp.jsonevery time.Was there any indication that they will deprecate
.mcp.json? I'm looking at the docs right now and no mention of that.This bash function wrapper should remove the need to do
claude --mcp-config .mcp.jsoneach time.and the variant with
--dangerously-skip-permissionsenabled by default:Experiencing this
Any new update?
I'm using Ubuntu
I am also experiencing this issue, even MCP Servers defined at User Scope are no longer working.
Wanted to add my cases with the latest version 2.0.53
Now Claude Code complains about the file not being valid, meanwhile, with --mcp-config .mcp.json it does read the server in
.mcp.json looks like this
I love
claude code, but I just came here because I have to say. Configuring claude is an absolute morass of config files located in different places being merged and ignored in mysterious ways. Claude code itself can't make sense of it and help the user figure out what's wrong. It just told me this:If that's actually true, which I sort of doubt, then I would love to be able to run claude in a stricter mode in which it would error out on extraneous/unrecognized keys in configuration files.
(Edit: looks like someone just said this above
claude --strict-mcp-config, which I will try)Configuring MCP servers is an absolutely disastrous user experience. It's literally almost impossible to do because the configuration files are such a mess.
Edit: Furthermore: my MCP configurations are something I would like to keep under source control with my dot files, so now I'm keeping
~/.claude.jsonunder source control and I discover that this is not a configuration file at all, it's state file that changes every time run claude. 🤦 . So we have a piece of configuration, mcpServers, that is for some reason stored in the state file instead of with the rest of the user configuration.+100
settings.local.json seems to be needed to enabled project local mcp
https://github.com/anthropics/claude-code/issues/3321#issuecomment-3656211741
💯
The fact that it's
~/.claude.jsonwhich manages MCPs is abhorring, dead-in-the-water UX.Noticing that Anthropic doesn't seem to care about this issue (unfortunately), or they have competing priorities, I've started using
geminias my go-to-AI-agent for MCP management.You have to put the
.mcp.jsoninside the project root next to the.claudefolder and not inside the.claudefolder.Yeah previous versions of Claude Code didn't respect a root .mcp.json either.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
still experiencing this issue :(
It does not work, Claude Code CLI VS Code extension does not see the MCPs defined there, though Claude Code CLI for Windows does.
Not sure if this helps, but in my case the issue was an invalid JSON , there was a trailing comma at the end of the file.
For example:
Invalid:
{
"key": "value",
}
Valid:
{
"key": "value"
}