Chrome extension native messaging works but MCP tools fail to connect

Resolved 💬 7 comments Opened Feb 11, 2026 by richie305 Closed Mar 27, 2026

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

  1. Install Claude in Chrome extension (v1.0.47)
  2. Start Claude Code with --chrome flag
  3. Verify native messaging config exists at ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json
  4. Attempt to use any MCP tool (e.g., tabs_context_mcp, switch_browser)

What We've Verified ✅

  1. Extension installed and enabled with nativeMessaging permission in manifest
  2. 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/"]
}
``

  1. 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

  1. 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
  1. Chrome fully restarted multiple times after configuration changes
  2. Accounts authenticated - /login run in CLI, re-logged into extension
  3. No Claude Desktop conflicts - Desktop's native host disabled
  4. No version conflicts - All processes running matching 2.1.38
  5. 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

  1. Native messaging layer works - Extension can send messages to native host and receive responses
  2. MCP protocol layer fails - Claude Code's MCP tools cannot establish connection
  3. No listening ports/sockets - MCP server process running but not listening on any detectable ports or Unix sockets
  4. 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.

View original on GitHub ↗

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