C:/Program Files/Git/doctor flags intentional cross-platform MCP config as warnings (alarm fatigue)

Resolved 💬 1 comment Opened Apr 17, 2026 by edmaceymacleod Closed May 25, 2026

Scenario

I maintain a project with .mcp.json committed to source so Claude Code works on both Claude Code on the Web (Linux) and Claude Code CLI (Windows). On Windows, npx is a .cmd shim and cannot be spawned directly as an MCP stdio subprocess — it must be launched via cmd /c npx. On Linux, cmd /c doesn't exist.

The only supported way I've found to have one .mcp.json work on both platforms is:

  1. Commit .mcp.json with the Linux-compatible form ("command": "npx").
  2. Add a local-scope override in ~/.claude.json under projects[<cwd>].mcpServers on Windows machines with "command": "cmd", "args": ["/c", "npx", ...].

This works — the MCP server actually starts and tools are usable. /mcp shows it connected. But /doctor reports two warnings that will never go away:

[Warning] [context7] mcpServers.context7: Windows requires 'cmd /c' wrapper to execute npx
[Warning] Server "context7" is defined in multiple scopes with different endpoints:
  project (npx -y @upstash/context7-mcp),
  local (cmd /c npx -y @upstash/context7-mcp).
  OAuth tokens are stored per endpoint, so authenticating in one context will not carry over.

Why this is alarm fatigue

  • Warning 1 (Windows requires 'cmd /c') is correct in isolation — the project config alone would fail on Windows — but the local override exists precisely to compensate. /doctor doesn't see them as a pair.
  • Warning 2 (Conflicting scopes) is accurate but unavoidable if you want cross-platform support. The "Suggestion" to remove one scope would re-break one of the two platforms.

So every /doctor run shows warnings that are expected, permanent, and irrelevant. This trains users to ignore warnings, which defeats the purpose of the diagnostic.

Suggested fixes (pick one or stack)

  1. Detect the compensation pattern. If project scope uses npx and local scope uses cmd /c npx (or wsl.exe npx on WSL, etc.) with otherwise matching args/package, treat as "cross-platform by design" and green-light it.
  2. Per-server suppression. Allow ~/.claude/settings.json to declare "doctorIgnoreServers": ["context7"] or similar, so users can silence known-good noise.
  3. Severity split. Reserve "warning" for things the user should act on; use "info" or a collapsed section for informational multi-scope detections.

Environment

  • Claude Code CLI on Windows 11 (bash shell via MSYS/Git Bash).
  • Project also deployed to Claude Code on the Web (Linux).
  • MCP: @upstash/context7-mcp.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗