Claude in Chrome MCP: browser extension not connected despite working native host and socket

Resolved 💬 3 comments Opened Apr 2, 2026 by membranaestudio Closed Apr 6, 2026

Description

The claude-in-chrome MCP server consistently reports "Browser extension is not connected" even though:

  • The native messaging host process is running correctly
  • The Unix socket exists and responds to messages
  • The Chrome extension is installed, enabled, and the user is logged in with the same account

Environment

  • Claude Code: v2.1.90
  • Chrome extension: v1.0.66 (ID: fcoeoabgfenejglbffodgkkbkcdhcgfn)
  • OS: macOS Darwin 24.6.0
  • Chrome: Google Chrome (latest)
  • Settings: "chrome": true in settings.json

Steps to Reproduce

  1. Have Claude Desktop app installed (which registers com.anthropic.claude_browser_extension.json pointing to /Applications/Claude.app/Contents/Helpers/chrome-native-host)
  2. Use Claude Code CLI from Terminal with --chrome flag
  3. Chrome extension is installed and active
  4. Call any mcp__claude-in-chrome__* tool → always returns "Browser extension is not connected"

Debugging performed

Native host is running correctly

$ ps aux | grep chrome-native-host
/Users/user/.local/share/claude/versions/2.1.90 --chrome-native-host

Socket exists and is reachable

$ ls /tmp/claude-mcp-browser-bridge-user/
71047.sock

$ lsof -U | grep claude-mcp-browser
2.1.90  71047  user  4u  unix  ...  /tmp/claude-mcp-browser-bridge-user/71047.sock

Socket responds to messages (verified with Python)

s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect('/tmp/claude-mcp-browser-bridge-user/71047.sock')
# Sent: {'type': 'ping', 'id': '1'}
# Response: {"result":{"content":"Unknown method: undefined"}}

The native host accepts connections and responds.

Claude Code process has NO connection to the socket

Only the native host (PID 71047) has the socket open. Claude Code's main process never connects to it.

Account matches

Both Claude Code and the Chrome extension use the same account.

Root cause hypothesis

There are two native messaging host configs:

  1. com.anthropic.claude_browser_extension.json → installed by Claude Desktop app, points to /Applications/Claude.app/Contents/Helpers/chrome-native-host
  2. com.anthropic.claude_code_browser_extension.json → installed by Claude Code CLI, points to ~/.claude/chrome/chrome-native-host

Both have the extension ID fcoeoabgfenejglbffodgkkbkcdhcgfn in allowed_origins.

The Chrome extension connects via com.anthropic.claude_browser_extension (the Desktop app's config). Even when we changed that config's path to point to Claude Code's binary (so Chrome spawns the correct process and creates the socket), Claude Code's MCP still cannot connect.

It appears Claude Code's MCP server either:

  • Only looks for sockets created by the com.anthropic.claude_code_browser_extension native host name
  • Has a timing/initialization issue where it doesn't retry socket connections
  • Fails silently without logging why the connection can't be established

Attempted fixes (all failed)

  • Restarting Chrome and Claude Code multiple times
  • Running claude --chrome
  • Using /chrome → "Reconnect extension"
  • Using /mcp to reconnect
  • Killing native host and letting Chrome respawn it
  • Cleaning socket directory and restarting everything
  • Changing com.anthropic.claude_browser_extension.json path to Claude Code's binary
  • Disabling/re-enabling the Chrome extension

Expected behavior

Claude Code's MCP should connect to the native host socket and communicate with the Chrome extension.

Suggested fix

  • Claude Code's MCP should scan all sockets in /tmp/claude-mcp-browser-bridge-{user}/ regardless of which native messaging host name created them
  • Or: Claude Code should detect the conflict with Claude Desktop's native messaging config and handle it
  • Add debug logging for the chrome MCP connection flow to make this easier to diagnose

View original on GitHub ↗

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