[MCP servers “Failed to connect” on Windows 11 (Node 22, npm 11.5.1, Claude CLI 1.0.62)]
Environment
- Platform: [x] Other (local Windows 11 PowerShell/CMD)
- Claude CLI version: 1.0.62 (Claude Code)
- Operating System: Windows 11 Pro, build 22631
- Terminal: PowerShell, CMD, VSCode integrated terminal
- Node.js: v22.17.1
- npm: v11.5.1 (upgraded per npm doctor)
- Global npm bin: Confirmed in PATH (C:\Users\gatto\AppData\Roaming\npm)
- VSCode: 1.99.3
Bug Description
All MCP servers (context7-mcp, playwright-mcp, firecrawl-mcp) are globally installed and present in the user PATH. Each one runs perfectly from the command line (context7-mcp --help works, context7-mcp reports “MCP server running on stdio”). However, Claude CLI fails to connect to any MCP via claude mcp list, even if the MCP process is already running in a separate terminal.
Steps to Reproduce
- Upgrade to npm 11.5.1, confirm global bin is in PATH.
- Install MCP binaries:
npm install -g @upstash/context7-mcp @playwright/mcp firecrawl-mcp - Confirm binaries run directly:
context7-mcp --helpandcontext7-mcpboth work. - Register MCPs with Claude CLI using:
claude mcp add context7 -- "context7-mcp"
claude mcp add playwright -- "playwright-mcp"
claude mcp add firecrawl -- "firecrawl-mcp"
- Run
claude mcp list— all report “Failed to connect”. - Tried running MCPs manually in a terminal, and then
claude mcp listin another — still fails. - Tried in PowerShell, CMD, and VSCode terminals, including Run as Administrator.
- Verified all env vars and checked for duplicate Node/npm versions.
- Ran
npm doctor(all OK, npm upgraded as suggested).
Expected Behavior
Claude CLI should connect and handshake with MCPs started via CLI, reporting them as “active” or “ready” in claude mcp list.
Actual Behavior
No connection—always “Failed to connect.” No errors in shell, logs, or MCP startup output.
Additional Context
- Other users report this as a rare but recurring Windows/Node/stdio issue.
- Works for many on WSL/Linux.
- Attaching screenshots and transcript for full reference.
- If you need more debug logs or want me to try a debug/verbose flag, I’m happy to help.
Thank you!
— Carlos Gattorno (gattorno.carlos@gmail.com)
7 Comments
Try running the MCP servers using absolute paths through Node.js directly.
As an example:
It's not a fix, but it's the workaround that is currently working for me.
Hope it helps.
Thanks for the workaround, though I notice the path you provided is Unix-style while the issue is specifically about Windows 😅 More importantly, hardcoding absolute paths defeats the purpose of having a proper CLI tool.
Hopefully anthropic will sooner fix this issue
I had a similar issue. Running
claude doctorgave me this warning: Windows requires 'cmd /c' wrapper to execute npxI've updated my .mcp.json to this and it works now:
wonder if bunx would work with this
✅ ISSUE RESOLVED - Windows 11 MCP Connection Problem SOLVED!
I'm happy to report that this Windows 11 MCP connection issue has been completely resolved! All three MCP servers (context7, playwright, firecrawl) are now successfully connecting and fully operational.
🎯 Root Cause & Solution
Root Cause: Windows requires a
cmd /cwrapper for npm subprocess execution, which the Claude CLI wasn't handling automatically.Working Solution: Use the
cmd /cwrapper format when adding MCP servers:Example working commands:
🏆 Acknowledgments & Special Thanks
🌟 Special recognition to @pouliens (Paulius Tvaranavicius) - You found the actual solution! Your discovery that
claude doctorshows the warning "Windows requires 'cmd /c' wrapper to execute npx" was the key breakthrough. Your.mcp.jsonconfiguration example with thecmd /cwrapper format solved the core issue. Thank you for your persistence and technical insight! 🙏Thanks to all contributors who helped troubleshoot:
📋 Final Status - All MCP Servers Connected
🔧 For Future Windows 11 Users
If you encounter "Failed to connect" with MCP servers on Windows 11:
claude doctorto check for the Windows 'cmd /c' wrapper warningclaude mcp remove server-nameclaude mcp add server-name -- cmd /c npx package-nameclaude mcp list- should show "✓ Connected"This solution should work for any npm-installed MCP server on Windows 11.
---
Closing this issue as RESOLVED. Thanks again to everyone who contributed to solving this Windows-specific MCP connection problem! 🎉
— Carlos Gattorno (@CFA-Fintech)
well, npx did work, but bunx don't work with the fix
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.