豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 00f9c31

Browse files
EzioMercerOrKoN
andauthored
docs: Update troubleshooting for MCP server connection errors (#1017)
Added solutions for MCP server connection issues on Windows 10, including using cmd and absolute path for npx. --------- Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com> Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
1 parent 2a6ac70 commit 00f9c31

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/troubleshooting.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,32 @@ Possible workarounds include:
100100

101101
- **Use Powershell or Git Bash** instead of WSL.
102102

103+
### Windows 10: Error during discovery for MCP server 'chrome-devtools': MCP error -32000: Connection closed
104+
105+
- **Solution 1** Call using `cmd` (For more info https://github.com/modelcontextprotocol/servers/issues/1082#issuecomment-2791786310)
106+
107+
```json
108+
"mcpServers": {
109+
"chrome-devtools": {
110+
"command": "cmd",
111+
"args": ["/c", "npx", "-y", "chrome-devtools-mcp@latest"]
112+
}
113+
}
114+
```
115+
116+
> **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.
117+
118+
- **Solution 2** Instead of another layer of shell you can write the absolute path to `npx`:
119+
> Note: The path below is an example. You must adjust it to match the actual location of `npx` on your machine. Depending on your setup, the file extension might be `.cmd`, `.bat`, or `.exe` rather than `.ps1`. Also, ensure you use double backslashes (`\\`) as path delimiters, as required by the JSON format.
120+
```json
121+
"mcpServers": {
122+
"chrome-devtools": {
123+
"command": "C:\\nvm4w\\nodejs\\npx.ps1",
124+
"args": ["-y", "chrome-devtools-mcp@latest"]
125+
}
126+
}
127+
```
128+
103129
### Connection timeouts with `--autoConnect`
104130

105131
If you are using the `--autoConnect` flag and tools like `list_pages`, `new_page`, or `navigate_page` fail with a timeout (e.g., `ProtocolError: Network.enable timed out` or `The socket connection was closed unexpectedly`), this usually means the MCP server cannot handshake with the running Chrome instance correctly. Ensure:

0 commit comments

Comments
 (0)