Skip to content

Claude in Chrome browser extension not connecting to Claude Code CLI #20298

@dev-dav-ui

Description

@dev-dav-ui

Environment:

  • Claude Code version: 2.1.17
  • macOS: Darwin 25.2.0
  • Chrome extension version: 1.0.40 (installed in Profile 31)

Description:
The Claude in Chrome browser extension works correctly on its own (side panel functions properly), but Claude Code CLI
cannot connect to it to control the browser.

Steps to reproduce:

  1. Install Claude in Chrome extension (version 1.0.40)
  2. Run claude --chrome in terminal
  3. Call tabs_context_mcp tool
  4. Receive error: "Browser extension is not connected"

Troubleshooting attempted:

  • Fully quit Chrome (Cmd+Q) and reopened
  • Toggled extension OFF/ON in chrome://extensions/
  • Opened Claude side panel (Cmd+E)
  • Verified native messaging host exists and is configured correctly

Native messaging host configuration:
File: ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json

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

Native host script:
#!/bin/sh
exec "/Users/dhanapale/.local/share/claude/versions/2.1.17" --chrome-native-host

Expected behavior:
Claude Code CLI should connect to the browser extension and be able to control Chrome tabs.

Actual behavior:
tabs_context_mcp always returns "Browser extension is not connected" even though:

  • The extension is installed and functional
  • The side panel works correctly
  • Native messaging host files exist and are properly configured
  • Chrome process shows --claude-in-chrome-mcp flag running

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:toolsbugSomething isn't workinghas reproHas detailed reproduction stepsoncallplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions