C:/Program Files/Git/doctor flags intentional cross-platform MCP config as warnings (alarm fatigue)
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:
- Commit
.mcp.jsonwith the Linux-compatible form ("command": "npx"). - Add a local-scope override in
~/.claude.jsonunderprojects[<cwd>].mcpServerson 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./doctordoesn'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)
- Detect the compensation pattern. If project scope uses
npxand local scope usescmd /c npx(orwsl.exe npxon WSL, etc.) with otherwise matching args/package, treat as "cross-platform by design" and green-light it. - Per-server suppression. Allow
~/.claude/settings.jsonto declare"doctorIgnoreServers": ["context7"]or similar, so users can silence known-good noise. - 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗