getSocketPaths() missing Windows named pipe path — Chrome extension never connects on Windows

Resolved 💬 6 comments Opened Feb 6, 2026 by insert0name Closed Mar 13, 2026

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:

  1. Native messaging host not auto-registered: The registry entry at HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extension was not created during setup on Windows.
  1. 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-code and update the batch file to call node cli.js --chrome-native-host instead of claude.exe --chrome-native-host.

Environment

  • Windows 11
  • Claude Code v2.1.32
  • Chrome with Claude extension (fcoeoabgfenejglbffodgkkbkcdhcgfn)

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗