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.jsonuses a different format (nomcpServerswrapper) from repo-level.mcp.json enabledMcpjsonServersstays 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:
npm add -D @playwright/mcp(install in project)claude plugins uninstall playwright@claude-plugins-official(remove broken plugin)- Manually edit
~/.claude.json→ project →mcpServers→ add the config above - Restart Claude Code
Environment
- Windows 11 (10.0.26200)
- Claude Code CLI (native)
@playwright/mcpv0.0.68- Edge with
--remote-debugging-port=9222
Suggestions
- Fix
/c→C:/path conversion bug inclaude mcp add - Fix the Playwright plugin to accept
--cdp-endpointconfiguration - Document the
node cli.jsworkaround for Windows users
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗