Windows: claude mcp add breaks /c flag, Playwright MCP plugin fails — working workaround

Resolved 💬 4 comments Opened Apr 10, 2026 by varanakonda Closed Jun 25, 2026

Problem

Two separate bugs prevent Playwright MCP from working in Claude Code on Windows.

Bug 1: claude mcp add mangles /c flag on Windows

claude mcp add playwright -- cmd /c npx -y @playwright/mcp@0.0.41 --cdp-endpoint http://127.0.0.1:9222

Expected config in ~/.claude.json:

{ "command": "cmd", "args": ["/c", "npx", "-y", "@playwright/mcp@0.0.41", ...] }

Actual config written:

{ "command": "cmd", "args": ["C:/", "npx", "-y", "@playwright/mcp@0.0.41", ...] }

The /c argument is being interpreted as a path and converted to C:/.

Bug 2: npx via cmd.exe /c breaks stdio pipes

Even with manually corrected config (/c not C:/), using cmd.exe /c npx doesn't work for MCP stdio transport on Windows. The npx.cmd batch wrapper breaks stdin/stdout pipe inheritance needed by the stdio transport.

Bug 3: Playwright plugin (playwright@claude-plugins-official) fails silently

The official plugin:

  • Doesn't support --cdp-endpoint (hardcoded without it in plugin's .mcp.json)
  • Plugin .mcp.json uses a different format (no mcpServers wrapper) from repo-level .mcp.json
  • enabledMcpjsonServers stays empty even after plugin install
  • Shows "Failed to reconnect to plugin:playwright:playwright" on every session start

Related: #18762, #6224, #1383, #15145, #24657

Working solution

Bypass all three bugs by using node directly in ~/.claude.json:

"playwright": {
  "type": "stdio",
  "command": "node",
  "args": [
    "D:/path/to/project/node_modules/@playwright/mcp/cli.js",
    "--cdp-endpoint",
    "http://127.0.0.1:9222"
  ]
}

Steps:

  1. npm add -D @playwright/mcp (install in project)
  2. claude plugins uninstall playwright@claude-plugins-official (remove broken plugin)
  3. Manually edit ~/.claude.json → project → mcpServers → add the config above
  4. Restart Claude Code

Environment

  • Windows 11 (10.0.26200)
  • Claude Code CLI (native)
  • @playwright/mcp v0.0.68
  • Edge with --remote-debugging-port=9222

Suggestions

  1. Fix /cC:/ path conversion bug in claude mcp add
  2. Fix the Playwright plugin to accept --cdp-endpoint configuration
  3. Document the node cli.js workaround for Windows users

View original on GitHub ↗

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