[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
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/21301
- https://github.com/anthropics/claude-code/issues/21300
- https://github.com/anthropics/claude-code/issues/21330
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 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
- 2.1.19 (published Jan 23): Chrome integration was working fine
- 2.1.20 (published Jan 27 at 00:39 UTC): Chrome integration broke — discovered this morning when
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_mcp with createIfEmpty: true
Result on 2.1.19: ✅ Success — returned valid tab context:
{
"availableTabs": [{"tabId": 1620920280, "title": "New Tab", "url": "chrome://newtab"}],
"tabGroupId": 934554101
}
Result on 2.1.20: ❌ Fails — MCP server cannot find Windows named pipes (socket discovery in Bw7/getSocketPaths broken).
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/[email protected]
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 shows Creating 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-host PID appears automatically |
Bridge spawns (via enabledMcpjsonServers) |
✅ | Added claude-in-chrome to settings → --claude-in-chrome-mcp PID 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 initialize message |
The disconnect
Confirmed by reading the minified cli.js (line ~6427):
-
Native host (
--chrome-native-host, functione9q) usesRj6()which correctly returns\\.\pipe\claude-mcp-browser-bridge-<username>on win32. Createsnet.createServer(), calls.listen(). Works. -
Bridge (
--claude-in-chrome-mcp, functionr9q) usesxQ4()(getSocketPaths()) for discovery. This function:- Lists
.sockfiles in/tmp/claude-mcp-browser-bridge-<user>/— Unix-only - Returns
path.join(os.tmpdir(), ...)→C:\Users\...\AppData\Local\Temp\claude-mcp-browser-bridge-Gaming pc— filesystem path, not a pipe - Returns
/tmp/claude-mcp-browser-bridge-<user>— Unix path
None of these are the Windows named pipe path. The bridge searches, finds nothing, and gives up.
- Lists
Also disproven
- Space in username (
Gaming pc): Named pipe works fine with spaces. Bothnet.createServerandnet.connecthandle it correctly. - Race condition / pipe squatting: This is a secondary issue. Even with native host pre-running and pipe verified accessible, the bridge still can't find it.
- Service worker dormant: Chrome auto-spawns native host on extension load; native host correctly creates pipe.
- Config/eager loading: Tested both
enabledMcpjsonServers: [](lazy) and["claude-in-chrome"](eager). Same result either way.
Suggested fix
xQ4() / getSocketPaths() needs to include the Windows named pipe:
if (process.platform === 'win32') {
paths.push(`\\\\.\\pipe\\claude-mcp-browser-bridge-${username}`);
}
Or the bridge should also try connecting to socketPath (from Rj6() / the pipe name getter), not just the paths from getSocketPaths().
Environment
- Windows 11 Build 26200.7623
- Claude Code 2.1.29 (npm global)
- Chrome extension 1.0.41
- Node v24.12.0
- Username:
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/[email protected] restores 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:
- Windows 11
- Claude Code v2.1.30
- Chrome extension installed and running
- Native host spawns correctly
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:
npm install -g @anthropic-ai/claude-code
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:
-
Native version: And disable auto updates and downgrade to v2.1.19
-
Switch to the NPM installation 'deprecated' and downgrade to v2.1.19
-
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@latest