[Bug] Claude in Chrome MCP bridge fails on Windows - socket discovery doesn't find named pipes
Bug Description
Claude in Chrome browser automation tools always return "Browser extension is not connected" on Windows, even though the native host is running correctly and the named pipe exists. The MCP server cannot discover the native host's pipe.
Platform
- OS: Windows 10 (build 19045)
- Claude Code: 2.1.20 (latest)
- Browser: Chrome (also tested with Brave)
- Extension: Claude in Chrome (fcoeoabgfenejglbffodgkkbkcdhcgfn)
- Node.js: v24.12.0
Root Cause Analysis
The native host (--chrome-native-host, class GvK) creates a named pipe server at \.\pipe\claude-mcp-browser-bridge-<username>.
The MCP server (--claude-in-chrome-mcp, function JvK) uses getSocketPaths() (function Bw7) to discover native host sockets. However, Bw7() only returns file system paths:
- Lists
.sockfiles in/tmp/claude-mcp-browser-bridge-<username>/(Unix-only, doesn't exist on Windows) path.join(os.tmpdir(), 'claude-mcp-browser-bridge-<username>')→C:\Users\<user>\AppData\Local\Temp\claude-mcp-browser-bridge-<username>(a file path, not a pipe)/tmp/claude-mcp-browser-bridge-<username>(Unix path, doesn't exist on Windows)
None of these are the Windows named pipe path \.\pipe\claude-mcp-browser-bridge-<username>.
The socketPath from TO1() correctly returns the Windows named pipe path on win32, but either the MCP server doesn't use it for client-side discovery, or it only attempts connection at startup before the native host exists.
Evidence
All verified during debugging:
| Check | Result |
|-------|--------|
| Registry (HKCU\SOFTWARE\Google\Chrome\NativeMessagingHosts) | Correct: com.anthropic.claude_code_browser_extension only |
| Native host manifest JSON | Correct path and allowed_origins |
| Chrome spawns native host | Verified via wmic (parent PID = chrome.exe) |
| Named pipe exists | \.\pipe\claude-mcp-browser-bridge-jesus present |
| Pipe accepts connections | Tested with PowerShell NamedPipeClientStream and Node.js net.createConnection |
| MCP server responds on pipe | Sent native messaging format message, got {"result":{"content":"Unknown method: undefined"}} |
| Killing native host removes pipe | Pipe disappears → native host owns it (is the server) |
| MCP server still running after pipe removed | Confirmed → MCP server is not the pipe owner |
| Temp directory has bridge socket | No claude-mcp-browser-bridge-* file in %TEMP% or /tmp |
| tabs_context_mcp works | Always returns "Browser extension is not connected" |
Steps to Reproduce
- Install Claude Code 2.1.20 on Windows
- Install Claude in Chrome extension in Chrome
- Run
claude(starts MCP server subprocess) - Open Chrome (extension spawns native host)
- Call any
mcp__claude-in-chrome__*tool → "Browser extension is not connected"
Expected Behavior
The MCP server should discover and connect to the native host's Windows named pipe at \.\pipe\claude-mcp-browser-bridge-<username>.
Suggested Fix
Bw7() (getSocketPaths) should include the Windows named pipe path when process.platform === 'win32':
if (platform === 'win32') {
paths.push(`\\.\pipe\claude-mcp-browser-bridge-${username}`);
}
Or the MCP server should also try connecting to socketPath (from TO1()) when discovering native hosts, not just the paths from getSocketPaths().
Related Issues
- #20298, #20341, #20663, #20779, #20887 (all macOS - this is the Windows equivalent)
Additional Context
- Claude Desktop was never installed on this machine (or was fully uninstalled including registry entries before testing)
- No competing native messaging hosts
- Extensively debugged over 3+ hours including process analysis, pipe protocol testing, and source code review of the minified
cli.js - Dan Guido's X post documents the macOS version of this issue; this is the Windows-specific variant where the socket discovery architecture fundamentally doesn't work with Windows named pipes
30 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Important Update: This is a regression, not a design flaw
The original report incorrectly characterized this as a fundamental Windows architecture issue. Claude in Chrome has been working flawlessly on this Windows machine for months (across Windows 10 and Windows 11 machines).
Timeline
tabs_context_mcpstarted returning "Browser extension is not connected"What this means
The
Bw7()/getSocketPaths()function (or the MCP server's socket discovery logic) was finding the Windows named pipe in previous versions. Something in 2.1.20 (or possibly a recent internal refactor) changed the socket discovery or connection architecture in a way that broke Windows named pipe discovery.The changelog for 2.1.20 does not mention Chrome/MCP/socket changes, so this is likely a side effect of an internal refactor.
Previous version that worked
Unfortunately I cannot confirm the exact last-working version, but 2.1.19 or earlier was functioning correctly on Windows with the Chrome extension.
Suggested investigation
A diff of the socket discovery (
getSocketPaths/Bw7) and MCP bridge connection logic between 2.1.19 and 2.1.20 should reveal the regression.Confirmed: MCP bridge works on 2.1.19, broken in 2.1.20
Environment: Windows 11, Claude Code 2.1.19 (downgraded from 2.1.20)
Test: Called
mcp__claude-in-chrome__tabs_context_mcpwithcreateIfEmpty: trueResult on 2.1.19: ✅ Success — returned valid tab context:
Result on 2.1.20: ❌ Fails — MCP server cannot find Windows named pipes (socket discovery in
Bw7/getSocketPathsbroken).This confirms the regression was introduced in 2.1.20. The Chrome MCP bridge's Windows named pipe discovery stopped working in that release.
Confirmed downgrading to 2.1.19 fixes this issue on Windows 11-latest/Chrome-latest.
Same problem here, on 2.1.20/2.1.21.
Claude Code can't connect to claude in chrome extension on Windows 10/11
Downgrading to 2.1.19 works somehow
Today's update to 2.1.21 did not fix it unfortunately.
2.1.22 still broken. fix for anyone struggling: npm install -g @anthropic-ai/claude-code@2.1.19
2.1.23 still broken.
Claude in Chrome stopped working for me on Windows 11 on both my personal and work laptop after version 2.1.19 - 2 to 3 days ago.
v2.1.25 still broken.
2.1.27 still broken.
Confirmed the issue still exists in v2.1.29. Same error: "Browser extension is not connected."
Independent confirmation on Windows 11 (v2.1.29, Feb 2 2026)
Spent ~4 hours debugging this end-to-end on a Windows 11 machine (Build 26200.7623, username with space:
Gaming pc, Node v24.12.0). Confirming OP's root cause analysis and adding new evidence.Every component works individually
| Component | Status | How verified |
|-----------|--------|-------------|
| Native host creates pipe | ✅ | Spawned manually with
stdio: ['pipe','pipe','pipe']→ stderr showsCreating socket listener: \\.\pipe\claude-mcp-browser-bridge-Gaming pc→Socket server listening for connections|| Pipe accepts connections | ✅ |
net.connect('\\.\pipe\claude-mcp-browser-bridge-Gaming pc')→ CONNECTED || Pipe responds to messages | ✅ | Sent JSON-RPC ping → got
{"result":{"content":"Unknown method: ping"}}|| Chrome auto-spawns native host | ✅ | Launched Chrome →
--chrome-native-hostPID appears automatically || Bridge spawns (via
enabledMcpjsonServers) | ✅ | Addedclaude-in-chrometo settings →--claude-in-chrome-mcpPID appeared || Bridge finds native host | ❌ | Bridge runs but never connects to pipe.
tabs_context_mcp→ "Browser extension is not connected" || Bridge stderr output | None | Spawned manually with piped stdio — zero stderr, zero stdout response to MCP
initializemessage |The disconnect
Confirmed by reading the minified
cli.js(line ~6427):--chrome-native-host, functione9q) usesRj6()which correctly returns\\.\pipe\claude-mcp-browser-bridge-<username>on win32. Createsnet.createServer(), calls.listen(). Works.--claude-in-chrome-mcp, functionr9q) usesxQ4()(getSocketPaths()) for discovery. This function:.sockfiles in/tmp/claude-mcp-browser-bridge-<user>/— Unix-onlypath.join(os.tmpdir(), ...)→C:\Users\...\AppData\Local\Temp\claude-mcp-browser-bridge-Gaming pc— filesystem path, not a pipe/tmp/claude-mcp-browser-bridge-<user>— Unix pathNone of these are the Windows named pipe path. The bridge searches, finds nothing, and gives up.
Also disproven
Gaming pc): Named pipe works fine with spaces. Bothnet.createServerandnet.connecthandle it correctly.enabledMcpjsonServers: [](lazy) and["claude-in-chrome"](eager). Same result either way.Suggested fix
xQ4()/getSocketPaths()needs to include the Windows named pipe:Or the bridge should also try connecting to
socketPath(fromRj6()/ the pipe name getter), not just the paths fromgetSocketPaths().Environment
Gaming pc(with space — irrelevant, pipe works fine)Correction: This is a regression in 2.1.20, not a design flaw
My previous comment characterized this as a fundamental gap in
getSocketPaths(). That's wrong — Chrome MCP was working on Windows prior to 2.1.20. As @Leoezlo and @ajohnclark confirmed, downgrading to 2.1.19 restores full functionality.The
getSocketPaths()/xQ4()function was correctly finding Windows named pipes before 2.1.20. Something in that release changed the socket discovery or connection logic in a way that broke Windows named pipe discovery. The 2.1.20 changelog doesn't mention Chrome/MCP/socket changes, so this is likely a side effect of an internal refactor.Fix path: A diff of the socket discovery and MCP bridge connection logic between 2.1.19 and 2.1.20 should reveal the regression.
Workaround for anyone stuck:
npm install -g @anthropic-ai/claude-code@2.1.19restores Chrome MCP on Windows.I found the root cause and a fix for this. The issue is in
xQ4()(getSocketPaths) in cli.js - it doesn't include the Windows Named Pipe path\.\pipe\claude-mcp-browser-bridge-<username>in the socket search list.One-line fix and full details here: #22635
Patch/Gist: https://gist.github.com/alex2zimmermann-ux/c4532b4f8b94640c6cde81c7f7552d8e
Still broken in v2.1.30
Just tested the newly released v2.1.30 — the bug persists.
mcp__claude-in-chrome__tabs_context_mcp
→ "Browser extension is not connected"
Environment:
This is now 8 consecutive broken versions (2.1.20 → 2.1.30). The regression has been present for over a week.
downgrading to v2.1.19 still works fine. The fix should be straightforward — just add the Windows named pipe path to the socket
discovery function:
if (platform === 'win32') {
paths.push(
\\\\.\\pipe\\claude-mcp-browser-bridge-${username});}
Any ETA on a fix? This is blocking all Windows users from using browser automation.
The fix works on all versions including 2.1.30+ - here's how to apply it:
You need to use the npm version (not the standalone Windows installer) so you can modify
cli.js:If you used the standalone installer, uninstall it first and switch to npm.
Then apply the one-line fix from my gist: https://gist.github.com/alex2zimmermann-ux/c4532b4f8b94640c6cde81c7f7552d8e
Tested yesterday on a fresh Windows machine with the latest version - works perfectly.
Confirmed the issue still exists in v2.1.31. Same error: "Browser extension is not connected." On Windows 11 using binary version.
Confirmed the issue still exists in v2.1.32. Same error: "Browser extension is not connected." On Windows 11 using binary version.
I really hope this gets fixed soon in the Native Windows version soon.
The options to get browser functionality back are:
1) Native version: And disable auto updates and downgrade to v2.1.19
2) Switch to the NPM installation 'deprecated' and downgrade to v2.1.19
3) Switch to the NPM installation 'deprecated' and manually patch every release version.
I've just moved on to chromedev/disabled chrome by claude to be able to use Opus 4.6.
claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latestWorking workaround: patch
getSocketPaths()in cli.jsI've been hitting this same bug and found a workaround that fixes it. The root cause is exactly as described in this issue —
getSocketPaths()never includes the Windows named pipe path (\\.\pipe\claude-mcp-browser-bridge-<username>), even though the native host creates it correctly.The fix
Patch the socket discovery function in
cli.jsto append the Windows named pipe path to its search list. After patching, the MCP server finds the native host immediately and Claude in Chrome works perfectly.Quick manual patch
cli.js:@anthropic-ai/claude-code/cli.jsgetSocketPaths/ socket discovery function (in minified code, search forclaude-mcp-browser-bridge-— the function that builds an array of socket paths).returnstatement, add a block that checks forwin32and pushes the named pipe path:\\\\.\\pipe\\claude-mcp-browser-bridge-${username};Automated patch script
Save this as
patch_cli.jsand run withnode patch_cli.js. Re-run after every Claude Code update since updates overwritecli.js.Environment
Confirmed working — all
mcp__claude-in-chrome__*tools connect and respond after patching.---
Additional troubleshooting notes
If you're still stuck after patching
cli.js, check these:1. Native host bat file using Bun (
claude.exe) instead of NodeEarlier versions of the native host bat file ran
claude.exe --chrome-native-host, which uses Bun internally. Bun panics when trying to create Windows named pipes. The Claude Code team has since fixed this — the bat file should now usenode cli.js --chrome-native-host. If yours still referencesclaude.exe, update it:Open
chrome-native-host.bat(path is in the native messaging host manifest JSON atHKCU\SOFTWARE\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extension) and ensure it looks like:You can find your global node_modules path with
npm root -g.2. Extension service worker caching stale "not connected" state
After applying the patch, the Chrome extension's service worker may still report "Browser extension is not connected" because it cached the previous failed ping/pong result. To fix:
chrome://extensionsThis resets the service worker and forces a fresh connection attempt through the now-patched pipe discovery.
Additional compounding bug: Claude Desktop registry conflict
In addition to the
getSocketPaths()bug described above, there is a second issue that affects users who have (or previously had) Claude Desktop installed alongside Claude Code on Windows.Problem
Both apps register Chrome native messaging hosts:
com.anthropic.claude_browser_extensioncom.anthropic.claude_code_browser_extensionThe Chrome extension is hardcoded to connect to
com.anthropic.claude_browser_extension(Desktop's host) first. Even after applying thegetSocketPaths()patch, the extension will still route to Claude Desktop's native host instead of Claude Code's.Registry entries
Fix
If you don't use Claude Desktop, remove its registry entry:
Then restart Chrome.
Summary
To fix Claude in Chrome on Windows (v2.1.20+), both fixes are needed:
getSocketPaths()incli.jsto include the Windows named pipe path (as described above)Confirmed working on Windows with Claude Code v2.1.34 and Chrome extension v1.0.45.
what is completly funny is that they break this thing on every new version
now on 2.1.37 still doesn't work
what I do :
<img width="843" height="253" alt="Image" src="https://github.com/user-attachments/assets/951724f5-c6ae-463a-81e2-37ebc905dd47" />
what is incredibily annoying is that they do not use their own tool to fix it permanently
Update for v2.1.38: Named Pipe fix is in, but a NEW issue breaks Chrome on Windows
The original
getSocketPaths()Named Pipe bug from v2.1.20 has been fixed in v2.1.38. The functionTn4()(getSocketPaths) now correctly returns\.\pipe\claude-mcp-browser-bridge-<username>on Windows with an early return.However, Chrome in Windows is STILL broken in v2.1.38 due to a different root cause: the
tengu_copper_bridgefeature flag.New Root Cause (v2.1.38)
When
tengu_copper_bridgeistruein~/.claude.json(undercachedGrowthBookFeatures), the bridge client selection inkHq()takes a different code path:The function
QHz()checks the flag and returnswss://bridge.claudeusercontent.com, which setsbridgeConfig. This makeskHq()use the WebSocket cloud bridge client (auA) instead of the local Socket Pool (NHq). The local Named Pipe (which works perfectly) is completely ignored.The cloud WebSocket bridge then fails to connect/authenticate, resulting in the same "Browser extension is not connected" error.
Verification
\.\pipe\claude-mcp-browser-bridge-<username>exists and accepts connections ✅--chrome-native-host) creates the pipe and listens ✅net.createConnection('\.\pipe\claude-mcp-browser-bridge-<username>')succeeds ✅--claude-in-chrome-mcp) starts and connects to Claude Code via stdio ✅Workaround
Edit
~/.claude.jsonand set:Then restart Claude Code. The bridge will fall back to the local Socket Pool, find the Named Pipe, and connect successfully.
Note: This flag is set server-side via GrowthBook feature flags, so it may get re-enabled on next startup. A persistent fix would require Anthropic to either fix the cloud bridge on Windows or exclude Windows users from this flag.
Environment
Claude in Chrome is working for me on Windows 11 with Claude Code v2.1.38 (native) in both Edge and Chrome with the Claude Extension installed (from https://chromewebstore.google.com/detail/claude/fcoeoabgfenejglbffodgkkbkcdhcgfn)
Its working with both "tengu_copper_bridge": true or false
Environment
Windows 11, Claude Code v2.1.38 (native)
Chrome extension v1.0.47
Please note a browser window must be launched prior to asking Claude to use its browser tool.
I have the below in my global CALUDE.md for ease of use:
For me 2.1.38 did not work.
Only way i could make it work was to completely uninstall claude code and claude desktop, deleted all registry entries (using find in regex for anthropic) and then fresh install of claude code
The issue is 100% related to claude desktop or cowork which makes registry entries
Adding my experience to this issue. Windows 11 Pro (upgraded from Home), fresh MSIX install via winget, CoworkVMService confirmed running, chrome-native-host process confirmed running, registry entry pointing to correct ChromeNativeHost JSON file. Cowork only shows tab closing and file upload tools — no Chrome browsing tools. Claude in Chrome connector panel shows 'Install' despite extension being active. Support ticket opened 3/22, no response yet. Debug logs submitted via Cowork interface.
Still reproducible on v2.1.92 (2026-04-05)
Environment: Windows 11 Pro 10.0.26200, Claude Code v2.1.92 (npm), Chrome extension v1.0.66
Reproduction: Japanese username containing fullwidth space (U+3000). Named pipe
\.\pipe\claude-mcp-browser-bridge-{user}is created by native host, but MCP client cannot connect —tabs_context_mcpreturns "Browser extension is not connected."Diagnostic evidence:
C:\ProgramData\ClaudeCode\claude-code\cli.js)Get-ChildItem \.\pipe\)Root cause (confirmed via #23828 analysis):
getSocketPaths()returns filesystem paths (C:\Users\...\AppData\Local\Temp\...) instead of Named Pipe paths (\.\pipe\...) — different OS namespaces on WindowsFix status:
Request: Could the team review the
getSocketPaths()fix for Windows Named Pipe support? This affects all Windows users with non-ASCII or space-containing usernames. The root cause analysis and proposed fixes are well-documented in #23828.Update 2026-04-12: RESOLVED on v2.1.101 with bridge factory patch
Following my previous report on v2.1.92 (2026-04-05), I performed a deeper investigation on v2.1.101 and found the root cause — plus a working fix confirmed with
tabs_context_mcpreturning valid results.Environment
Root Cause:
_91()factory unconditionally selects cloud bridgeIn cli.js v2.1.101 (around offset 720109), the bridge connector factory is:
When the MCP server context is constructed (around offset 11937076), both
bridgeConfigandgetSocketPaths: Gm4are set. The ternary checksbridgeConfigfirst → cloud WebSocket bridge (wss://bridge.claudeusercontent.com) is always selected → fails on Windows → "Browser extension is not connected".This confirms @robertmonroe's analysis in #23828 for v2.1.96 — same architectural issue with reshuffled minified symbols.
Key Findings
1.
tengu_copper_bridgeflag completely removed from codebaseThe workaround from #22635 (setting
tengu_copper_bridge: falsein~/.claude.json) no longer works. Full-text search of v2.1.101's cli.js returns zero matches fortengu_copper_bridgeorcopper. Furthermore, even when set tofalseclient-side, the value is overwritten totrueon restart by GrowthBook.2.
getSocketPaths(Gm4) correctly returns Named Pipe on win32The v2.1.38 fix (#22635) is present in v2.1.101. Local socket discovery works — it's just bypassed by the factory.
3. Named Pipe works correctly with non-ASCII username
Verified via PowerShell
NamedPipeClientStream— the pipe exists and accepts connections, even with U+3000 in the name. Thefl1()function usesos.userInfo().usernamedirectly, matching the native host side. Username sanitization mismatch (previously suspected) is NOT the issue.4. Chrome extension v1.0.66 Service Worker can break on toggle
After toggling the extension off→on,
chrome://extensions/displayedFailed to load the script unexpectedlyonservice-worker.ts-H0DVM1LS.js:0. Fix: uninstall and reinstall the extension from Chrome Web Store.Working Fix: factory priority swap (52-byte in-place patch)
Same-length substitution — prefers
getSocketPaths(local Named Pipe) when available, falls back tobridgeConfigotherwise. Non-Windows behavior unchanged sinceGm4()returns pipe paths only on win32.Result:
tabs_context_mcpsucceeded (tabGroupId returned).Automation via SessionStart Hook
Since cli.js is replaced on every Claude Code update, I created a SessionStart hook that:
npm root -g/q\.bridgeConfig\?(\w+)\(q\):q\.getSocketPaths\?(\w+)\(q\):(\w+)\(q\)/~/.claude/cache/chrome-fix-status.jsonThis is essentially the same approach as @robertmonroe's plugin in #23828, independently derived.
Additional prerequisites for non-ASCII username environments
C:\ProgramData\ClaudeCode\(Chrome cannot execute bat files via paths containing non-ASCII characters)Related issues
the seam isn't just adding the win32 pipe path to getSocketPaths, it's that the whole discovery model is unix-shaped. on linux/mac the bridge enumerates .sock files in a tmpdir because UDS is a filesystem object you can readdir. windows named pipes live in their own namespace (\Device\NamedPipe), no fs.readdir equivalent through node stdlib, you'd have to NtQueryDirectoryFile against the pipe device or hardcode the name pattern. patching Bw7 with the username-shaped path only works because the host name is deterministic. the moment two hosts coexist (Desktop + Code side by side, or multi-user RDP, or a stale orphan from a crashed session), discovery silently grabs the wrong one and the failure mode looks identical to 'not connected'.