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

  1. Configure an MCP server in .claude/.mcp.json:
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/db"]
    }
  }
}
  1. Add enabledMcpjsonServers to .claude/settings.local.json:
{
  "permissions": { ... },
  "enabledMcpjsonServers": ["postgres"]
}
  1. Start Claude Code with claude
  1. Expected: MCP server loads, showing ✓ postgres (mcp) at startup
  2. 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:

  1. Claude Code reads enabledMcpjsonServers ONLY from ~/.claude.json under projects[path]
  2. Values in ~/.claude.json under projects[path] do not persist between sessions (by design or bug?)
  3. enabledMcpjsonServers in .claude/settings.local.json or .claude/settings.json appears to be ignored

Expected Behavior

Either:

  • enabledMcpjsonServers in .claude/settings.local.json should be respected, OR
  • enabledMcpjsonServers in ~/.claude.json should 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗