-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Setup:
- Windows 10
- WSL v2
- Ubuntu 24
- Node.js 22 (in WSL - no Node.js in Windows)
- VSCode running on Windows with remote connection to wsl this way
Issue
The official docs about the pw-mcp add on to the user settings json file in vscode doesn't seem to work in WSL.
This config:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}Is giving me this error:
[info] Starting server playwright
[info] Connection state: Starting
[info] Starting server from LocalProcess extension host
[info] Connection state: Starting
[info] Connection state: Error spawn npx ENOENTSame thing replacing the "npx" command with the complete absolute path.
Solution I found (although partial)
This article tells about Server Sent Events (SSE), so I got it working like this:
- After installing the Playwright/mcp server, get it up and running with a port:
npx @playwright/mcp@latest --port 8931- Then, configure the client settings with your endpoint:
{
"mcpServers": {
"playwright": {
"type": "sse",
"url": "http://localhost:8931/sse"
}
}
}- Reload vscode window and reestart the client.
Question
Is there any other solution to make vscode automatically start the server without any problems? Please, let me know.
Metadata
Metadata
Assignees
Labels
No labels