Claude in Chrome: MCP bridge doesn't reconnect when Chrome restarts
Bug Description
When Chrome is quit and reopened (or the extension is toggled off/on), the Claude Code session with --chrome flag does not reconnect to the new native host bridge sockets. The only workaround is to restart the entire Claude Code session.
Root Cause Analysis
The --chrome flag appears to only scan for bridge sockets in /tmp/claude-mcp-browser-bridge-{username}/ at session startup. When Chrome launches later (or relaunches), new native host processes create new sockets, but the running Claude Code session never discovers them.
Timeline from debugging session:
- Claude Code started at 12:55 with
--chrome— no bridge sockets existed yet - Chrome opened later, native hosts created sockets at 13:15 (
76309.sock,76310.sock) mcp__claude-in-chrome__tabs_context_mcpreturns "No Chrome extension connected" indefinitelylsofconfirms the main Claude process has no connection to the bridge sockets- Restarting Claude Code (so it starts after the sockets exist) fixes the issue
Steps to Reproduce
- Quit Chrome completely
- Start Claude Code with
claude --chrome - Open Chrome (extension is enabled, native host processes spawn, sockets created in
/tmp/claude-mcp-browser-bridge-{user}/) - Try any
mcp__claude-in-chrome__*tool → "No Chrome extension connected" - Toggling the extension off/on, quitting and reopening Chrome — none of these help
- Only restarting Claude Code (after Chrome is already running) fixes it
Expected Behavior
The Claude Code session should watch for new bridge sockets (e.g., via filesystem polling or inotify/kqueue) and auto-connect when Chrome's native host processes appear. Alternatively, the native host should be able to signal the existing Claude session.
Environment
- Claude Code: 2.1.69
- Chrome: 145.0.7632.159
- Extension: Claude in Chrome (Beta) v1.0.57
- macOS: 15.3 (Darwin 24.3.0, Apple Silicon)
- Node.js: v25.3.0
- Native host manifest:
com.anthropic.claude_code_browser_extension.json(correct extension ID) - Bridge socket path:
/tmp/claude-mcp-browser-bridge-{username}/
Diagnostic Details
Native host script at ~/.claude/chrome/chrome-native-host correctly points to /opt/homebrew/Caskroom/claude-code/2.1.69/claude --chrome-native-host.
Native host manifest at ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json has correct allowed_origins matching the extension ID.
claude mcp list shows no claude-in-chrome entry (the name is reserved/internal), confirming it's handled by the --chrome flag internally.
Workaround
Ensure Chrome is running before starting Claude Code with --chrome. If Chrome needs to be restarted, restart the Claude Code session as well.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗