[BUG] Chrome MCP fails with EADDRINUSE: native host tries to create new pipe server instead of connecting to existing one

Resolved 💬 5 comments Opened Feb 3, 2026 by Joseph-tsai415 Closed Mar 5, 2026

Environment

  • Claude Code version: 2.1.29
  • OS: Windows 11
  • Node.js: v20.20.0
  • Chrome extension: Claude v1.0.41 (ID: fcoeoabgfenejglbffodgkkbkcdhcgfn)
  • Shell: Git Bash
  • Installation: npm global (C:\Users\Joseph\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code)

Issue Summary

Chrome MCP tools (mcp__claude-in-chrome__*) always return "Browser extension is not connected" despite the MCP server showing as "connected" in /mcp.

Expected Behavior

Chrome MCP should be able to control the browser after the extension is installed and enabled.

Actual Behavior

  1. MCP server connects successfully at startup
  2. Tools are called and "complete successfully" (5s timeout)
  3. All tools return: "Browser extension is not connected"

Root Cause Analysis

The architecture conflict:

  1. Claude Code starts and creates a named pipe server: \\.\pipe\claude-mcp-browser-bridge-Joseph
  2. When Chrome extension tries to connect via native messaging, Chrome spawns the bat file
  3. The bat file (~/.claude/chrome/chrome-native-host.bat) runs node cli.js --chrome-native-host
  4. This tries to create a NEW server on the same pipe instead of connecting as a client
  5. Results in EADDRINUSE error
  6. Chrome extension receives: "Could not establish connection. Receiving end does not exist."

Error Logs

Native host error (when manually testing bat file):

[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \\.\pipe\claude-mcp-browser-bridge-Joseph
[Claude Chrome Native Host] Socket server error: Error: listen EADDRINUSE: address already in use \\.\pipe\claude-mcp-browser-bridge-Joseph
    at Server.setupListenHandle [as _listen2] (node:net:1886:21)
    at listenInCluster (node:net:1965:12)
    at Server.listen (node:net:2084:5)
    at file:///C:/Users/Joseph/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:6427:1029

Chrome extension error (from DevTools):

sidepanel.html?tabId=438652611
Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.

Debug log showing MCP server IS connected:

2026-02-03T00:18:57.965Z [DEBUG] MCP server "claude-in-chrome": Successfully connected to stdio server in 1142ms
2026-02-03T00:18:57.966Z [DEBUG] MCP server "claude-in-chrome": Connection established with capabilities: {"hasTools":true,"hasPrompts":false,"hasResources":false,"serverVersion":{"name":"Claude in Chrome","version":"1.0.0"}}

Debug log showing tool calls timeout:

2026-02-03T00:42:42.636Z [DEBUG] MCP server "claude-in-chrome": Calling MCP tool: tabs_context_mcp
2026-02-03T00:42:47.652Z [DEBUG] MCP server "claude-in-chrome": Tool 'tabs_context_mcp' completed successfully in 5s

Configuration Files

Native host manifest (C:\Users\Joseph\AppData\Roaming\Claude Code\ChromeNativeHost\com.anthropic.claude_code_browser_extension.json):

{
  "name": "com.anthropic.claude_code_browser_extension",
  "description": "Claude Code Browser Extension Native Host",
  "path": "C:\\Users\\Joseph\\.claude\\chrome\\chrome-native-host.bat",
  "type": "stdio",
  "allowed_origins": [
    "chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/"
  ]
}

Registry entries (both present):

HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_browser_extension
    → C:\Users\Joseph\AppData\Roaming\Claude\ChromeNativeHost\... (Claude Desktop)

HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extension
    → C:\Users\Joseph\AppData\Roaming\Claude Code\ChromeNativeHost\... (Claude Code)

Additional Context

  • Claude Desktop is also installed (may cause conflict with shared Chrome extension)
  • Extension is installed and enabled in Chrome Default profile
  • Extension has nativeMessaging permission in manifest
  • Multiple Chrome profiles exist (Default, Profile 1, 4, 5, 6, 7)
  • Killing old node processes does not resolve the issue because the current Claude Code session holds the pipe (which is correct)

Suggested Fix

The native host code should:

  1. Check if a pipe server already exists on \\.\pipe\claude-mcp-browser-bridge-{username}
  2. If exists, connect as a client to relay messages
  3. If not, create a new server

Or alternatively:

  • The Chrome extension should connect directly to the existing pipe without using native messaging when Claude Code is already running

Steps to Reproduce

  1. Install Claude Code via npm
  2. Install Claude Chrome extension
  3. Start Claude Code (claude)
  4. Try any Chrome MCP tool (e.g., tabs_context_mcp)
  5. Observe "Browser extension is not connected" error

Workarounds Attempted (None Worked)

  • Restarting Chrome
  • Restarting Claude Code
  • Killing old node processes
  • Reloading the Chrome extension
  • Clicking the extension icon to activate it

View original on GitHub ↗

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