--chrome flag: MCP client never connects to Chrome native host socket

Resolved 💬 4 comments Opened Apr 13, 2026 by kcchien Closed May 5, 2026

Environment

  • Claude Code 2.1.104
  • macOS Darwin 25.3.0 (Apple Silicon)
  • Chrome extension v1.0.66 (ID: fcoeoabgfenejglbffodgkkbkcdhcgfn)

Symptom

All mcp__claude-in-chrome__* tool calls return "Browser extension is not connected", despite the Chrome extension being fully functional.

Root Cause (diagnosed)

Claude Code with --chrome registers Chrome MCP tools but never opens a connection to the native host socket. Verified via lsof -p <pid>: zero connections to /tmp/claude-mcp-browser-bridge-<user>/*.sock.

Evidence that Chrome side works correctly

  1. Chrome spawns native host successfully (parent PID = Chrome)
  2. Native host creates socket at /tmp/claude-mcp-browser-bridge-kc/<pid>.sock
  3. Manual execute_tool call via the socket returns valid results:
# Direct socket test (length-prefixed protocol)
send({"method": "execute_tool", "params": {"tool": "tabs_context_mcp", "args": {"createIfEmpty": true}}})
# Response: {"result": {"content": [{"type": "text", "text": "{\"availableTabs\":[...]}"}]}}
  1. Console errors: zero

Repro steps

  1. claude --chrome (or claude --dangerously-skip-permissions --chrome)
  2. Open Chrome with Claude extension enabled and side panel open
  3. Confirm native host is running: pgrep -fl chrome-native-host → shows process with Chrome as parent
  4. Confirm socket exists: ls /tmp/claude-mcp-browser-bridge-$USER/ → shows <pid>.sock
  5. Call any mcp__claude-in-chrome__* tool → returns "Browser extension is not connected"
  6. lsof -p <claude-pid> | grep bridgeempty (no socket connection from Claude Code)
  7. Meanwhile, manual socket connection via Python works perfectly (see evidence above)

Additional context

  • Native host config files are correctly placed in ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/
  • Both com.anthropic.claude_browser_extension.json and com.anthropic.claude_code_browser_extension.json exist with correct paths
  • Native host responds correctly to Chrome's ping/pong handshake (verified via manual length-prefixed stdin test)
  • The issue persists across session restarts, Chrome restarts, and killing/restarting the native host process

View original on GitHub ↗

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