[BUG] MCP Config Diagnostics reports "Failed to parse" error even when .mcp.json file does not exist

Resolved 💬 3 comments Opened Jan 17, 2026 by dshouzhi Closed Jan 20, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running /doctor command, Claude Code reports a "Failed to parse" error for a project's .mcp.json file, even when the file does not exist or has been deleted.

Environment

  • Claude Code Version: 2.1.9
  • OS: macOS Darwin 25.2.0
  • Platform: darwin (Apple Silicon)

Error Message

MCP Config Diagnostics

[Failed to parse] Project config (shared via .mcp.json)
Location: /Users/xxx/project/gzt-pingan/.mcp.json
└ [Error] mcpServers: Does not adhere to MCP server configuration schema

What Should Happen?

If .mcp.json file does not exist, no error should be reported
If .mcp.json contains {"mcpServers": {}} (empty servers), it should be valid according to documentation

Error Messages/Logs

Error Message

  MCP Config Diagnostics

  [Failed to parse] Project config (shared via .mcp.json)
  Location: /Users/xxx/project/gzt-pingan/.mcp.json
    └ [Error] mcpServers: Does not adhere to MCP server configuration schema

Steps to Reproduce

  1. Create a .mcp.json file in project root (any format)
  2. Delete the .mcp.json file: rm .mcp.json
  3. Completely exit Claude Code (/exit)
  4. Kill all Claude Code processes: pkill -f "claude"
  5. Restart Claude Code in the project directory
  6. Run /doctor
  7. Error still appears even though file doesn't exist

Attempted Solutions (All Failed)
┌─────────────────────────────────────────────┬─────────────────────────────────────────────────────────────┐
│ Attempt │ Result │
├─────────────────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ Delete .mcp.json file │ Error persists │
├─────────────────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ Create empty config {} │ Error: "Does not adhere to MCP server configuration schema" │
├─────────────────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ Create {"mcpServers": {}} │ Error: "Does not adhere to MCP server configuration schema" │
├─────────────────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ Create valid config with placeholder server │ Error persists │
├─────────────────────────────────────────────┼─────────────────────────────────────────────────────────────┤
│ Full restart with pkill -f "claude" │ Error persists │
└─────────────────────────────────────────────┴─────────────────────────────────────────────────────────────┘

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.9

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

  • User MCPs from ~/.claude.json work correctly (notion, feishu, canva-dev, feishu-edit all connected)
  • Only project-level .mcp.json has this parsing issue
  • Issue may be related to cached/stale configuration state

View original on GitHub ↗

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