Chrome Extension: EADDRINUSE - Native Host and MCP Server both try to create pipe listener
Bug Description
The Chrome extension cannot connect to Claude Code because both the MCP server process and the Native Host process attempt to create a listener on the same Named Pipe, resulting in an EADDRINUSE error.
Environment
- OS: Windows 10/11
- Claude Code Version: Latest (installed via npm)
- Chrome Extension Version: 1.0.41
- Extension ID: fcoeoabgfenejglbffodgkkbkcdhcgfn
Steps to Reproduce
- Start Claude Code in terminal
- Open Chrome with the Claude extension installed
- Try to use any
mcp__claude-in-chrome__*tool (e.g.,tabs_context_mcp) - Extension reports "Browser extension is not connected"
Root Cause Analysis
When Claude Code starts, two Node processes are created:
| Process | Flag | Purpose |
|---------|------|---------|
| node.exe | --dangerously-skip-permissions | Main CLI |
| node.exe | --claude-in-chrome-mcp | MCP Server for Chrome |
The MCP server creates a listener on:
\.\pipe\claude-mcp-browser-bridge-<username>
When Chrome tries to communicate with Claude Code, it spawns the Native Host via the batch script, which runs:
node cli.js --chrome-native-host
The problem: The --chrome-native-host process ALSO tries to create a listener on the same pipe instead of connecting as a client:
[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \.\pipe\claude-mcp-browser-bridge-andre
[Claude Chrome Native Host] Socket server error: Error: listen EADDRINUSE: address already in use \.\pipe\claude-mcp-browser-bridge-andre
Expected Behavior
The Native Host (--chrome-native-host) should connect as a client to the existing MCP server, not create its own listener.
Actual Behavior
Both processes try to create a server/listener on the same pipe, causing EADDRINUSE.
Files Involved
Native Messaging Host Config:%LOCALAPPDATA%\Google\Chrome\User Data\NativeMessagingHosts\com.anthropic.claude_code_browser_extension.json
{
"name": "com.anthropic.claude_code_browser_extension",
"description": "Claude Code Chrome Extension Native Host",
"path": "C:\Users\<user>\.claude\chrome\chrome-native-host.bat",
"type": "stdio",
"allowed_origins": [
"chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/"
]
}
Native Host Batch:%USERPROFILE%\.claude\chrome\chrome-native-host.bat
@echo off
"C:\Program Files\nodejs\node.exe" "...\cli.js" --chrome-native-host
Workaround
None found yet.
---
Reported via Claude Code
21 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Update: This may be related to Chrome 144 update.
User reports it was working before today's Chrome update. Current Chrome version: 144.0.7559.98
Issue #21330 also reports Chrome 144.0.7559.97 - same version branch.
Additional context:
The extension was working before the Chrome 144 update today (2026-01-29). This strongly suggests Chrome 144 broke something in the Native Messaging flow.
Potential workaround: Downgrade Chrome to version 143.x (not yet tested)
Chrome 144 changes to investigate:
This appears to be related to:
Moving details to #21512.
If it is a Chrome issue, then why did it not break Cursor? Is their implementation more robust?
You're right - Chrome 144 is not the cause. I tested downgrading to Chrome 143 and it didn't help.
The root cause is an architecture bug in Claude Code itself: the native host (
--chrome-native-host) tries to create a pipe listener instead of connecting as a client to the existing MCP server.Workaround: Downgrade to Claude Code 2.1.19 via
npm install -g @anthropic-ai/claude-code@2.1.19Root Cause Found & Fix Identified
After extensive analysis of the minified
cli.jsbetween versions 2.1.19 (working) and 2.1.29 (broken), I found the root cause:The Bug
In v2.1.20, a multi-socket architecture was introduced. Two functions handle socket paths:
Rj6()(Native Host) - Returns correct Windows named pipe:xQ4()(MCP Server socket pool) - MISSING Windows support:Result on Windows
\\.\pipe\claude-mcp-browser-bridge-user✓C:\Users\...\Temp\...✗ ENOENTThe Fix
Add Windows check to
xQ4():Verified Fix
I patched the minified
cli.jsand confirmed the connection works:Affected Versions
The source file to fix is likely
packages/cli/src/chrome-extension/socket-bridge.tsor similar - look forgetSocketPaths()orgetAvailableSocketPaths().Great work @kimchi-developer, thank you.
thank you. i have put claude code to repair himself. this is plan he made which worked. thank you @kimchi-developer
"# Fix Chrome MCP Server on Windows 11
Problem
Chrome MCP server doesn't work on Windows 11 - function
xp4()in cli.js returns Unix socket paths but misses Windows named pipe.File to Patch
C:\Users\myusername\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\cli.jsFix
Add Windows check at start of function
xp4():Find:
function xp4(){let A=[],q=bF1()Replace:
function xp4(){if(IEY()==="win32")return[\\\\\.\\pipe\\${FEY()}\];let A=[],q=bF1()Steps
"
It's working with 2.1.34, now we need this fix to be official, I don't want to patch at each update
can we update to latest and it would still work? I have intentionally stayed at 2.1.19 for now
oh I still see latest update as 2.1.32, it is fixed in 2.1.34?
it is not for me. 2.1.34 still busted
Thx @kimchi-developer
Because I had the native install I had uninstall the native, reinstall via NPM, then do the patch from Kimchi and it worked.
Amazed that nobody from anthropic has picked this up yet. Big impact bug, trivial fix.
2.1.37, windows 11.
Claude for Chrome still not working with Claude Code CLI.
@vinch00 Same setup here (2.1.37, Win11) - got it working with the manual patch from #21512. The root cause and patch instructions are documented there. The fix needs to be reapplied after each update.
Yeah, too bad the fix doesn't apply to the Claude executable on Windows which is required for Claude Cowork. This makes Cowork basically useless on Windows....
For what it's worth, onUI is a browser annotation extension with an MCP server that uses a different architecture — it runs via
npxas a stdio-based MCP server rather than a named pipe, which sidesteps the native host port conflict entirely. Might be a useful reference for how other extensions handle the MCP connection.Closing 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.