Claude in Chrome MCP: browser extension not connected from Claude Code CLI

Resolved 💬 4 comments Opened Mar 22, 2026 by Dbz Closed Mar 22, 2026

Description

Claude in Chrome MCP tools (mcp__claude-in-chrome__tabs_context_mcp) always return "Browser extension is not connected" when called from Claude Code CLI, even though the native messaging host is correctly running and the socket bridge is active.

Environment

  • OS: macOS 14.0 (Darwin 23.0.0)
  • Claude Code version: 2.1.81
  • Chrome version: 146.0.7680.153
  • Claude browser extension: Installed (ID: fcoeoabgfenejglbffodgkkbkcdhcgfn)
  • Claude Code launched with: claude --chrome

Steps to Reproduce

  1. Install Claude browser extension in Chrome
  2. Log into claude.ai in Chrome with the same account as Claude Code
  3. Start Claude Code with claude --chrome
  4. Call mcp__claude-in-chrome__tabs_context_mcp with createIfEmpty: true
  5. Get error: "Browser extension is not connected"

Debugging Performed

Native messaging host is correctly configured

The file at ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json exists with correct path and allowed_origins matching the extension ID.

Native host binary exists and works

~/.claude/chrome/chrome-native-host correctly execs the Claude Code binary with --chrome-native-host.

Socket bridge IS created and connectable

A socket is created at /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock, owned by the Claude Code binary, and is connectable via Unix socket.

Key finding: Claude Desktop conflict

When Claude Desktop (Claude.app) was also installed, its native messaging host (com.anthropic.claude_browser_extension) took priority over Claude Code's (com.anthropic.claude_code_browser_extension). Both claim the same Chrome extension ID. Even after:

  1. Disabling Claude in Chrome from Claude Desktop settings
  2. Uninstalling Claude Desktop entirely
  3. Removing the Desktop's native messaging host config file
  4. Toggling the Chrome extension off/on
  5. Restarting Chrome
  6. Restarting Claude Code with --chrome flag
  7. Running /reload-plugins
  8. Fresh reinstall via claude --chrome after cleaning all artifacts

The MCP tool still reports "Browser extension is not connected."

Additional attempts that did not help

  • Symlinked socket with Claude Code's PID
  • Killed stale Desktop native host processes
  • Verified Chrome extension ID matches allowed_origins
  • Verified claude.ai login email matches Claude Code auth email

Expected Behavior

mcp__claude-in-chrome__tabs_context_mcp should detect the active native host socket and connect to the Chrome browser extension.

Actual Behavior

Always returns "Browser extension is not connected" regardless of native host state.

Additional Context

The user had Claude Desktop previously installed. Even after complete removal of Claude Desktop and all its native messaging artifacts, the connection cannot be established. This suggests the issue may be in how the MCP tool discovers or authenticates the socket connection, not in the native host setup itself.

View original on GitHub ↗

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