Chrome MCP: Debugger detaches on complex pages, breaking screenshot/coordinate actions
Description
The Chrome debugger API connection used by mcp__claude-in-chrome__computer (screenshot, coordinate-based click/scroll/zoom) repeatedly detaches when interacting with complex pages (e.g., Wikipedia articles). Content-script-based tools (read_page, find, form_input, javascript_tool, ref-based clicks) remain stable.
Steps to Reproduce
- Connect Claude Code CLI to Chrome via the native host MCP bridge
- Navigate to a complex page like
https://en.wikipedia.org/wiki/Raspberry_Pi - Use
read_page,find,form_input,javascript_tool— all work fine - Attempt
computerwithaction: screenshot— fails with:
"Error capturing screenshot: Detached while handling command."- Or
"Browser extension is not connected."
- Coordinate-based
scroll,zoom, andleft_clickalso fail after detachment - Eventually the entire extension connection drops and cannot reconnect without manual intervention (clicking extension icon or restarting Chrome)
Observed Behavior
- Stable tools (content script API):
tabs_context_mcp,tabs_create_mcp,navigate,read_page,find,form_input,javascript_tool,get_page_text,read_console_messages,read_network_requests,resize_window,shortcuts_list,switch_browser, ref-basedleft_click/scroll_to/hover/key/type - Unstable tools (debugger API):
screenshot, coordinate-basedleft_click/scroll/hover/zoom,gif_creator export - Simple pages like
example.comwork fine for screenshots; complex DOMs (Wikipedia) trigger detachment - After repeated detachments, the extension fully disconnects and
tabs_context_mcpalso fails - Reconnection requires manual user action in Chrome
Expected Behavior
Screenshot and coordinate-based actions should work reliably on any page, or gracefully recover/reconnect when the debugger detaches.
Environment
- Claude Code version: 2.1.41
- OS: Ubuntu Linux 6.8.0-100-generic
- Chrome: latest stable
- Extension: Claude browser extension (latest)
Workaround
Use ref-based interactions exclusively from CLI (read_page → find → click by ref), avoiding screenshot and coordinate-based actions entirely.
Feature Request
Consider adding a "relay mode" where MCP tool calls route through the Chrome extension side panel instead of attaching the debugger directly. The side panel's browser automation is reportedly stable even on complex pages. This would allow CLI to delegate visual/debugger-heavy tasks to the side panel and read results back via stable content-script tools.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗