ChromeDevTools / ChromeDevTools/chrome-devtools-mcp
autoConnect: lazy CDP connection causes consent timeout in MCP hosts with tool call timeouts
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 52.3k
- Forks
- 4.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 83
Description
Problem
When using --autoConnect with Chrome's chrome://inspect/#remote-debugging toggle (Chrome 153, Windows), the MCP server initializes instantly but defers the actual Chrome CDP connection to the first tool call (e.g., list_pages).
This causes a deadlock when the MCP host (OpenCode, MCPProxy) enforces tool call timeouts (~60s):
list_pagescalled - triggersConnecting Puppeteer to {channel: chrome}- Chrome shows consent dialog ("Allow remote debugging?")
- User clicks "Allow" but tool call already timed out
- Host kills MCP process - consent grant lost
- Next call - new process - new consent needed - repeat
Evidence from debug log
17:53:16 - Starting Chrome DevTools MCP Server v1.9.0 (PID 32600)
17:53:16 - Chrome DevTools MCP Server connected (stdio init - no Chrome connection)
17:54:17 - list_pages request: {}
17:54:17 - Connecting Puppeteer to {defaultViewport:null, handleDevToolsAsPage:true, channel:chrome}
^^^^^^^^ HANGS HERE waiting for consent
~17:55:17 - Host kills process (stdin end)
Proposed Fix
Connect to Chrome during MCP init rather than lazily on first tool call. The init phase typically has a much longer timeout (3m+) than individual tool calls (60s), giving the user time to click the consent dialog.
Alternatively, expose a --connectTimeout option so hosts can configure how long to wait for the consent click.
Environment
- Chrome 153 (stable)
- chrome-devtools-mcp v1.9.0
- Windows 11
- MCP host: OpenCode (also reproduced via MCPProxy-Go v0.67.0)
--autoConnectwithchrome://inspect/#remote-debuggingtoggle enabled
Workaround
Using --browser-url with a dedicated Chrome profile launched via --remote-debugging-port and --user-data-dir bypasses the consent dialog entirely but requires a separate browser instance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing --autoConnect during MCP init and the list_pages tool call, focusing on where the lazy Puppeteer-to-Chrome connection begins and how its timeout is handled. Compare connecting during init with exposing --connectTimeout; done means the consent dialog can be accepted within the host's init window without the first tool call timing out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100