Claude Code CLI cannot connect to Chrome extension when Claude Desktop uses the same extension ID

Resolved 💬 3 comments Opened Apr 15, 2026 by philyboysmith Closed Apr 19, 2026

Environment

  • OS: macOS (Darwin 25.3.0)
  • Chrome extension: Claude for Chrome (Beta) v1.0.68, ID fcoeoabgfenejglbffodgkkbkcdhcgfn
  • Claude Code CLI: v2.1.109 at /Users/philsmith/.local/share/claude/versions/2.1.109
  • Claude Desktop: installed and functional (connects to the extension successfully)

Summary

On a machine where Claude Desktop is installed, the Claude Code CLI's claude-in-chrome MCP bridge reports the extension as not connected, even though:

  • /mcp shows claude-in-chrome as ✔ connected
  • The Chrome extension is installed, enabled, signed in, and the side panel is open
  • Claude Desktop successfully connects to the same extension on the same machine

Every call to mcp__claude-in-chrome__tabs_context_mcp (and any other browser automation tool) returns:

Browser extension is not connected. Please ensure the Claude browser extension is installed and running…

Root cause (as far as I can diagnose)

Two native messaging host registrations exist and both list the same extension ID in allowed_origins:

~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json (Desktop's):

{
  "name": "com.anthropic.claude_browser_extension",
  "path": "/Applications/Claude.app/Contents/Helpers/chrome-native-host",
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://dihbgbndebgnbjfmelmegjepbnkhlgni/",
    "chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/",
    "chrome-extension://dngcpimnedloihjnnfngkgjoidhnaolf/"
  ]
}

~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json (CLI's):

{
  "name": "com.anthropic.claude_code_browser_extension",
  "path": "/Users/philsmith/.claude/chrome/chrome-native-host",
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/"
  ]
}

ps aux shows the extension launched Desktop's binary:

philsmith  96669  /Applications/Claude.app/Contents/Helpers/chrome-native-host chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/

The bridge socket exists and is owned by that Desktop-host PID:

/tmp/claude-mcp-browser-bridge-philsmith/96669.sock

The CLI's host binary (~/.claude/chrome/chrome-native-host) is never invoked by the extension — it runs fine when launched manually and creates its own socket, but the extension never connects to it.

This strongly suggests the extension only calls chrome.runtime.connectNative("com.anthropic.claude_browser_extension") (Desktop's host name), and has no knowledge of the CLI's host name com.anthropic.claude_code_browser_extension. The CLI-installed host registration is therefore orphaned, and the CLI's MCP bridge cannot reach the extension.

Steps to reproduce

  1. Install Claude Desktop (registers com.anthropic.claude_browser_extension)
  2. Install Claude Code CLI and enable the Chrome extension integration (registers com.anthropic.claude_code_browser_extension)
  3. Install the Claude Chrome extension fcoeoabgfenejglbffodgkkbkcdhcgfn, sign in, open side panel
  4. In Claude Code, confirm /mcp shows claude-in-chrome: ✔ connected
  5. Attempt any mcp__claude-in-chrome__* tool call

Expected: extension responds, tab context / navigation tools work.

Actual: Every call returns "Browser extension is not connected."

Things I tried

  • Quit Claude Desktop (⌘Q), verified no UI process remains. The Desktop-bundled chrome-native-host helper (PID 96669) stays alive because Chrome keeps the extension's native-messaging pipe open; the CLI still cannot connect.
  • Reconnecting /mcpReconnected to claude-in-chrome but tool calls still fail.
  • Toggling the extension off/on in chrome://extensions/.
  • Reloading the side panel.
  • Verified native host binary works standalone: /Users/philsmith/.claude/chrome/chrome-native-host starts cleanly and creates its own socket at /tmp/claude-mcp-browser-bridge-philsmith/<pid>.sock.
  • Verified allowed_origins in both JSONs contains the correct extension ID.
  • Checked chrome://extensions/ → Claude → Inspect views:
  • service worker console: empty (other than an unrelated async-listener warning)
  • offscreen.html console: only [Offscreen] Document loaded and ready — no native-host connection attempt logged
  • sidepanel.html console: Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist. (plus unrelated CSP / Datadog / Segment warnings)

What I think needs to happen

Either:

  1. The extension should also support com.anthropic.claude_code_browser_extension as a native host name (e.g., try CLI's host name first, or in addition to Desktop's), so Claude Code CLI users without Claude Desktop — and users with both — can connect; or
  2. The Desktop native host should multiplex, so the CLI's MCP bridge can share Desktop's socket at /tmp/claude-mcp-browser-bridge-philsmith/<pid>.sock instead of expecting its own host to be invoked; or
  3. Documentation needs to explicitly state that on machines with Desktop installed, the CLI integration won't work (or requires uninstalling Desktop's host JSON).

Happy to provide further logs or test a patch.

View original on GitHub ↗

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