Skip to content

Commit 21a2e5a

Browse files
authored
Update troubleshooting for MCP server connection errors
Added solutions for MCP server connection issues on Windows 10, including using cmd and absolute path for npx.
1 parent d0fbf25 commit 21a2e5a

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

docs/troubleshooting.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,26 @@ Possible workarounds include:
9898
`npx chrome-devtools-mcp --browser-url http://127.0.0.1:9222`
9999

100100
- **Use Powershell or Git Bash** instead of WSL.
101+
102+
### Windows 10: Error during discovery for MCP server 'chrome-devtools': MCP error -32000: Connection closed
103+
104+
- **Solution 1** Call using `cmd` (For more info https://github.com/modelcontextprotocol/servers/issues/1082#issuecomment-2791786310)
105+
```json
106+
"mcpServers": {
107+
"chrome-devtools": {
108+
"command": "cmd",
109+
"args": ["/c", "npx", "-y", "chrome-devtools-mcp@latest"]
110+
}
111+
}
112+
```
113+
> **The Key Change:** On Windows, running a Node.js package via `npx` often requires the `cmd /c` prefix to be executed correctly from within another process like VSCode's extension host. Therefore, `"command": "npx"` was replaced with `"command": "cmd"`, and the actual `npx` command was moved into the `"args"` array, preceded by `"/c"`. This fix allows Windows to interpret the command correctly and launch the server.
114+
115+
- **Solution 2** Instead of another layer of shell you can write the absolute path to `npx`:
116+
```json
117+
"mcpServers": {
118+
"chrome-devtools": {
119+
"command": "C:\\nvm4w\\nodejs\\npx.ps1",
120+
"args": ["-y", "chrome-devtools-mcp@latest"]
121+
}
122+
}
123+
```

0 commit comments

Comments
 (0)