AgentFixFind a fix
Claude CodeConfirmed workaroundUpdated Aug 20, 2026

Claude Code Playwright MCP fails after /c becomes C:/

Fix Claude Code Playwright MCP -32000 and Failed to reconnect when Windows /c is rewritten to C:/ in plugin configuration.

Exact error

Match the message before using the fix

Failed to reconnect to plugin:playwright:playwrightMCP error -32000: Connection closedClaude Code rewrites /c to C:/ in the MCP command

Quick answer

Start here

Bypass the affected plugin command on native Windows and register Playwright MCP through its JavaScript entry point with `node`. The reporter confirmed that a direct `node .../@playwright/mcp/cli.js` configuration connected, while the plugin and `cmd /c` form failed after `/c` became `C:/`. Back up Claude configuration first because package paths vary by installation.

Diagnosis

Why it happens

  • The failing report shows the Windows command-switch `/c` serialized as the path-like value `C:/`.
  • The Playwright plugin then cannot start or reconnect, surfacing a generic `-32000` connection-closed error.
  • Error `-32000` is generic; only use this page when the logs also show the Playwright plugin or `/c` rewrite signature.

Safest first

Fixes, in order

01

Run the Playwright MCP JavaScript entry point with Node

Applies when: Best match when logs show `/c` changed to `C:/`

The upstream reporter installed the Playwright MCP package and configured Claude to launch its CLI file directly with Node, avoiding the broken command-switch serialization.

  1. Back up your Claude configuration.
  2. Install the official Playwright MCP package in a stable directory.
  3. Locate `@playwright/mcp/cli.js` in that installation.
  4. Configure the MCP command as `node` and pass the full CLI path plus any Playwright arguments.
  5. Restart Claude Code and check the MCP connection.
node D:/path/to/node_modules/@playwright/mcp/cli.js --cdp-endpoint http://127.0.0.1:9222

Expected: Claude reports the Playwright MCP as connected and no longer rewrites a `/c` argument.

02

Remove the broken plugin entry before adding the direct command

Applies when: Use when Claude repeatedly reconnects the old plugin definition

Two definitions can make it unclear which server is failing. Keep a backup and remove only the affected Playwright entry.

  1. Export or copy the current Claude configuration.
  2. Disable or remove the failing Playwright plugin entry.
  3. Add the direct Node-based server with a distinct name.
  4. Restart Claude Code and inspect that server alone.

Expected: Only one Playwright server definition starts, using Node directly.

03

Check the browser endpoint separately

Applies when: Use when the direct server starts but Playwright still cannot attach

A valid MCP process can still fail if the CDP endpoint is not listening. This is a separate failure from the `/c` rewrite.

  1. Start the browser with remote debugging enabled if your setup requires it.
  2. Open the configured CDP endpoint locally.
  3. Start the direct Node MCP command manually and confirm it remains running.
  4. Reconnect from Claude Code.

Expected: The MCP process stays running and the configured endpoint responds.

Verification

Prove the fix worked

  1. Inspect the effective MCP command and confirm no argument became `C:/`.
  2. Run the exact Node command manually; it should remain active rather than exit immediately.
  3. Reconnect in Claude Code and run a harmless browser inspection action.

Escalation

If it still fails

  • If there is no `/c` rewrite in the logs, diagnose `-32000` as a separate transport or server-exit problem.
  • Record Claude Code, Node, Playwright MCP, and Windows versions plus the sanitized effective configuration.
  • Do not paste secrets, tokens, or browser profile credentials into an issue.

Scope

Environment and version notes

  • The confirmed report used native Windows 11 and Playwright MCP 0.0.68.
  • The issue was closed as stale/not planned; that is not evidence of a shipped fix.
  • Sources rechecked August 20, 2026.

Evidence

Sources

Source labels describe the evidence available on the checked date. A closed issue is not automatically a shipped fix.

Check the configuration itself: validate your MCP configuration for JSON, command, args, env, npx, and Windows path risks. For a repeatable agent workflow, use the MCP debugging triage skill.