Skip to main content
Original Author: @jeffzwang from @ExaAILabsEnhanced by: Trail of Bits

Overview

Diagnose and fix Claude in Chrome MCP extension connectivity issues. This plugin provides systematic troubleshooting for browser automation failures, focusing on the primary conflict between Claude.app (Cowork) and Claude Code native messaging hosts.

When to Use

Connection Failures

mcp__claude-in-chrome__* tools fail with “Browser extension is not connected”

Erratic Behavior

Browser automation works inconsistently or times out

After Updates

Problems appear after updating Claude Code or Claude.app

Switching Contexts

Issues when switching between Claude Code CLI and Claude.app (Cowork)

The Core Issue

When Claude.app added Cowork support (browser automation from the desktop app), it introduced a competing native messaging host that conflicts with Claude Code CLI.

Two Native Hosts, Two Socket Formats

Why They Conflict

1

Both Register Configs

Both register native messaging configs in Chrome:
  • com.anthropic.claude_browser_extension.json → Claude.app helper
  • com.anthropic.claude_code_browser_extension.json → Claude Code wrapper
2

Chrome Requests Host

Chrome extension requests a native host by name
3

Wrong Binary Runs

If the wrong config is active, the wrong binary runs
4

Incompatible Sockets

The wrong binary creates sockets in a format/location the MCP client doesn’t expect
5

Connection Fails

Result: “Browser extension is not connected” even though everything appears to be running

Quick Fix

You cannot use both Claude.app (Cowork) and Claude Code CLI simultaneously. Pick one and disable the other.

Toggle Script

Add this to ~/.zshrc to easily switch between Claude.app and Claude Code:
Usage: chrome-mcp-toggle then restart Chrome (and Claude Code if switching to CLI).

Quick Diagnosis

Full Reset Procedure

Critical Insight: MCP connects at startup. If the browser bridge wasn’t ready when Claude Code started, the connection will fail for the entire session. The fix is usually: ensure Chrome + extension are running with correct config, THEN restart Claude Code.
1

Ensure Correct Config

2

Update Wrapper

3

Clean Up

4

Restart Chrome

5

Wait and Click Extension

Wait for Chrome to fully load, then click the Claude extension icon
6

Verify Native Host

7

Verify Socket

8

Restart Claude Code

Now restart your Claude Code session

Other Common Issues

If you have the Claude extension installed in multiple Chrome profiles, each spawns its own native host and socket, causing confusion.Fix: Only enable the Claude extension in ONE Chrome profile.
Running multiple Claude Code instances can cause socket conflicts.Fix: Only run one Claude Code session at a time, or use /mcp to reconnect after closing other sessions.
The wrapper at ~/.claude/chrome/chrome-native-host may have a hardcoded version that becomes stale after updates.Diagnosis:
Fix: Use the dynamic version wrapper shown in the Full Reset Procedure above.
Claude Code expects TMPDIR to be set to find the socket.

Installation

Platform Support

This plugin is macOS-specific and covers paths and tools like ~/Library/Application Support/ and osascript. It does not support Linux or Windows.

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.