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

Commit 107c46a

Browse files
authored
docs: Update README with WSL configuration details (#946)
Added workarounds for using chrome-devtools-mcp in WSL. Drive-by: moved known issues from readme to troubleshooting. Drive-by: updated skill to link to troubleshooting. Drive-by: rephrased for clarity.
1 parent a781da4 commit 107c46a

File tree

3 files changed

+36
-18
lines changed

3 files changed

+36
-18
lines changed

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,4 @@ Please consult [these instructions](./docs/debugging-android.md).
683683

684684
## Known limitations
685685

686-
### Operating system sandboxes
687-
688-
Some MCP clients allow sandboxing the MCP server using macOS Seatbelt or Linux
689-
containers. If sandboxes are enabled, `chrome-devtools-mcp` is not able to start
690-
Chrome that requires permissions to create its own sandboxes. As a workaround,
691-
either disable sandboxing for `chrome-devtools-mcp` in your MCP client or use
692-
`--browser-url` to connect to a Chrome instance that you start manually outside
693-
of the MCP client sandbox.
686+
See [Troubleshooting](./docs/troubleshooting.md).

docs/troubleshooting.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,46 @@ This indicates that the browser could not be started. Make sure that no Chrome
5555
instances are running or close them. Make sure you have the latest stable Chrome
5656
installed and that [your system is able to run Chrome](https://support.google.com/chrome/a/answer/7100626?hl=en).
5757

58-
### Chrome crashes on macOS when opening Web Bluetooth
58+
### Chrome crashes on macOS when using Web Bluetooth
5959

60-
On macOS, Chrome launched by an MCP host app may crash with a macOS privacy
61-
permission violation (TCC, "Transparency, Consent, and Control") when a native
62-
Bluetooth chooser opens.
60+
On macOS, Chrome launched by an MCP client application (such as Claude Desktop) may crash when a Web Bluetooth prompt appears. This is caused by a macOS privacy permission violation (TCC).
6361

64-
Grant Bluetooth permission to the MCP host app in
65-
`System Settings > Privacy & Security > Bluetooth`, then restart the MCP host
66-
app and Chrome MCP session.
62+
To resolve this, grant Bluetooth permission to the MCP client application in `System Settings > Privacy & Security > Bluetooth`. After granting permission, restart the client application and start a new MCP session.
6763

6864
### Remote debugging between virtual machine (VM) and host fails
6965

70-
When connecting DevTools inside a VM to Chrome running on the host, any domain is rejected by Chrome because of host header validation. Tunneling the port over SSH bypasses this restriction. In the VM, run:
66+
When attempting to connect to Chrome running on a host machine from within a virtual machine (VM), Chrome may reject the connection due to 'Host' header validation. You can bypass this restriction by creating an SSH tunnel from the VM to the host. In the VM, run:
7167

7268
```sh
7369
ssh -N -L 127.0.0.1:9222:127.0.0.1:9222 <user>@<host-ip>
7470
```
7571

76-
Point the MCP connection inside the VM to `http://127.0.0.1:9222` and DevTools
77-
will reach the host browser without triggering the Host validation.
72+
Point the MCP connection inside the VM to `http://127.0.0.1:9222`. This allows DevTools to reach the host browser without triggering the Host validation error.
73+
74+
### Operating system sandboxes
75+
76+
Some MCP clients allow sandboxing the MCP server using macOS Seatbelt or Linux
77+
containers. If sandboxes are enabled, `chrome-devtools-mcp` is not able to start
78+
Chrome that requires permissions to create its own sandboxes. As a workaround,
79+
either disable sandboxing for `chrome-devtools-mcp` in your MCP client or use
80+
`--browser-url` to connect to a Chrome instance that you start manually outside
81+
of the MCP client sandbox.
82+
83+
### WSL
84+
85+
By default, `chrome-devtools-mcp` in WSL requires Chrome to be installed within the Linux environment. While it normally attempts to launch Chrome on the Windows side, this currently fails due to a [known WSL issue](https://github.com/microsoft/WSL/issues/14201). Ensure you are using a [Linux distribution compatible with Chrome](https://support.google.com/chrome/a/answer/7100626).
86+
87+
Possible workarounds include:
88+
89+
- **Install Google Chrome in WSL:**
90+
- `wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb`
91+
- `sudo dpkg -i google-chrome-stable_current_amd64.deb`
92+
93+
- **Use Mirrored networking:**
94+
1. Configure [Mirrored networking for WSL](https://learn.microsoft.com/en-us/windows/wsl/networking).
95+
2. Start Chrome on the Windows side with:
96+
`chrome.exe --remote-debugging-port=9222 --user-data-dir=C:\path\to\dir`
97+
3. Start `chrome-devtools-mcp` with:
98+
`npx chrome-devtools-mcp --browser-url http://127.0.0.1:9222`
99+
100+
- **Use Powershell or Git Bash** instead of WSL.

skills/chrome-devtools/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ If `chrome-devtools-mcp` is insufficient, guide users to use Chrome DevTools UI:
4242

4343
- https://developer.chrome.com/docs/devtools
4444
- https://developer.chrome.com/docs/devtools/ai-assistance
45+
46+
If there are errors launching `chrome-devtools-mcp` or Chrome, refer to https://github.com/ChromeDevTools/chrome-devtools-mcp/blob/main/docs/troubleshooting.md.

0 commit comments

Comments
 (0)