[BUG] MCP command parser incorrectly converts /c flag to C:/ on Windows when using cmd /c wrapper
Resolved 💬 5 comments Opened Jul 22, 2025 by ybadragon Closed Aug 19, 2025
Environment
- Platform (select one):
- Google Vertex AI
- Claude CLI version: 1.0.57
- Operating System: Windows 11
- Terminal: Command Prompt / Powershell
Bug Description
The claude mcp add command incorrectly parses the /c flag when using the cmd /c wrapper for Windows MCP servers. The /c flag is being converted to C:/ in the saved
configuration, causing MCP server connection failures.
Steps to Reproduce
- Run: claude mcp add -s user context7 -- cmd /c npx -y @upstash/context7-mcp
- Check the configuration with: claude mcp list
- Observe the saved command in the output
Expected Behavior
The MCP server should be saved with the command: cmd /c npx -y @upstash/context7-mcp
Actual Behavior
The MCP server is saved with the command: cmd C:/ npx -y @upstash/context7-mcp (note /c became C:/)
Additional Context
- The official documentation at https://docs.anthropic.com/en/docs/claude-code/mcp#configure-mcp-servers which states: "On native Windows
(not WSL), local MCP servers that use npx require the cmd /c wrapper"
- The issue persists even when wrapping arguments in quotes: claude mcp add -s user context7 -- "cmd" "/c" "npx" "-y" "@upstash/context7-mcp"
- This affects any MCP server installation on Windows that requires the cmd /c wrapper
- The bug makes it impossible to properly configure local MCP servers on Windows following the official documentation.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗