Chrome extension MCP bridge socket not connected to CLI session
Bug Report: Claude in Chrome — MCP bridge socket not connected to CLI session
Environment
- Claude Code version: 2.1.49
- OS: macOS Darwin 25.2.0
- Chrome version: 145.0.7632.77
- Extension version: 1.0.53
- Extension ID:
fcoeoabgfenejglbffodgkkbkcdhcgfn(matches native messaging host config)
Problem
mcp__claude-in-chrome__tabs_context_mcp always returns "Browser extension is not connected" even though:
- Chrome is running
- The extension is installed and enabled
- The native messaging host process is running
- The CLI was started with
claude --chrome - The bridge socket exists in
/tmp/claude-mcp-browser-bridge-<user>/
The root cause appears to be that the CLI session never connects to the native host's Unix socket. The native host creates the socket, but the CLI process has no open file descriptors pointing to it.
Reproduction Steps
- Start Chrome with Claude in Chrome extension v1.0.53 installed
- Run
claude --chromein terminal - Call any
mcp__claude-in-chrome__*tool → returns "Browser extension is not connected"
Diagnostic Evidence
Native messaging host config is correct:
$ cat ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
{
"name": "com.anthropic.claude_code_browser_extension",
"description": "Claude Code Browser Extension Native Host",
"path": "/Users/<user>/.claude/chrome/chrome-native-host",
"type": "stdio",
"allowed_origins": [
"chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/"
]
}
Native host script:
#!/bin/sh
# Chrome native host wrapper script
# Generated by Claude Code - do not edit manually
exec "/Users/<user>/.local/share/claude/versions/2.1.49" --chrome-native-host
Native host process is running and has created socket:
$ ps aux | grep chrome-native
<user> 6207 /Users/<user>/.local/share/claude/versions/2.1.49 --chrome-native-host
$ ls -la /tmp/claude-mcp-browser-bridge-<user>/
srw------- 6207.sock
$ lsof -p 6207 | grep sock
2.1.49 6207 4u unix /tmp/claude-mcp-browser-bridge-<user>/6207.sock
CLI session does NOT connect to the socket:
$ lsof -p <cli-pid> | grep "sock\|bridge"
(empty — no socket connection)
$ lsof -U | grep "claude-mcp-browser-bridge"
2.1.49 6207 4u unix /tmp/claude-mcp-browser-bridge-<user>/6207.sock
# Only the native host is on the socket. The CLI session is not connected.
Troubleshooting Attempted
All of the following were tried without success:
- Full Chrome restart (Cmd+Q and reopen)
- Full Claude Code session restart (exit +
claude --chrome) - Killing the native host process and letting Chrome respawn it
switch_browserMCP tool call- Verified extension ID matches native messaging host
allowed_origins - Verified native host binary exists and is executable
- Verified no other
claude --chromesessions were competing - Confirmed only one native host process running at a time
Expected Behavior
The CLI session started with claude --chrome should connect to the native host's Unix socket at /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock and tabs_context_mcp should return tab information.
Actual Behavior
The CLI session never opens a connection to the bridge socket. All mcp__claude-in-chrome__* tool calls return "Browser extension is not connected."
Additional Context
- A second Claude session (without
--chrome) was running during initial debugging but was confirmed not to interfere - The issue persisted across multiple fresh starts of both Chrome and Claude Code
- The native host process successfully creates the socket each time — the issue is on the CLI consumer side
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗