claude-code - 💡(How to fix) Fix [Bug] Claude Code MCP server fails to connect Chrome extension native host bridge socket [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52723Fetched 2026-04-24 10:41:22
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1
RAW_BUFFERClick to expand / collapse

Bug Description Title: Claude Code MCP server fails to connect to Chrome extension native host bridge socket

Environment:

  • Claude Code: 2.1.109 (Homebrew cask, arm64)
  • macOS: 26.2 (Darwin 25.2.0, Build 25C56)
  • Chrome: 147.0.7727.102 (arm64)
  • Claude Extension: 1.0.69
  • Chrome Profile: Default
  • Auth: claude.ai (Max subscription)

Description: Chrome extension's native host process spawns correctly and creates a Unix socket at /tmp/claude-mcp-browser-bridge-pakorns/<PID>.sock, but the Claude Code MCP server never connects to it. mcp__claude-in-chrome__tabs_context_mcp always returns "Browser extension is not connected."

What works:

  • Chrome spawns native host correctly (claude --chrome-native-host, parent = Chrome)
  • Bridge socket is created and listening
  • Extension has nativeMessaging permission
  • Extension installed and enabled in Default profile
  • claude.ai logged in with same account as Claude Code

What doesn't work:

  • Claude Code process has no socket connection to the bridge socket (verified via lsof)
  • Multiple restart sequences tried (Chrome first, Claude Code first, both simultaneously)

Investigation details:

  • Originally had both com.anthropic.claude_browser_extension.json (Desktop) and com.anthropic.claude_code_browser_extension.json (Code) in NativeMessagingHosts/
  • Renamed Desktop config to .disabled — extension falls through to Code host successfully
  • Extension service worker tries Desktop host first, then Code host (confirmed in source)
  • Native host creates socket, but MCP server in Claude Code session never connects to it

Steps to reproduce:

  1. Have Claude Desktop installed (creates competing native messaging host)
  2. Rename Desktop host config: com.anthropic.claude_browser_extension.json → .json.disabled
  3. Restart Chrome, then start Claude Code
  4. Call mcp__claude-in-chrome__tabs_context_mcp → "not connected"

Expected: MCP server connects to bridge socket and browser tools work.

Actual: Perpetual "Browser extension is not connected" despite native host running and socket available.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.109
  • Feedback ID: 1bf41a59-35fa-46e6-965a-ddce2de8224b

extent analysis

TL;DR

The issue is likely due to the Claude Code MCP server failing to connect to the Chrome extension native host bridge socket, and renaming the competing Desktop host config may resolve the issue.

Guidance

  • Verify that the com.anthropic.claude_browser_extension.json file is correctly renamed to .disabled to prevent the Desktop host from interfering with the Code host.
  • Check the NativeMessagingHosts directory to ensure that only the com.anthropic.claude_code_browser_extension.json file is present and correctly configured.
  • Attempt to restart the Chrome browser and Claude Code application in different sequences to see if the connection issue persists.
  • Use the lsof command to verify that the Claude Code process is not connecting to the bridge socket, and check the socket file permissions to ensure they are correct.

Example

No code snippet is provided as the issue seems to be related to configuration and socket connections.

Notes

The issue may be specific to the environment and configuration, and further investigation may be required to determine the root cause. The provided steps to reproduce the issue may help in identifying the problem.

Recommendation

Apply workaround: renaming the competing Desktop host config file may resolve the issue, as it allows the Code host to take precedence and potentially establish a connection to the bridge socket.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Claude Code MCP server fails to connect Chrome extension native host bridge socket [1 comments, 2 participants]