Claude-in-Chrome: Extension not connecting despite valid native host and socket
Environment
- Claude Code version: 2.1.71 (native install, macOS Darwin 25.3.0, Apple Silicon)
- Chrome: Latest stable
- Claude Desktop: Also installed
- OS: macOS Sequoia
Problem
All mcp__claude-in-chrome__* tools return "Browser extension is not connected" despite the native messaging host running correctly and the Unix domain socket existing.
What works
- Native messaging host manifest is correctly configured at
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json - The manifest points to Claude Code's binary:
~/.claude/chrome/chrome-native-host - The wrapper script executes:
~/.local/share/claude/versions/2.1.71 --chrome-native-host - Chrome spawns the native host process successfully (confirmed via
ps aux) - Unix socket is created at
/tmp/claude-mcp-browser-bridge-charles/<PID>.sock - Socket accepts connections (confirmed via
nc -U) claude doctorreports all healthy/chromein Claude Code shows a "reconnect extension" button; clicking it causes Chrome to flash (native host respawns)
What doesn't work
- Claude Code's MCP server never connects to the socket
mcp__claude-in-chrome__tabs_context_mcpalways returns "Browser extension is not connected"- Tried: restarting Chrome, restarting Claude Code (both
--resumeand fresh session), killing/respawning the native host, clearing stale sockets
Root cause hypothesis
The Chrome extension hardcodes the native host name com.anthropic.claude_browser_extension (Desktop's host ID), not com.anthropic.claude_code_browser_extension (Code's host ID). We redirected the Desktop manifest to point to Claude Code's binary, which successfully spawns the native host and creates the socket. However, Claude Code's MCP server appears to either:
- Not scan
/tmp/claude-mcp-browser-bridge-charles/for sockets, or - Only scan at startup and miss sockets created afterward, or
- Use a different communication mechanism entirely that we haven't identified
Steps to reproduce
- Have both Claude Desktop and Claude Code installed on macOS
- Install the Claude browser extension in Chrome
- Start Claude Code with
--chrome(or default chrome enabled) - Open Chrome
- Verify native host is running:
ps aux | grep chrome-native-host - Verify socket exists:
ls /tmp/claude-mcp-browser-bridge-charles/ - Call any
mcp__claude-in-chrome__*tool - returns "not connected"
Files checked
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/
com.anthropic.claude_browser_extension.json (redirected to Code's binary)
com.anthropic.claude_code_browser_extension.json (Code's original manifest)
com.anthropic.claude_browser_extension.json.bak (Desktop's original manifest)
~/.claude/chrome/chrome-native-host (wrapper script -> 2.1.71 --chrome-native-host)
/tmp/claude-mcp-browser-bridge-charles/<PID>.sock (created by native host)
Expected behavior
Claude Code's MCP server should connect to the browser extension socket and mcp__claude-in-chrome__tabs_context_mcp should return tab information.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗