MCP servers with "disabled: true" in .mcp.json show as "failed" instead of "disabled"
Bug Description
MCP servers configured with "disabled": true" in the project .mcp.json file sometimes show as "failed" (red ✗) instead of "disabled" (○) in the /mcp status list.
Expected Behavior
Servers with "disabled": true" in .mcp.json should consistently show as "disabled" and should not be started at all.
Actual Behavior
Some servers with "disabled": true show as "failed" — meaning Claude Code attempted to connect to them and failed, rather than respecting the disabled flag. Other servers in the same config file with the same "disabled": true flag correctly show as "disabled."
Reproduction
- Create a
.mcp.jsonwith multiple servers, all having"disabled": true - Start Claude Code
- Run
/mcpto see server statuses - Some servers show "disabled" (correct), others show "failed" (incorrect)
Example Config
All of these have "disabled": true in .mcp.json:
| Server | Status (expected: disabled) |
|--------|----------------------------|
| cloudflare | ○ disabled ✓ |
| playwright | ○ disabled ✓ |
| shopify-dev | ○ disabled ✓ |
| vercel | ○ disabled ✓ |
| langfuse-docs | ○ disabled ✓ |
| ga4 | ✗ failed ✗ |
| github | ✗ failed ✗ |
| google-ads | ✗ failed ✗ |
| langfuse | ✗ failed ✗ |
| meta-ads | ✗ failed ✗ |
| sentry | ✗ failed ✗ |
| supabase | ✗ failed ✗ |
Investigation
- The
~/.claude.jsonper-projectenabledMcpjsonServersanddisabledMcpjsonServersarrays are both empty, so there's no user-level override. - The
"disabled": trueflag is present in the.mcp.jsonconfig for all affected servers. - It appears Claude Code's runtime state may be overriding the config file for certain servers, possibly related to a previous session where the server was enabled/accepted via the trust dialog.
Environment
- Claude Code (CLI)
- macOS (Darwin 25.3.0)
- Model: Claude Opus 4.6
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗