Chrome extension always connects to Desktop native host, ignoring Claude Code native host on Windows
When both Claude Desktop (Microsoft Store) and Claude Code CLI are installed on Windows, the Chrome extension (v1.0.66) always connects to the Desktop native messaging host and never falls back to the Claude
Code one. This makes all mcp__claude-in-chrome__* tools permanently unavailable from Claude Code CLI.
Root cause (from source analysis):
In service-worker.ts, the native host connection loop tries hosts in a fixed order:
const s = [
{name: "com.anthropic.claude_browser_extension", label: "Desktop"}, // tried FIRST
{name: "com.anthropic.claude_code_browser_extension", label: "Claude Code"} // never reached
];
The Desktop host (com.anthropic.claude_browser_extension) responds to ping/pong, so the extension binds to it and stops iterating. However, this host does not establish the MCP bridge pipe
(\\.\pipe\claude-mcp-browser-bridge-<username>) that Claude Code CLI expects. As a result, mcpConnected stays false and all browser tools fail with "Browser extension is not connected."
Diagnostic evidence:
- Extension ID matches manifest: fcoeoabgfenejglbffodgkkbkcdhcgfn ✓
- Registry keys exist for both hosts ✓
- Both native host executables exist and are functional ✓
- Claude Code native host (chrome-native-host.bat → claude.exe --chrome-native-host) creates the pipe correctly when launched manually ✓
- Named pipe \\.\pipe\claude-mcp-browser-bridge-<user> is never created during normal operation → Chrome never launches the Claude Code host
Environment:
- Windows 11 Pro 10.0.26200
- Claude Code CLI: 2.1.90
- Chrome extension: 1.0.66
- Claude Desktop: installed via Microsoft Store (Claude_pzs8sxrjxfjjc)
- Chrome: latest stable
Suggested fix:
Either:
- Connect to both native hosts simultaneously (Desktop for Desktop features, Claude Code for MCP bridge)
- Or prioritize claude_code_browser_extension when the CLI session is active
- Or expose a user setting to choose which host takes priority
Workaround:
Removing the Desktop host registry key forces the extension to use Claude Code's host:
reg delete "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_browser_extension" /f
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗