Chrome extension native messaging works but MCP tools fail to connect
Summary
Claude in Chrome extension's native messaging infrastructure is functional (manual ping/pong succeeds), but Claude Code MCP tools consistently fail to establish connection with error: \"Browser extension is not connected.\"
Environment
- OS: macOS (Darwin 25.2.0)
- Claude Code Version: 2.1.38
- Chrome Extension Version: 1.0.47
- Extension ID: fcoeoabgfenejglbffodgkkbkcdhcgfn
- Started with:
claude --chrome --dangerously-skip-permissions
Steps to Reproduce
- Install Claude in Chrome extension (v1.0.47)
- Start Claude Code with
--chromeflag - Verify native messaging config exists at
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json - Attempt to use any MCP tool (e.g.,
tabs_context_mcp,switch_browser)
What We've Verified ✅
- Extension installed and enabled with
nativeMessagingpermission in manifest - Native host config file exists with correct structure:
``json``
{
"name": "com.anthropic.claude_code_browser_extension",
"path": "/Users/davidrichie/.claude/chrome/chrome-native-host",
"type": "stdio",
"allowed_origins": ["chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/"]
}
- Native messaging works - Manual test from extension service worker:
``javascript``
chrome.runtime.sendNativeMessage('com.anthropic.claude_code_browser_extension', {type: 'ping'}, response => {
console.log(response); // {type: 'pong', timestamp: 1770809806782}
});
✅ This succeeded - native host responded correctly
- Processes running:
- Main:
claude --chrome --dangerously-skip-permissions(PID 8505) - Native host:
/usr/local/share/claude/versions/2.1.38 --chrome-native-host - MCP server:
/usr/local/share/claude/versions/2.1.38 --claude-in-chrome-mcp
- Chrome fully restarted multiple times after configuration changes
- Accounts authenticated -
/loginrun in CLI, re-logged into extension - No Claude Desktop conflicts - Desktop's native host disabled
- No version conflicts - All processes running matching 2.1.38
- MCP server accepts messages but rejects unknown types (responds with
{type: 'error', error: 'Unknown message type: init'})
Expected Behavior
MCP tools like tabs_context_mcp should connect to the Chrome extension and enable browser automation.
Actual Behavior
All MCP tools fail with:
Browser extension is not connected. Please ensure the Claude browser extension is installed and running...
Diagnostic Findings
- Native messaging layer works - Extension can send messages to native host and receive responses
- MCP protocol layer fails - Claude Code's MCP tools cannot establish connection
- No listening ports/sockets - MCP server process running but not listening on any detectable ports or Unix sockets
- No clear error messages - Extension service worker console shows no native messaging errors
Hypothesis
The low-level native messaging infrastructure is functional, but the MCP protocol layer that sits on top of it is not successfully establishing bidirectional communication. This suggests either:
- Missing initialization/handshake step
- MCP tools expecting different transport mechanism
- Bug in connection registration/discovery
- Incomplete feature implementation
Additional Context
We exhaustively troubleshooted for ~2 hours, including:
- Killing conflicting processes
- Verifying permissions and file attributes
- Testing manual native messaging
- Checking for Claude Desktop conflicts
- Re-authenticating both sides
- Multiple Chrome restarts
The fact that manual sendNativeMessage works proves all system-level configuration is correct, but something in the MCP layer prevents the tools from connecting.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗