claude-in-chrome MCP: "Browser extension is not connected" despite native host running correctly via CLI binary

Resolved 💬 3 comments Opened Mar 7, 2026 by nordscope-fi Closed Mar 11, 2026

Environment

  • Claude Code: 2.1.71
  • macOS: 26.3.1 (Build 25D2128)
  • Chrome: 145.0.7632.160 (standard, not Beta)
  • Extension: fcoeoabgfenejglbffodgkkbkcdhcgfn v1.0.57
  • Claude Desktop App: also installed (was causing conflicts, now resolved)

Problem

mcp__claude-in-chrome__tabs_context_mcp always returns "Browser extension is not connected" even though:

  1. The native host process is running via the CLI binary (~/.local/share/claude/versions/2.1.71 --chrome-native-host)
  2. Chrome communicates with the extension (tab groups are created when createIfEmpty: true is passed)
  3. The Unix socket exists at /tmp/claude-mcp-browser-bridge-<username>/<pid>.sock
  4. Only the CLI's native messaging host registration exists (desktop app's removed)

Root Cause Analysis

The native host process is spawned by Chrome (via native messaging) and creates a Unix socket at /tmp/claude-mcp-browser-bridge-<username>/<pid>.sock. However, the MCP claude-in-chrome plugin running inside the CLI session cannot discover or connect to this socket. The MCP tool call always returns the "not connected" error regardless of native host state.

Steps to Reproduce

  1. Install Claude Code CLI 2.1.71
  2. Install Claude Desktop App (creates competing native messaging host)
  3. Install Chrome extension fcoeoabgfenejglbffodgkkbkcdhcgfn
  4. Remove desktop app's native host: rm ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json
  5. Quit Claude Desktop App
  6. Restart Chrome
  7. Click extension icon (native host spawns via CLI binary — confirmed via ps aux)
  8. In CLI session: call mcp__claude-in-chrome__tabs_context_mcp — returns "not connected"

Key Diagnostic Evidence

Two competing native messaging hosts:

  • com.anthropic.claude_browser_extension.json → Desktop App (/Applications/Claude.app/Contents/Helpers/chrome-native-host)
  • com.anthropic.claude_code_browser_extension.json → CLI (~/.claude/chrome/chrome-native-host → exec CLI binary with --chrome-native-host)

Both claim the same extension origin (chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/). Desktop app re-registers its host whenever it launches, overriding CLI.

Even after removing the desktop app's registration and confirming the CLI binary handles the native host:

  • ps aux | grep chrome-native-host → shows ~/.local/share/claude/versions/2.1.71 --chrome-native-host
  • lsof -p <pid> → shows Unix socket at /tmp/claude-mcp-browser-bridge-<username>/<pid>.sock
  • Chrome extension behavior works (creates tab groups)
  • MCP plugin still reports "not connected"

The disconnect: The native host (spawned by Chrome) creates a socket, but the MCP client (inside the CLI session) doesn't find it. The CLI session PID and the native host PID are different processes with no apparent IPC channel between them.

Expected Behavior

When the native host is running via the CLI binary and the socket exists, mcp__claude-in-chrome__tabs_context_mcp should connect to it and return tab context.

Workaround Attempted

None successful. Screenshots are the only fallback for image content, but cannot process video (which was the original need).

View original on GitHub ↗

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