| name | debug-chrome-extension |
| description | Diagnose and fix Claude Code Chrome extension connection issues. Use when /chrome shows disabled status, MCP tools are unavailable, or browser automation fails to connect. |
Debug Chrome Extension Connection
Overview
The Claude in Chrome extension uses a three-component architecture:
Chrome Extension ──► Native Host ──► MCP Server ◄── Claude Code CLI
(named pipe)
Components:
- Chrome Extension - Browser extension that controls Chrome
- Native Host (
--chrome-native-host) - Spawned by extension, creates named pipe
- MCP Server (
--claude-in-chrome-mcp) - Provides tools to Claude Code
- CLI Session (
--chrome) - Connects to MCP server for browser tools
Connection failures occur when any component is missing, stale, or miscommunicated.
Quick Diagnosis
Run these commands to check component status:
1. Check Running Processes
Get-CimInstance Win32_Process -Filter 'name="claude.exe"' | Select-Object ProcessId, CommandLine | Format-List
2. Check Named Pipe Exists
Get-ChildItem //./pipe/ | Where-Object Name -like '*claude*'
3. Check Debug Log for Errors
tail -100 ~/.claude/debug/latest | grep -i "chrome\|mcp\|error"
4. Check Extension Installation
ls "$env:LOCALAPPDATA/Google/Chrome/User Data/Default/Extensions/fcoeoabgfenejglbffodgkkbkcdhcgfn/"
Common Failure Modes
1. MCP Connection Timeout
Symptoms:
/chrome shows "Status: Disabled"
- Debug log shows:
Connection to MCP server "claude-in-chrome" timed out
- Chrome tools return "Tool not found"
Cause: CLI session failed to connect to MCP server at startup.
Fix:
exit
claude --chrome
2. Stale Native Host Process
Symptoms:
- Native host process exists but was started hours ago
- MCP server process is missing
- New connection attempts fail
Cause: Old native host from previous Chrome session blocking new connections.
Fix:
# Kill stale processes (Windows)
Get-Process claude | Where-Object {$_.StartTime -lt (Get-Date).AddHours(-1)} | Stop-Process -Force
# Click Chrome extension icon to spawn fresh native host
# Then restart Claude Code with: claude --chrome
3. Missing MCP Server Process
Symptoms:
- Native host running (
--chrome-native-host)
- CLI running (
--chrome)
- No
--claude-in-chrome-mcp process
Cause: CLI startup failed before spawning MCP server.
Fix:
4. Named Pipe Missing
Symptoms:
- No
claude-mcp-browser-bridge-* pipe in pipe directory
- Native host not running
Cause: Chrome extension not activated or native host crashed.
Fix:
- Open Chrome
- Click the Claude extension icon (puzzle piece menu if pinned)
- Wait for native host to spawn
- Verify pipe exists, then start
claude --chrome
5. Extension Not Installed
Symptoms:
- Debug log shows "Extension not found in Default"
- No extension directory in Chrome extensions folder
Fix:
Install from Chrome Web Store: Search "Claude" by Anthropic
6. Registry/Manifest Mismatch
Symptoms:
- Extension installed but native host never spawns
- No Claude processes appear when clicking extension
Diagnosis:
# Check registry points to correct manifest
reg query "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extension"
# Check manifest exists at that path
cat "$env:APPDATA/Claude Code/ChromeNativeHost/com.anthropic.claude_code_browser_extension.json"
# Verify manifest points to valid batch file
cat ~/.claude/chrome/chrome-native-host.bat
Fix: Reinstall Claude Code to reset native messaging configuration.
Full Reset Procedure
When individual fixes don't work:
# 1. Kill all Claude processes
Get-Process claude -ErrorAction SilentlyContinue | Stop-Process -Force
# 2. Close Chrome completely
Get-Process chrome -ErrorAction SilentlyContinue | Stop-Process -Force
# 3. Wait a moment
Start-Sleep -Seconds 2
# 4. Start Chrome
Start-Process chrome
# 5. Click Claude extension icon in Chrome
# 6. Verify native host spawned
Get-Process claude
# 7. Start Claude Code
claude --chrome
Verifying Success
After fixes, verify all components:
tasklist | grep claude
Debug Log Locations
- Windows:
~/.claude/debug/*.txt
- Current session:
~/.claude/debug/latest (symlink)
Search patterns:
grep "claude-in-chrome" ~/.claude/debug/latest
grep "Connection" ~/.claude/debug/latest
grep "MCP server" ~/.claude/debug/latest