[BUG] Chrome MCP: --chrome flag fails when Claude Desktop native messaging host coexists

Resolved 💬 3 comments Opened Mar 25, 2026 by jayleekr Closed Mar 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When both Claude Desktop app and Claude Code CLI are installed on the same machine, claude --chrome fails to connect to the Chrome extension. Every call to mcp__claude-in-chrome__tabs_context_mcp returns No Chrome extension connected.

The root cause is two native messaging host manifests competing for the same Chrome extension ID (fcoeoabgfenejglbffodgkkbkcdhcgfn):

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

Chrome picks the Desktop manifest first. If Claude Desktop is not running, the native host fails silently.

What Should Happen?

claude --chrome should successfully connect to the Chrome extension regardless of whether Claude Desktop is installed. Either:

  • CLI takes priority over Desktop native host when --chrome is active
  • Detect the conflict and provide a clear error/resolution message
  • Coordinate so only one native host is active at a time

Error Messages/Logs

> mcp__claude-in-chrome__tabs_context_mcp({createIfEmpty: true})
Error: No Chrome extension connected.

Native host process inspection showed the Desktop native host occupying the socket:

$ lsof /tmp/claude-mcp-browser-bridge-jaylee/71403.sock
COMMAND     PID   USER  FD  TYPE  NAME
chrome-na 71403 jaylee  10u unix  /tmp/claude-mcp-browser-bridge-jaylee/71403.sock

$ ps -p 71403
PID   COMMAND
71403 /Applications/Claude.app/Contents/Helpers/chrome-native-host chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/

After killing the Desktop native host and removing the stale socket, the CLI native host spawns correctly but the CLI session (started before the fix) cannot reconnect — requires full session restart.

Steps to Reproduce

  1. Install both Claude Desktop and Claude Code CLI on macOS
  2. Have Chrome extension "Claude" (1.0.63) installed and enabled
  3. Close Claude Desktop app (but its native host process may linger)
  4. Run claude --chrome -c
  5. In the session, call any Chrome MCP tool (e.g. tabs_context_mcp)
  6. Result: No Chrome extension connected

Is this a regression?

I don't know — this is the first time using --chrome with both Desktop and CLI installed.

Claude Code Version

2.1.81 (Claude Code)

Platform

Anthropic API

Operating System

macOS (Darwin 24.6.0)

Terminal/Shell

Antigravity (VS Code fork) integrated terminal

Additional Information

Workaround:

  1. Rename desktop manifest: mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json ~/.../.bak
  2. Kill stale native host: kill <PID> + rm /tmp/claude-mcp-browser-bridge-*/*.sock
  3. Toggle Chrome extension off → on
  4. Restart Claude Code session with --chrome

Key files:

  • Desktop manifest: ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json
  • CLI manifest: ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
  • CLI native host: ~/.claude/chrome/chrome-native-host
  • Socket dir: /tmp/claude-mcp-browser-bridge-<user>/

Chrome profile: Profile 1 (not Default) — extension found at ~/Library/Application Support/Google/Chrome/Profile 1/Extensions/fcoeoabgfenejglbffodgkkbkcdhcgfn/1.0.63_0/

View original on GitHub ↗

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