[BUG] aude in Chrome browser extension not connecting from Claude Code on Windows despite correct configuration
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Claude in Chrome MCP browser tools consistently return "Browser extension is not connected" when called from Claude Code, despite all configuration
appearing correct.
/chrome shows:
- Status: Enabled
- Extension: Installed
But all MCP tool calls (e.g., tabs_context_mcp) fail with:
"Browser extension is not connected. Please ensure the Claude browser extension is installed and running"
Tried: uninstall/reinstall of extension, removing and recreating native messaging host files and registry keys, restarting Chrome multiple times, running
/chrome > "Reconnect extension". Nothing resolves the connection.
What Should Happen?
After running /chrome and confirming Status: Enabled and Extension: Installed, MCP browser tools like tabs_context_mcp should successfully connect to Chrome and return tab information.
Error Messages/Logs
Browser extension is not connected. Please ensure the Claude browser extension is installed and running (https://claude.ai/chrome), and that you are logged
into claude.ai with the same account as Claude Code. If this is your first time connecting to Chrome, you may need to restart Chrome for the installation to
take effect.
Steps to Reproduce
Steps to Reproduce:
- Install Claude in Chrome extension (v1.0.45) from Chrome Web Store
- Verify native messaging host is registered:
- Registry: HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extension
- Points to: C:\Users\<user>\AppData\Roaming\Claude Code\ChromeNativeHost\com.anthropic.claude_code_browser_extension.json
- JSON manifest points to: C:\Users\<user>\.claude\chrome\chrome-native-host.bat
- Bat file calls: claude.exe --chrome-native-host
- All files exist and are valid
- Open Chrome
- In Claude Code terminal, run
/chrome - Observe Status: Enabled, Extension: Installed
- Select "Reconnect extension"
- Ask Claude to call
tabs_context_mcp - Error: "Browser extension is not connected"
Also tried:
- Complete uninstall (removed extension, bat file, JSON manifest, registry keys) and reinstall from scratch
- Multiple Chrome restarts
- Verified accounts match between claude.ai and Claude Code
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.32 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
- Google Chrome (not Edge/Brave/Arc)
- Chrome extension version: 1.0.45
- Claude account: confirmed same account on both Claude Code and Chrome extension
- Native messaging host extension ID matches: chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/
- /chrome command UI renders correctly with all options, just the actual MCP bridge never establishes
13 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Same issue here!
Confirmed Bun panic crash on Windows 11 - Claude Code v2.1.37
Environment
~/.local/bin/claude.exe)fcoeoabgfenejglbffodgkkbkcdhcgfnSymptoms
/mcpshows Claude-in-chrome MCP Server as connected with 17 toolsHKCU\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extensionis correctly setchrome-native-host.batRoot cause: Bun panic when Chrome launches native host
When Chrome triggers
chrome.runtime.connectNative("com.anthropic.claude_code_browser_extension"), Chrome reportsruntime.lastError: Native host has exited.Captured stderr from the native host (by redirecting stderr to a log file in the bat wrapper):
Bun crash report: https://bun.report/1.3.9/e_2d5628dbEkgggC+s1oU+vvkOu8t/uBysi5uB__qt24tCA0eNrzzCtJLcpLzFFILC5OLSrJzM9TSEvMzCktSgUAiSkKPg
Debugging steps taken
com.anthropic.claude_browser_extension) which pointed to a non-existent binary--claude-in-chrome-mcpzombie processes and restarted sessionconnectNative()Additional note
Also had Claude Desktop (
com.anthropic.claude_browser_extension) registered with a broken path pointing toC:\Users\...\AnthropicClaude\app-1.1.1520\resources\chrome-native-host.exewhich doesn't exist (directory only containssquirrel.exe). The same extension ID appeared in both manifests'allowed_origins, though this was not the root cause.Update: Resolved with manual patch
Correction
In my previous comment, all paths containing a specific username should be read as generic Windows paths (e.g.,
C:\Users\%USERNAME%\.local\bin\claude.exe,\\.\pipe\claude-mcp-browser-bridge-%USERNAME%).Resolution
After deeper investigation, the root cause is actually two compounding bugs as described in #23526 by @insert0name:
Internal assertion failurewhen creating Windows named pipes via--chrome-native-host.getSocketPaths()missing Windows pipe — Even if the native host ran without crashing, the MCP server (--claude-in-chrome-mcp) never discovers the Windows named pipe (\\.\pipe\claude-mcp-browser-bridge-%USERNAME%) becausegetSocketPaths()only returns Unix-style paths.Workaround applied (confirmed working)
Following the approach from #23526 and the patch by @chriscrosstalk:
``
``npm install -g @anthropic-ai/claude-code
cli.jsto add the Windows named pipe togetSocketPaths()(function minified ascc4in v2.1.37):``
jsreturn A// Added before
in getSocketPaths():\\\\.\\pipe\\${K}if(process.platform==="win32"){let P=
;if(!A.includes(P))A.push(P)}
``chrome-native-host.batto use Node.js instead of the crashing Bun binary:``
bat
``@echo off
"C:\path\to\node.exe" "C:\path\to\node_modules\@anthropic-ai\claude-code\cli.js" --chrome-native-host
After these changes, Chrome MCP integration works correctly on Windows 11 with Claude Code v2.1.37.
Credits
getSocketPaths()fix in #23526---
This issue was diagnosed, debugged, and reported by Claude (Opus 4.6) via Claude Code CLI.
Aqui ainda persiste o problema!
https://github.com/anthropics/claude-code/issues/23828
https://github.com/anthropics/claude-code/issues/23082
Comment for Related Issues (#23539, #23082, #21279, #20862)
---
Additional Root Cause: Windows Username Spaces
I've discovered a third independent bug affecting Windows users with spaces in their usernames (e.g., "John Smith", "Dennis Bosma").
The Problem
Pipe name mismatch:
This causes MCP tools to fail with "Browser extension is not connected" even when:
Why This Matters
This bug persists EVEN AFTER applying existing workarounds:
This explains why some users report success with the Node.js + getSocketPaths() patch, but others still fail — it depends on whether they have spaces in their Windows username.
The Fix (One Line)
Add username sanitization in both native host and MCP client:
Test Evidence
Direct pipe connection test confirms the pipe with space exists:
But MCP tools search for the sanitized version (without space) and fail.
Affected Users
Full Diagnosis
See Issue #23828 for comprehensive diagnosis, test evidence, and proposed fixes.
---
TL;DR: If you have spaces in your Windows username, the existing Bun + getSocketPaths() fixes won't help. You need username sanitization in the pipe name generation.
Update: Confirmed fix for v2.1.37
See #23828 (comment) for the complete ESM-safe, version-resilient fix. Key addition since last update:
require("os")throws in v2.1.37 because cli.js is"type": "module". Useprocess.env.USERNAMEinstead.getSocketPathsby anchor string (claude-mcp-browser-bridge), not minified function name. Survives across versions.Update: Published the complete fix (all 3 bugs + username space handling) as an open-source SessionStart hook:
Repo: bosmadev/claude — see
scripts/fix-chrome-native-host.pyand README > Chrome MCP FixAuto-repairs on every launch: BAT rewrite (Bun→Node), pipe patch (getSocketPaths), bridge flag disable, USERNAME space sanitization. Content-based pattern matching survives minification changes. Still needed as of v2.1.39.
Confirmed fix — Windows 11, Claude Code v2.1.44, Chrome Extension v1.0.52
Root Cause
The feature flag
tengu_copper_bridgein~/.claude.json(undercachedGrowthBookFeatures) was set totrue. When enabled, Claude Code routes MCP traffic through a websocket bridge (wss://bridge.claudeusercontent.com) instead of the local Windows named pipe (\\.\pipe\claude-mcp-browser-bridge-USERNAME). The websocket bridge fails silently on Windows — the native host starts and handles Chrome's ping/status, but Claude Code's MCP client never connects to the pipe.Symptom:
/chromeshows Status: Enabled, Extension: Installed, but all MCP tool calls return "Browser extension is not connected."Fix
C:\Users\<USERNAME>\.claude.json"cachedGrowthBookFeatures"section"tengu_copper_bridge": trueto"tengu_copper_bridge": false/chrometo connectAdditional Setup (may be required)
If the flag fix alone doesn't resolve it, ensure native messaging is properly configured:
~/.claude/chrome/com.anthropic.claude_browser_extension.json— must contain correct path to the.batfile and the extension'sallowed_originsHKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_browser_extension— must point to the manifest JSONnode.exe, not Bun — Bun crashes on Windows stdin pipes (see #23828)Debugging
Check
~/.claude/chrome/debug.log. A working connection shows:If you see "connected" followed immediately by "disconnected" with no tool requests, the
tengu_copper_bridgeflag is stilltrue.Note
The Chrome window that briefly opens and closes when running
/chromeis normal behaviour — the connection happens via the background native messaging host, not the popup window. Don't let that mislead your debugging.Additional finding:
tengu_copper_bridgeflag makes native host setup irrelevantClosing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.