Chrome extension: MCP server never connects to native host socket
Description
The claude --chrome MCP server process never connects to the Unix socket created by the Chrome native host, making browser automation tools non-functional in Claude Code. Claude Desktop's Chrome integration works fine with the same extension.
Environment
- Claude Code version: 2.1.80
- OS: macOS Darwin 23.4.0 (Sonoma)
- Chrome extension: Freshly installed from chrome web store
Symptoms
All mcp__claude-in-chrome__* tool calls return:
Browser extension is not connected. Please ensure the Claude browser extension is installed and running...
The MCP server shows as "connected" in /mcp, and tool calls show green dots / "Tabs read" in the UI, but the response content is always the "not connected" error.
Root Cause Investigation
The architecture is:
Chrome Extension → Native Host (stdio) → Unix Socket → MCP Server (claude --chrome)
What works:
- Chrome extension spawns the native host correctly
- Native host creates a Unix socket in
/tmp/claude-mcp-browser-bridge-rob/<pid>.sock - MCP server (
claude --chrome) process starts and is reachable from Claude Code
What doesn't work:
- The MCP server has zero socket connections (verified via
lsof -p <pid> | grep sock— empty output) - It never connects to the native host's socket
Reproduction Steps
- Install Chrome extension
- Start Claude Code
- Run any
mcp__claude-in-chrome__*tool (e.g.tabs_context_mcp) - Observe "Browser extension is not connected" error
- Verify with:
```bash
# Find processes
ps aux | grep "chrome-native-host" # Native host - running
ps aux | grep "claude --chrome" # MCP server - running
# Check native host has socket
ls /tmp/claude-mcp-browser-bridge-rob/ # Socket file exists
# Check MCP server socket connections
lsof -p <mcp_server_pid> | grep sock # EMPTY - this is the bug
```
Additional Notes
- Tried clean reinstall: removed all native host configs,
~/.claude/chrome, socket directory, extension, restarted Chrome and Claude Code. Same result. - Claude Desktop's native host (
/Applications/Claude.app/Contents/Helpers/chrome-native-host) works fine with the same extension - When both Desktop and Code native host configs exist, Chrome always picks Desktop's (
com.anthropic.claude_browser_extensionalphabetically beforecom.anthropic.claude_code_browser_extension), which means Code never gets the connection even when Desktop is quit /mcpreconnect restarts the MCP server process but doesn't fix the socket connection issue
This issue has 13 comments on GitHub. Read the full discussion on GitHub ↗