Claude in Chrome: auto-reconnect MCP bridge or expose /chrome as automatable command

Resolved 💬 3 comments Opened Mar 26, 2026 by Daniel-Peder Closed Mar 30, 2026

Problem

When the Claude in Chrome MCP bridge disconnects (which happens frequently -- after Chrome restarts, suspend/resume, or just spontaneously during long sessions), the only fix is the interactive /chrome command inside Claude Code. This command cannot be invoked programmatically by Claude itself, so every disconnection requires the user to stop what they're doing and manually type /chrome.

This is particularly disruptive during complex multi-step automation workflows where Chrome is needed intermittently.

Root Cause

claude-in-chrome is not a regular MCP server -- it's built into the Claude Code binary via the --chrome flag. Therefore:

  • claude mcp commands cannot manage it
  • There's no CLI subcommand to reconnect
  • The PreToolUse hook can ensure Chrome is running, but cannot reconnect the internal bridge
  • Restarting Chrome actually makes it worse (kills the native host, creates stale socket)

The CLI holds the initial unix socket and never picks up new ones when the native host restarts (same root cause as #27619, #15232).

Proposed Solutions (any one would fix this)

  1. Auto-reconnect: Watch for new native host sockets in /tmp/claude-mcp-browser-bridge-*/ and automatically reconnect when the current socket goes stale.
  2. Expose /chrome as CLI subcommand: e.g. claude chrome reconnect -- so it can be called from a PreToolUse hook or by Claude itself via Bash.
  3. Expose as MCP tool: A reconnect_chrome tool that Claude can call when it detects disconnection.

Environment

  • Claude Code: 2.1.77
  • OS: Ubuntu Linux 6.17.0-19-generic
  • Chrome: stable channel with Claude in Chrome extension
  • Connection: local unix sockets (not WebSocket bridge)

Related Issues

  • #27619 -- CLI holds stale unix socket after native host restart (closed/stale, same root cause)
  • #15232 -- Feature request for auto-reconnect or programmatic reconnect (closed/inactive)
  • #25956 -- MCP server loses connection and can't recover (open, stale)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗