The chrome-devtools MCP server is configured with:
bunx chrome-devtools-mcp@latest --autoConnect --user-data-dir <chrome-profile-dir>
Every tool call (list_pages, navigate_page, …) fails with:
Could not connect to Chrome. Check if Chrome is running.
Cause: Could not find DevToolsActivePort for chrome at <chrome-profile-dir>/DevToolsActivePort
or, after adding --user-data-dir so the port is found:
Cause: Unexpected server response: 101
At the same time, the DevTools endpoint is verifiably live:
curl http://127.0.0.1:9222/json/versionreturns JSON (or the port responds)- Connecting directly with Puppeteer over the same WebSocket endpoint works fine:
const browser = await puppeteer.connect({
browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser/<id>'
}); // worksSo Chrome is fine. The MCP server is the problem.
chrome-devtools-mcp runs Puppeteer under the hood, and Puppeteer does not support running under Bun. When the MCP server is launched via bunx, Puppeteer's connect() fails to handshake with Chrome — even though the endpoint is reachable and the browser is running with remote debugging enabled.
The maintainers confirmed this in upstream issue #1234 ("Bug: chrome-devtools-mcp fails to connect to Chrome when run via Bun (bunx)"), which was closed with "we currently do not support bun".
Launch the MCP server with Node's npx instead of bunx.
Because the MCP subprocess may not inherit your shell's PATH (e.g. when Node is installed via nvm), use the absolute path to npx:
Notes:
--autoConnecton Chrome 144+ requires remote debugging enabled in the running Chrome viachrome://inspect/#remote-debugging, and the user must click Allow on the permission dialog when the MCP first connects.- Passing
--user-data-direxplicitly makes--autoConnecttake the connect path (it readsDevToolsActivePortand builds the WS endpoint) instead of falling into Puppeteer's launch path. - Restart your MCP client so the server respawns under Node.
# server must run under Node, not Bun
npx -y chrome-devtools-mcp@latest --autoConnect --user-data-dir <profile-dir>
# then, from your agent:
list_pages # -> returns the open tabs (e.g. your real Chrome tabs)