getSocketPaths() missing Windows named pipe path — Chrome extension never connects on Windows
Bug
The getSocketPaths() function (minified as $c4 in cli.js) does not include the Windows named pipe path (\.\pipe\claude-mcp-browser-bridge-{username}), causing the MCP server (--claude-in-chrome-mcp) to never discover the native host's socket on Windows.
Root Cause
getSocketPaths() returns:
{homedir}/claude-mcp-browser-bridge-{username}(a file path, not a named pipe)/tmp/claude-mcp-browser-bridge-{username}(Unix path, doesn't exist on Windows)
Meanwhile getSocketPath() (singular) correctly returns \.\pipe\claude-mcp-browser-bridge-{username} on Windows, but the SocketBridgePool class in refreshClients() only calls getSocketPaths() (plural) to discover available sockets — it never uses the socketPath config property.
Impact
Chrome integration is completely broken on Windows. The native host starts, creates the pipe, and Chrome connects via native messaging — but the MCP server never connects to the pipe because it doesn't know the pipe exists.
Fix
Add the Windows named pipe to getSocketPaths():
// In getSocketPaths(), before `return paths`:
if (process.platform === "win32") {
const pipePath = "\\.\pipe\\" + baseName;
if (!paths.includes(pipePath)) paths.push(pipePath);
}
Additional Windows issues encountered
Two other issues prevented Chrome integration from working even before hitting this bug:
- Native messaging host not auto-registered: The registry entry at
HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extensionwas not created during setup on Windows.
- Bun v1.3.5 named pipe crash: The bundled Bun runtime crashes with an internal assertion failure when creating Windows named pipes. Workaround: use Node.js via
npm install -g @anthropic-ai/claude-codeand update the batch file to callnode cli.js --chrome-native-hostinstead ofclaude.exe --chrome-native-host.
Environment
- Windows 11
- Claude Code v2.1.32
- Chrome with Claude extension (
fcoeoabgfenejglbffodgkkbkcdhcgfn)
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗