[MCP servers “Failed to connect” on Windows 11 (Node 22, npm 11.5.1, Claude CLI 1.0.62)]

Resolved 💬 7 comments Opened Jul 30, 2025 by CFA-Fintech Closed Aug 4, 2025

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

  1. Upgrade to npm 11.5.1, confirm global bin is in PATH.
  2. Install MCP binaries: npm install -g @upstash/context7-mcp @playwright/mcp firecrawl-mcp
  3. Confirm binaries run directly: context7-mcp --help and context7-mcp both work.
  4. Register MCPs with Claude CLI using:

claude mcp add context7 -- "context7-mcp"
claude mcp add playwright -- "playwright-mcp"
claude mcp add firecrawl -- "firecrawl-mcp"

  1. Run claude mcp list — all report “Failed to connect”.
  2. Tried running MCPs manually in a terminal, and then claude mcp list in another — still fails.
  3. Tried in PowerShell, CMD, and VSCode terminals, including Run as Administrator.
  4. Verified all env vars and checked for duplicate Node/npm versions.
  5. 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)

View original on GitHub ↗

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