Playwrite mcp in WSL2

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The playwrite mcp tool doesn’t seem to work with the agent or cli when running on Window WSL. The tool is ‘green’ in the setting menu indicating that it is configured correctly(screenshot). This is on an instance that is connected to WSL:ubuntu as noted in the bottom left of the IDE (screenshot).

This is the contents of the mcp.json file and the cli agent failing to pick it up.

~/Workspace/krown-website on  main! ⌚ 21:06:31
$ cat ~/.cursor/mcp.json   
───────┬────────────────────────────────────────────────────────────
       │ File: /home/agentsmith/.cursor/mcp.json
───────┼────────────────────────────────────────────────────────────
   1   │ {
   2   │   "mcpServers": {
   3   │     "playwright": {
   4   │       "command": "pnpx",
   5   │       "args": ["@playwright/mcp@latest"]
   6   │     }
   7   │   }
   8   │ }
───────┴────────────────────────────────────────────────────────────

~/Workspace/krown-website on  main! ⌚ 21:06:40
$ cursor-agent mcp list    
No MCP servers configured (expected in .cursor/mcp.json or
~/.cursor/mcp.json)

Running playwrite from the cli outside of the agent works aspected.

~/Workspace/krown-website on  main! ⌚ 20:27:20
$ pnpx playwright screenshot --browser=chromium file://$(pwd)/index.html index-shot.png

This is what I get as a reason for the issue from the IDE agent.

The Playwright MCP is hardcoded to look for Chrome in /opt/google/chrome/chrome, but Playwright installs browsers in ~/.cache/ms-playwright/. This is a limitation of the MCP configuration.

I created a soft link which seems to have resolved the IDE agent issue, but the CLI agent still can’t find the mcp.

Steps to Reproduce

Environment:
Window 11
WSL2

Configure palywrite mcp with defaults:

{
  "mcpServers": {
    "playwright": {
      "command": "pnpx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

Expected Behavior

  1. IDE agent can run playwrite mcp
  2. CLI agent can run playwrite mcp

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.40 (user setup)
VSCode Version: 1.99.3
Commit: df79b2380cd32922cad03529b0dc0c946c311850
Date: 2025-10-09T02:55:11.735Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

No - Cursor works, but with this issue