Multiple mcpServers sections in .claude.json silently override each other and project-specific .mcp.json files are not loaded
Resolved 💬 2 comments Opened Aug 1, 2025 by ScottN-PV Closed Aug 1, 2025
Environment
- Platform: [x] Other (local Windows 11 PowerShell)
- Claude CLI version: 1.0.65
- Operating System: Windows 11
- Terminal: PowerShell
- Node.js: 24.4.1
- npm: 10.8.1
- Working Directory: C:\fluxhealth-frontend
- Git Bash Path: C:\Program Files\Git\bin\bash.exe
Bug Description
- Claude Code has two critical configuration issues that prevent proper MCP server management: (1) Multiple mcpServers sections in .claude.json silently override each other without warning, causing configured servers to be ignored, and (2) This project-specific .mcp.json file is not loaded at all, forcing the MCP server configurations to be global in the my home directory. This breaks project isolation. Howevever, on the same system, in a different directory, different MCP Servers load, so the .mcp.json file is respected there.
Steps to Reproduce
- Create .mcp.json in project directory (C:\fluxhealth-frontend) with MCP server configurations
- Run claude --debug from project directory
- Observe debug output shows no attempt to load servers from .mcp.json
- Open ~/.claude.json and add MCP servers to the first mcpServers section found
- Save and restart Claude Code with claude --debug
- Observe some servers fail to start despite being configured
- Search .claude.json for "mcpServers" and discover multiple sections
- Find that only the last mcpServers section in the file takes effect
- Servers defined in earlier sections are silently ignored
10.Add mcp configurations to .claude.json and these load successfully when Claude Code is launched from the working directory.
Expected Behavior
- .mcp.json files in project directories should be automatically loaded for project-specific MCP servers
- Multiple mcpServers sections in .claude.json should either merge, error, or have documented override behavior
- All configured servers should start based on clear configuration precedence rules
Actual Behavior
- .mcp.json file is being completely ignored - no debug output shows any attempt to read it
- Multiple mcpServers sections in .claude.json silently override each other - only the last one takes effect
- No warnings or errors about duplicate configuration sections
Additional Context
- In the project where the mcp servers still seem to load properly, this is an older project started when CC was 1.0.58ish. The new project where this issue is happening was started when CC was roughly at 1.0.63 or 1.0.64.
- Arrays enabledMcpjsonServers and disabledMcpjsonServers exist in .claude.json but appear non-functional
- Debug logs show servers attempting to start with Git Bash despite PowerShell configuration due to override issue
- Wasted significant debugging time due to silent configuration override behavior
- Happy to provide full .claude.json file or additional debug logs if needed
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗