enabledMcpjsonServers in .claude/settings.local.json is ignored
Resolved 💬 3 comments Opened Feb 10, 2026 by AlejandroZipTransfers Closed Feb 14, 2026
Bug Description
enabledMcpjsonServers configured in .claude/settings.local.json is ignored by Claude Code. The MCP server only loads when enabledMcpjsonServers is manually added to ~/.claude.json under the project path, but this value does not persist between sessions.
Environment
- Claude Code version: Latest (installed via
npm install -g @anthropic-ai/claude-code) - OS: macOS (Darwin 25.2.0)
- Node: v22.x
Steps to Reproduce
- Configure an MCP server in
.claude/.mcp.json:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/db"]
}
}
}
- Add
enabledMcpjsonServersto.claude/settings.local.json:
{
"permissions": { ... },
"enabledMcpjsonServers": ["postgres"]
}
- Start Claude Code with
claude
- Expected: MCP server loads, showing
✓ postgres (mcp)at startup - Actual: MCP server does NOT load
Workaround
Manually add enabledMcpjsonServers to ~/.claude.json before each session:
python3 << 'PYEOF'
import json
with open('/Users/username/.claude.json', 'r') as f:
config = json.load(f)
config['projects']['/path/to/project']['enabledMcpjsonServers'] = ['postgres']
with open('/Users/username/.claude.json', 'w') as f:
json.dump(config, f, indent=2)
PYEOF
This works, but the value is cleared/reset when the session ends.
Analysis
Based on investigation:
- Claude Code reads
enabledMcpjsonServersONLY from~/.claude.jsonunderprojects[path] - Values in
~/.claude.jsonunderprojects[path]do not persist between sessions (by design or bug?) enabledMcpjsonServersin.claude/settings.local.jsonor.claude/settings.jsonappears to be ignored
Expected Behavior
Either:
enabledMcpjsonServersin.claude/settings.local.jsonshould be respected, ORenabledMcpjsonServersin~/.claude.jsonshould persist between sessions, OR- Documentation should clarify the correct way to permanently enable project MCP servers
Related
This may be related to the MCP settings documentation at https://docs.anthropic.com/en/docs/claude-code/mcp
---
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗