Chrome extension connection fails: MCP uses bridge instead of native socket
Bug Description
--chrome mode suddenly stopped working. The MCP tools always return "Browser extension is not connected" even though the native socket connection works perfectly when tested manually.
Environment
- Claude Code version: 2.1.49
- Chrome extension version: 1.0.53
- OS: macOS (Darwin 25.3.0, Apple Silicon)
- Chrome: 145.0.7632.77
Root Cause Analysis
The native messaging socket (/tmp/claude-mcp-browser-bridge-{user}/{pid}.sock) works perfectly - I can connect to it directly and execute tool calls (e.g., tabs_context_mcp) with valid responses including Chrome tab data.
However, Claude Code's MCP layer ignores the local socket and only attempts to connect via the WebSocket bridge (wss://bridge.claudeusercontent.com). Meanwhile, the Chrome extension connects via native messaging (local), not the bridge. The two sides never meet.
Evidence
- Native socket works - Manual test via Python connecting to the Unix socket with length-prefixed protocol returns valid Chrome tab data
- Claude Code only uses bridge -
lsofshows Claude Code process has TCP connections tobc.googleusercontent.com(bridge) but zero Unix socket connections to the native host - No client update occurred - This was working before and broke without any update to Claude Code or the Chrome extension
Likely Cause
The server-side feature flag tengu_copper_bridge appears to have been recently enabled, switching Claude Code from native socket mode to bridge mode. However, the Chrome extension's corresponding flag (chrome_ext_bridge_enabled) may not be enabled, creating a mismatch where:
- Claude Code → connects to cloud bridge (no peer found)
- Chrome extension → connects via native messaging (works locally)
- Result: "Browser extension is not connected"
Steps to Reproduce
- Start Chrome with the Claude extension installed (v1.0.53)
- Run
claude --chrome - Any MCP tool call (e.g.,
tabs_context_mcp) returns "Browser extension is not connected" - Meanwhile, manually connecting to the native socket at
/tmp/claude-mcp-browser-bridge-{user}/{pid}.sockworks perfectly
Expected Behavior
Claude Code should:
- Fall back to native socket when bridge has no peer
- OR ensure feature flags are synchronized between Claude Code and the Chrome extension
Workaround Attempted
- Removed Desktop app native messaging config (
com.anthropic.claude_browser_extension.json) so Chrome uses Claude Code's native host → native host runs correctly from Claude Code binary, socket is created and responsive, but MCP still only uses bridge - Restarted Chrome, reloaded extension, restarted Claude Code, re-logged in → no change
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗