[BUG] MCP servers defined in global.json are not applied to projects
Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Workaround ✓ Mentioned in description ↑
Activity 6 comments · opened Mar 15, 2025 · closed Mar 17, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Description
Global MCP servers configured in ~/.claude-code/mcp/global.json are not being detected or applied to projects automatically. This defeats the purpose of having global configuration.
Steps to reproduce
- Configure MCP servers in
~/.claude-code/mcp/global.jsonunder the "mcpServers" key - Open Claude Code in a project directory
- Run
claude mcp list- no servers are shown despite being in global config - Manually adding servers with
claude mcp add-jsonworks as a workaround
Expected behavior
MCP servers defined in the global config should be automatically available to all projects without requiring per-project configuration.
Environment
Using Claude Code CLI with globally configured MCP servers in ~/.claude-code/mcp/global.json
Configuration reference (API keys redacted)
{
"brave-search": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-brave-search"
],
"env": {
"BRAVE_API_KEY": "API_KEY_REDACTED"
}
},
"puppeteer": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-puppeteer"
]
}
}
This is from the mcpServers field in global.json.
Workaround applied
As a workaround, we were able to add the MCP servers to the project-specific configuration using:
claude mcp add-json brave-search "$(cat ~/.claude-code/mcp/global.json | jq '.mcpServers."brave-search"')"
claude mcp add-json puppeteer "$(cat ~/.claude-code/mcp/global.json | jq '.mcpServers.puppeteer')"
After running these commands, claude mcp list properly showed both servers as configured.
6 Comments
~/.claude-code/mcp/global.jsonis not a supported file path for defining MCP servers, so this wouldn't work. To add a global server, you can use one of theaddcommands and specify--scope global. For example, eitherclaude mcp add --scope global ...orclaude mcp add-json --scope global .... You can also just doclaude mcp addand go through the wizard flow.I'm curious, where did you see
~/.claude-code/mcp.global.json?@ashwin-ant, I'm finding it pretty hard to interact with the
addcommand. Could you point me to the JSON file that stores global MCP servers? I'm not interested in local or project-based servers, just the global ones. I don't see any json file in the ~/.claude!Image
and
settings.jsondoes not have this info eitherFor anyone looking for the json location where claude code stores global (now called "user scoped") MCP servers today, it's in
~/.claude.jsonYou just saved me after 2 hours of pulling my hairs. somehow ~/.claude/mcp.json is referenced left and right
It takes a village :-)
--------
Aaron Lippold
@.***
260-255-4779
twitter/aim/yahoo,etc.
'aaronlippold'
On Tue, Jul 8, 2025 at 06:43 Guillaume Duquesnay @.***>
wrote:
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.