File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,3 +75,31 @@ ssh -N -L 127.0.0.1:9222:127.0.0.1:9222 <user>@<host-ip>
7575
7676Point the MCP connection inside the VM to ` http://127.0.0.1:9222 ` and DevTools
7777will reach the host browser without triggering the Host validation.
78+
79+ ### Connecting to a running Chrome instance (remote debugging, 9222)
80+
81+ If you want ` chrome-devtools-mcp ` to attach to an existing Chrome instance, start Chrome with remote debugging enabled, then pass ` --browserUrl ` .
82+
83+ 1 . Start Chrome with a remote debugging port:
84+
85+ - Linux:
86+ ``` sh
87+ google-chrome --remote-debugging-port=9222
88+ ```
89+
90+ - macOS:
91+ ` ` ` sh
92+ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
93+ ` ` `
94+
95+ 2. Verify the endpoint is reachable:
96+
97+ - ` http://127.0.0.1:9222/json/version` should return JSON
98+
99+ 3. Start the MCP server and point it at the debugging endpoint:
100+
101+ ` ` ` sh
102+ npx --yes chrome-devtools-mcp@latest --browserUrl http://127.0.0.1:9222
103+ ` ` `
104+
105+ See also: ` examples/remote-debugging-9222.mjs` .
You can’t perform that action at this time.
0 commit comments