Chuyển đến nội dung
Skillpedia
Khác8.0k · #12668

chrome-mcp-troubleshooting

Skill này làm gì

Hướng dẫn các nguyên nhân phổ biến gây lỗi kết nối Claude in Chrome trên macOS, như xung đột giữa ứng dụng desktop và công cụ dòng lệnh. Dành cho người có công cụ trình duyệt đã ngừng hoạt động.

Khi nào nên dùng

  • ✓Khi các công cụ Claude in Chrome báo lỗi rằng tiện ích trình duyệt chưa được kết nối.
  • ✓Khi tự động hóa trình duyệt chạy không ổn định hoặc hết thời gian sau một bản cập nhật.
  • ✓Khi người dùng chuyển qua lại giữa ứng dụng desktop Claude và Claude Code và các công cụ trình duyệt bị hỏng.

Liên kết skill

https://github.com/trailofbits/skills/blob/main/plugins/chrome-mcp-troubleshooting/skills/chrome-mcp-troubleshooting/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/trailofbits/skills/blob/main/plugins/chrome-mcp-troubleshooting/skills/chrome-mcp-troubleshooting/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Các công cụ Claude in Chrome của tôi báo tiện ích trình duyệt chưa được kết nối. Tôi sửa thế nào trên Mac?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill giải thích nguyên nhân có thể là hai chương trình hỗ trợ gốc tranh nhau cùng một kết nối. Sau đó nó đưa ra các bước kiểm tra và đặt lại kết nối.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Claude in Chrome MCP Troubleshooting

Use this skill when Claude in Chrome MCP tools fail to connect or work unreliably.

When to Use

  • mcp__claude-in-chrome__* tools fail with "Browser extension is not connected"
  • Browser automation works erratically or times out
  • After updating Claude Code or Claude.app
  • When switching between Claude Code CLI and Claude.app (Cowork)
  • Native host process is running but MCP tools still fail

When NOT to Use

  • Linux or Windows users - This skill covers macOS-specific paths and tools (~/Library/Application Support/, osascript)
  • General Chrome automation issues unrelated to the Claude extension
  • Claude.app desktop issues (not browser-related)
  • Network connectivity problems
  • Chrome extension installation issues (use Chrome Web Store support)

The Claude.app vs Claude Code Conflict (Primary Issue)

Background: 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

Component Native Host Binary Socket Location
Claude.app (Cowork) /Applications/Claude.app/Contents/Helpers/chrome-native-host /tmp/claude-mcp-browser-bridge-$USER/<PID>.sock
Claude Code CLI ~/.local/share/claude/versions/<version> --chrome-native-host $TMPDIR/claude-mcp-browser-bridge-$USER (single file)

Why They Conflict

  1. 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 extension requests a native host by name

  3. If the wrong config is active, the wrong binary runs

  4. The wrong binary creates sockets in a format/location the MCP client doesn't expect

  5. Result: "Browser extension is not connected" even though everything appears to be running

The Fix: Disable Claude.app's Native Host

If you use Claude Code CLI for browser automation (not Cowork):

# Disable the Claude.app native messaging config
mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json \
   ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.disabled

# Ensure the Claude Code config exists and points to the wrapper
cat ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json

If you use Cowork (Claude.app) for browser automation:

# Disable the Claude Code native messaging config
mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json \
   ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json.disabled

You cannot use both simultaneously. Pick one and disable the other.

Toggle Script

Add this to ~/.zshrc or run directly:

chrome-mcp-toggle() {
    local CONFIG_DIR=~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts
    local CLAUDE_APP="$CONFIG_DIR/com.anthropic.claude_browser_extension.json"
    local CLAUDE_CODE="$CONFIG_DIR/com.anthropic.claude_code_browser_extension.json"

    if [[ -f "$CLAUDE_APP" && ! -f "$CLAUDE_APP.disabled" ]]; then
        # Currently using Claude.app, switch to Claude Code
        mv "$CLAUDE_APP" "$CLAUDE_APP.disabled"
        [[ -f "$CLAUDE_CODE.disabled" ]] && mv "$CLAUDE_CODE.disabled" "$CLAUDE_CODE"
        echo "Switched to Claude Code CLI"
        echo "Restart Chrome and Claude Code to apply"
    elif [[ -f "$CLAUDE_CODE" && ! -f "$CLAUDE_CODE.disabled" ]]; then
        # Currently using Claude Code, switch to Claude.app
        mv "$CLAUDE_CODE" "$CLAUDE_CODE.disabled"
        [[ -f "$CLAUDE_APP.disabled" ]] && mv "$CLAUDE_APP.disabled" "$CLAUDE_APP"
        echo "Switched to Claude.app (Cowork)"
        echo "Restart Chrome to apply"
    else
        echo "Current state unclear. Check configs:"
        ls -la "$CONFIG_DIR"/com.anthropic*.json* 2>/dev/null
    fi
}

Usage: chrome-mcp-toggle then restart Chrome (and Claude Code if switching to CLI).

Quick Diagnosis

# 1. Which native host binary is running?
ps aux | grep chrome-native-host | grep -v grep
# Claude.app: /Applications/Claude.app/Contents/Helpers/
Câu hỏi thường gặp

Nó có hoạt động trên Windows không?

Không. Skill được viết cho đường dẫn và công cụ macOS, nên người dùng Windows và Linux cần trợ giúp khác.

Nó có bao phủ chính Chrome không?

Không. Nó bao phủ kết nối tiện ích Claude, không phải các vấn đề chung của Chrome hay cài đặt tiện ích.

Nó có sửa lỗi mạng không?

Không. Các vấn đề kết nối mạng nằm ngoài phạm vi của skill.

Chi tiết

Mô tả gốc của tác giả

Diagnose and fix Claude in Chrome MCP extension connectivity issues. Use when mcp__claude-in-chrome__* tools fail, return "Browser extension is not connected", or behave erratically.

repo: trailofbits/skills

Độ phổ biến

Sao GitHub
8.0k
Vị trí xếp hạng
#12668
Giấy phép
CC-BY-SA-4.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự