Claude in Chrome: CLI MCP client fails to connect despite working native messaging and socket (macOS, multi-profile)

Resolved 💬 3 comments Opened Mar 30, 2026 by t-nakatani Closed Apr 3, 2026

Environment

  • Claude Code version: 2.1.87 (latest as of 2026-03-31)
  • Chrome extension version: 1.0.64 (Claude in Chrome Beta)
  • OS: macOS 14.4 (Darwin 23.4.0, Apple Silicon)
  • Chrome: Multiple profiles (5 profiles)
  • Claude Desktop: Installed (was running initially, terminated during troubleshooting)

Problem

mcp__claude-in-chrome__tabs_context_mcp always returns "No Chrome extension connected" despite native messaging and Unix socket communication both working correctly.

Starting with claude --chrome and running /chrome reconnect both fail with the same error. The /chrome reconnect briefly opens a Claude page in the browser which immediately closes.

Diagnostic Results

1. Native messaging: ✅ Working

From Service Worker DevTools console:

chrome.runtime.sendNativeMessage("com.anthropic.claude_browser_extension", {type: "ping"}, (r) => console.log("response:", r, "error:", chrome.runtime.lastError))
// response: {type: 'pong', timestamp: 1774882765530} error: undefined

2. Unix socket: ✅ Working

The native host creates a socket at /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock. Length-prefixed JSON messages receive responses:

# Sending {type: "ping"} with Chrome native messaging protocol (length-prefixed)
# Response: {"result":{"content":"Unknown method: undefined"}}

# Sending {jsonrpc: "2.0", method: "initialize", ...}
# Response: {"result":{"content":"Unknown method: initialize"}}

3. CLI MCP client → socket: ❌ Fails

The CLI never establishes the MCP connection through the socket. tabs_context_mcp consistently returns "No Chrome extension connected."

Complicating Factors

Claude Desktop native host conflict

Two native messaging host configs exist:

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

The Chrome extension connects via com.anthropic.claude_browser_extension (the Desktop name). When Desktop's config was disabled (renamed to .bak), the extension did not fall back to com.anthropic.claude_code_browser_extension.

Workaround attempted: Changed Desktop's config path to point to Claude Code's wrapper script. This caused the Claude Code binary to be launched as native host, and native messaging worked, but the CLI MCP client still failed to connect.

Multiple Chrome profiles

5 Chrome profiles exist. The extension is installed in Profile 1 (the active "lud" profile). Verified via find on Extensions/fcoeoabgfenejglbffodgkkbkcdhcgfn directory.

Steps Tried (all failed)

  1. claude --chrome fresh session
  2. /chrome reconnect (multiple times)
  3. /login to refresh OAuth token
  4. Terminated Claude Desktop app
  5. Disabled Desktop's native messaging host config
  6. Redirected Desktop's native host config to Claude Code binary
  7. Changed ~/.claude/chrome/chrome-native-host to use stable symlink path (~/.local/bin/claude)
  8. Multiple Chrome full restarts (⌘Q)
  9. Verified claude.ai login with same account as CLI

Expected Behavior

CLI MCP client should connect to the native host socket and establish communication with the Chrome extension.

Related Issues

  • #40174
  • #40494
  • #40637
  • #24593
  • #21371

View original on GitHub ↗

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