[BUG] Project-level MCP servers (.mcp.json) fail to connect starting from v2.0.71
Bug Description
Project-level MCP servers configured via .mcp.json fail to connect starting from Claude Code version 2.0.71. The CLI shows "Failed to reconnect to [server-name]" despite the server being fully functional when tested manually.
Binary Search Results
Through systematic testing, we identified the exact version where this regression was introduced:
| Version | Status |
|---------|--------|
| 2.0.14 | ✅ Works |
| 2.0.45 | ✅ Works |
| 2.0.60 | ✅ Works |
| 2.0.68 | ✅ Works |
| 2.0.70 | ✅ Works |
| 2.0.71 | ❌ Regression introduced |
| 2.0.72 | ❌ Broken |
| 2.0.76 | ❌ Broken |
Environment
- OS: Ubuntu 24.04.3 LTS (Linux 6.8.0-60-generic)
- Node.js: v22.20.0
- Working version: 2.0.70
- First broken version: 2.0.71
Steps to Reproduce
- Create a
.mcp.jsonfile in your project root with MCP server configuration:
{
"mcpServers": {
"laravel-boost": {
"command": "./vendor/bin/sail",
"args": ["artisan", "boost:mcp"]
}
}
}
- Start Claude Code v2.0.71+ in the project directory
- Run
/mcpcommand - Observe: "Failed to reconnect to laravel-boost"
Manual Verification
The MCP server works correctly when tested manually:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | ./vendor/bin/sail artisan boost:mcp
Returns valid MCP response in ~0.3 seconds:
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{"listChanged":false},"resources":{"listChanged":false},"prompts":{"listChanged":false}},"serverInfo":{"name":"Laravel Boost","version":"0.0.1"}}}
Workaround
Downgrade to v2.0.70:
npm install -g @anthropic-ai/claude-code@2.0.70
Related Issues
- #15215 - Project-level MCP servers not loading in Claude Code runtime (v2.0.76)
- #3321 - .mcp.json is not read
- #12449 - MCP Server Connection Race Condition
Notes
This appears to be a regression in how Claude Code handles project-level .mcp.json configuration. User-level MCP servers in ~/.claude.json may still work, but project-level configuration is broken.
🤖 Generated with Claude Code
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗