/fix-chrome-connection:fix-chrome-connectionfrom MSApps Fix Chrome Connection
Diagnoses and repairs broken Claude-in-Chrome MCP connections step by step. Use when tabs_context_mcp fails, Chrome MCP is broken, or the Chrome extension is not responding.
Ships in MSApps Fix Chrome Connection. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Diagnose and repair a broken Claude-in-Chrome MCP connection. Work through steps in order, stop as soon as it works.
Safety rules (always apply):
~/Library/Logs/Claude/main.log) and the socket directory /tmp/claude-mcp-browser-bridge-$(whoami)/.0.sock symlink inside the socket directory above (a file Claude's own bridge created).⚠️ Scheduled task only: Before any other step, verify Chrome is actually running. Call
list_connected_browsers.If it returns
[]and Chrome is NOT running: Fix: callopen_application("Google Chrome")via computer-use tools, wait ~60s, then calllist_connected_browsersagain. If 1+ browser appears, Chrome is healthy — proceed to verify withtabs_context_mcpwithcreateIfEmpty: true. Observed 2026-04-26: Chrome was completely closed; opening it auto-selected the last profile and activated the extension with no manual interaction needed.If it returns
[]and Chrome IS already running (confirm withpgrep "Google Chrome"): This is an auth failure, not a closed-Chrome situation. Checkchrome-native-host.log— if native host processes have been alive for >1 hour with no"Chrome extension connected to bridge"inmain.log, the extension cannot authenticate. Try the reconnect URL (Step 4) and pairing page (Step 5), but iflist_connected_browsersstill returns[], manual re-auth (Step 6) is required — cannot be resolved autonomously in a scheduled task. Report to the user. Observed 2026-04-28: Chrome running with native host processes alive since prior day,0.sockabsent,list_connected_browsers=[]— reconnect URL + pairing page did not resolve without user interaction.
⚠️ Scheduled task note: If this skill is running as a scheduled task,
tabs_context_mcpwill ALWAYS fail (known limitation — scheduled sessions can't pair to the Chrome extension). Skip directly to verifying withControl_Chrome(get_current_tab). If that works, Chrome is healthy — report success.
Call tabs_context_mcp with createIfEmpty: false.
Call tabs_context_mcp with createIfEmpty: true.
Succeeds → report success, jump to Reporting.
Returns "Tabs can only be moved to and from normal windows" or "Grouping is not supported by tabs in this window" → run:
osascript -e 'tell application "Google Chrome" to make new window'
Then retry createIfEmpty: true. Both errors share the same root cause and fix — even when AppleScript reports every existing window as mode=normal, a fresh window is still required.
Check logs first — this determines the correct fix immediately:
tail -50 ~/Library/Logs/Claude/main.log | grep -iE "chrome|extension|bridge" | grep -v "getSessionsFor\|scheduledTaskId"
⚠️ Scheduled task log noise: When
fix-chrome-connectionruns as a scheduled task,main.logis flooded withLocalAgentModeSessions.getSessionsForScheduledTask: scheduledTaskId=fix-chrome-connectionentries — these contain "chrome" so a plaingrep -i chromereturns only those. Always pipe through| grep -v getSessionsFor.
✅ Healthy scheduled-task early-exit (added 2026-04-19): In a scheduled-task session, if the log excerpt cleanly shows the sequence
ensureConnected … connected=true, authenticated=true, wsState=1→Already connected and authenticated→No extensions connected, waiting up to 10000ms for peer_connected→No extensions found after waiting→Error calling tool: [Claude in Chrome] No Chrome extension connected after discoverywith ~10s elapsed between the first and last lines, Chrome is healthy. This is the documented scheduled-task pairing issue (not a stale socket — stale-socket failures are ~70ms, not 10s). Verify withControl_Chrome.list_tabs(should succeed), then report healthy and exit — do NOT touch0.sock, do NOT restart Chrome, do NOT re-pair.
Log messageMeaningGo to"No Chrome extension connected after discovery" + live sessionSession mismatch or account switchStep 3 (session fix) or Step 6 (re-auth)"No Chrome extension connected after discovery" + scheduled taskExpected — Chrome can't pair to scheduled sessionsReport status only, use Control_Chromeconnected=true, authenticated=true + tool calls fail ~70msStale 0.sock symlinkStep 2b"Chrome extension connected to bridge"Bridge connected — may be transientRetry tabs_context_mcpNo Chrome entries at allChrome not runningStep 0 (open Chrome)
Extension status and account check (no storage reads):
This skill never reads the extension's stored data (LevelDB / Local Extension Settings) or Claude Desktop's local storage, because those hold sign-in state. Instead:
"Chrome extension connected to bridge" in the log excerpt above. Present recently -> the bridge was paired; go to Step 2b or Step 4.chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/options.html in Chrome (the signed-in email is shown top-right) and compare it with the account shown in Claude Desktop settings. Different accounts -> account mismatch -> Step 6 directly."Chrome extension connected to bridge" for over an hour while the native host is alive -> auth failure -> Step 6 (re-auth).When: the bridge looks alive (connected=true, authenticated=true) but tool calls fail, OR list_connected_browsers=[] with the native host alive. Often the MCP browser-bridge extension's service worker has gone idle — reloading it re-wakes the bridge without touching 0.sock.
Prereq: Chrome stable ≥ 149 and chrome-devtools-mcp ≥ 1.1.1 started with --categoryExtensions (extension tools are pipe-connection only; attach-mode --categoryExtensions is unsupported before Chrome 149). Verify Chrome:
defaults read "/Applications/Google Chrome.app/Contents/Info.plist" CFBundleShortVersionString
If Chrome < 149, skip to Step 2b (the symlink fix) — this probe isn't available yet.
If Chrome ≥ 149, use the chrome-devtools-mcp Extensions tools:
list_extensions → find the Claude / MCP browser-bridge extension and read its service-worker state.reload_extension on that extension id to restart the worker (this is what the reconnect URL in Step 4 also tries to do, but reload_extension is deterministic and needs no focused window).tabs_context_mcp with createIfEmpty: false. Works → jump to Reporting.Fallback: if the extension tools are unavailable (Chrome < 149, no --categoryExtensions, or list_extensions doesn't surface the bridge extension), proceed to Step 2b — the 0.sock symlink fix remains the baseline repair. This probe is additive: it never replaces the socket surgery, only tries the cheaper service-worker reload first.
Source: Chrome DevTools 148 added extension debugging via
chrome-devtools-mcp; attach-mode support landed in Chrome 149. Wired in here per Trello 0nfcts9J once local Chrome reached stable ≥ 149.
Symptom: connected=true, authenticated=true, wsState=1 but every tool call fails in ~70ms.
Root cause: Chrome restart creates a new {pid}.sock file but doesn't update 0.sock. Claude Desktop looks specifically for 0.sock.
Note (observed 2026-04-19): On recent Claude Desktop builds,
0.sockmay be absent entirely while the bridge still reportsconnected=true, authenticated=true, wsState=1and live sessions work fine. The absence of0.sockby itself is NOT proof of a stale-socket failure — only the ~70ms tool-call timing signature is.
DIR="/tmp/claude-mcp-browser-bridge-$(whoami)"
ls -la "$DIR/"
NEW_SOCK=$(ls -t "$DIR"/*.sock 2>/dev/null | grep -v '/0\.sock$' | head -1)
if [ -n "$NEW_SOCK" ]; then
ln -sf "$NEW_SOCK" "$DIR/0.sock"
echo "Updated 0.sock → $NEW_SOCK"
else
echo "No active socket found"
fi
Retry tabs_context_mcp with createIfEmpty: false. Works → jump to Reporting.
Root cause: Chrome extension pairs to whichever Cowork window is in focus when Connect is clicked.
Tell the user:
"Please focus this Cowork chat window, then click the Claude extension icon in Chrome's toolbar and click Connect."
After they confirm:
tabs_context_mcp with createIfEmpty: false → if it works → done ✅osascript -e 'tell application "Google Chrome" to set URL of active tab of front window to "https://clau.de/chrome/reconnect"'
sleep 5
tail -10 ~/Library/Logs/Claude/main.log | grep -iE "chrome extension|bridge|No Chrome"
"Chrome extension connected to bridge" → success! Test with tabs_context_mcp.If AppleScript returns "Can't get window 1":
osascript -e 'tell application "Google Chrome" to make new window'
AppleScript
set URLfails silently (exit code 1) in scheduled tasks: When the AppleScript command exits with code 1 but no error message, useopen -aas a reliable fallback — it wakes the extension service worker and triggers reconnect without needing a focused Chrome window. Observed 2026-05-19:open -a "Google Chrome" "https://clau.de/chrome/reconnect" sleep 6 tail -5 ~/Library/Logs/Claude/main.log | grep -i "Chrome extension connected"
open -a "Google Chrome" "chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/pairing.html"
Wait 3 seconds, retry tabs_context_mcp.
If still failing, tell user: "The pairing page is open in Chrome. Type any name in the input field, then click the orange Connect button."
Note: The Connect button is disabled until a name is typed. If automating via CDP, use the React native setter:
let setter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set; setter.call(input, 'Claude Desktop'); input.dispatchEvent(new Event('input', { bubbles: true }));
⚠️ Go directly here if logs show
"No Chrome extension connected after discovery"in a live session and Steps 3–5 don't work.
Tell the user:
"The Chrome extension needs to re-authenticate with your current Claude Desktop account:"
- Chrome toolbar → 🧩 → "Claude in Chrome" → sign out
- Sign back in with the same account as Claude Desktop
- Authorize the connection when prompted
- When the pairing page appears — type any name → click Connect
- Navigate Chrome to https://claude.ai (wakes the extension service worker)
- Tell Claude: "done"
After user says done:
DIR="/tmp/claude-mcp-browser-bridge-$(whoami)"
NEW=$(ls -t "$DIR"/*.sock 2>/dev/null | grep -v '/0.sock' | head -1)
[ -n "$NEW" ] && ln -sf "$NEW" "$DIR/0.sock" && echo "Updated" || echo "No socket"
sleep 5
tail -10 ~/Library/Logs/Claude/main.log | grep -iE "chrome extension|bridge"
Then call tabs_context_mcp with createIfEmpty: true. Retry once if it fails immediately.
Tell the user to open chrome://extensions, remove Claude in Chrome, then reinstall from the Chrome Web Store.
If you noticed something that would make future runs faster, include it in the report as a suggestion for the user. Do NOT edit this plugin's files, run git commit, or push anything: this plugin makes no network sends of its own.
After each run, output:
When the scheduled task runs and Chrome is completely closed, list_connected_browsers returns []. Fix: call open_application("Google Chrome") via computer-use — Chrome will auto-select the last-used profile and the extension activates within ~60 seconds. Verify with list_connected_browsers (should return 1+ browser) then tabs_context_mcp with createIfEmpty: true. Observed 2026-04-26: Chrome was completely closed; opening it resolved the issue automatically with no manual interaction needed.
Chrome extension tries to put the new MCP tab into a tab-group, but the current windows don't accept grouping. Observed in two forms:
normal.Fix for both: osascript -e 'tell application "Google Chrome" to make new window' — a fresh window reliably accepts grouping. Retry tabs_context_mcp with createIfEmpty: true immediately after.
Chrome restart creates new {pid}.sock but doesn't update 0.sock. Claude Desktop looks for 0.sock specifically. Fix: update symlink (Step 2b).
0.sock absent + native host alive (observed 2026-05-19): Socket directory exists with only {pid}.sock (no 0.sock), but lsof /tmp/claude-mcp-browser-bridge-$(whoami)/*.sock | grep chrome-na confirms the native host IS alive. Fix: create 0.sock → {pid}.sock symlink (Step 2b), THEN trigger reconnect via open -a "Google Chrome" "https://clau.de/chrome/reconnect" — both steps needed. The 0.sock fix alone is not sufficient; the reconnect URL wakes the extension service worker and logs "Chrome extension connected to bridge".
chrome-native-host.log shows the host repeatedly starting then stopping within ~2 minutes. The extension service worker starts, fails to pair on the bridge (userId/auth mismatch), then Chrome suspends it. This is NOT a socket problem. Compare the extension's signed-in account with Claude Desktop's account and go to Step 6.
After switching Claude Desktop accounts, the userId changes. Chrome restart and socket fixes don't help. CDP automation doesn't work. Only Step 6 (manual re-auth) works.
tabs_context_mcp pairs to a specific Cowork localSessionId. Scheduled task sessions have their own ID, so:
createIfEmpty: false → returns "No tab group exists for this session" (expected, not an error)createIfEmpty: true → CAN succeed if the socket is healthy, creating a fresh tab groupUse Control_Chrome as the primary health check for scheduled tasks. After fixing a stale socket, try tabs_context_mcp with createIfEmpty: true to confirm the extension is fully functional.
Connect button is disabled until a name is typed. input.value = "text" doesn't work with React. Must use the native setter (see Step 5).
pgrep -l "chrome-native-host" often returns empty on macOS because the OS truncates process command names to chrome-na. To verify the native host is running, use lsof on the socket files instead:
lsof /tmp/claude-mcp-browser-bridge-$(whoami)/*.sock 2>/dev/null | grep chrome-na
If it returns chrome-na process entries, the native host IS alive. Socket file mtime showing a past date is normal — what matters is whether lsof shows a live process holding it.
Do not delete anything under Chrome's profile directory. Ask the user to sign out of the Claude extension (Chrome toolbar -> extension icon -> sign out) and sign back in; if that does not help, to remove and reinstall the extension from the Chrome Web Store (Step 7). Chrome manages its own extension storage.
tabs_context_mcp returns: "Multiple Chrome extensions connected." Fix: click the Claude extension icon → Connect in the active Chrome window.
Never manually construct the OAuth URL. Open the pairing page (pairing.html) instead — it triggers initiateOAuthFlow() automatically.
mcp__Control_Chrome__list_tabs and mcp__Control_Chrome__open_url succeed and return real data even when list_connected_browsers returns [] and tabs_context_mcp fails. This means Control_Chrome can confirm Chrome is alive and even navigate it to a URL. However, get_page_content and execute_javascript still fail with "Google Chrome is not running" — this is a known limitation of Control_Chrome's DOM access layer, which requires a deeper bridge that only the Claude-in-Chrome extension provides. Use list_tabs as the liveness check; don't trust get_page_content errors as evidence Chrome is closed.
Diagnostic sequence for scheduled tasks:
tabs_context_mcp(createIfEmpty: false) → if fails, don't panicControl_Chrome.list_tabs → if returns tabs, Chrome IS aliveThe /chrome-devtools skill uses a completely different MCP server (chrome-devtools-mcp) with its own tools: new_page, take_snapshot, navigate_page, evaluate_script, lighthouse_audit, etc. These tools are not in the same namespace as mcp__Claude_in_Chrome__*. If chrome-devtools-mcp isn't running, none of its tools will appear in ToolSearch results at all — the entire server is absent from the deferred tool list. Do not confuse the two:
mcp__Claude_in_Chrome__*): extension-based, requires pairingnew_page, take_snapshot, etc.): DevTools Protocol server, runs separatelyBoth can be down independently. Check ToolSearch for new_page to confirm whether chrome-devtools-mcp is connected.
mcp__Control_Chrome__list_tabs and mcp__Control_Chrome__open_url succeed and return real data even when list_connected_browsers returns [] and tabs_context_mcp fails. Use list_tabs as the Chrome liveness check. However, get_page_content and execute_javascript still fail with "Google Chrome is not running" — known limitation of Control_Chrome's DOM layer; does NOT mean Chrome is closed.
Scheduled task diagnostic sequence:
tabs_context_mcp(createIfEmpty: false) → if fails, don't panicControl_Chrome.list_tabs → if returns tabs, Chrome IS alive, extension just unpairedThe /chrome-devtools skill uses a separate MCP server (chrome-devtools-mcp) with tools new_page, take_snapshot, navigate_page, evaluate_script, lighthouse_audit, etc. These are NOT in the mcp__Claude_in_Chrome__* namespace. If chrome-devtools-mcp isn't running, none of its tools appear in ToolSearch at all. Both can be down independently:
mcp__Claude_in_Chrome__*): extension-based, requires pairingnew_page, take_snapshot, etc.): DevTools Protocol server, separate processCheck ToolSearch for new_page to confirm whether chrome-devtools-mcp is connected.
Check: xattr -l /tmp/claude-mcp-browser-bridge-$(whoami)/
If com.apple.quarantine is present, report it to the user rather than changing attributes yourself.
Note: quarantine is NOT the cause of "No Chrome extension connected" — that's always an auth issue.
When list_connected_browsers returns [] but Chrome IS running (native host process alive in /tmp/claude-mcp-browser-bridge-{user}/), there are two different root causes with different fixes:
Case A: Suspended service worker (fixable without user)
chrome-native-host.log shows host started but no subsequent "Chrome disconnected" — it's just idleosascript -e 'tell application "Google Chrome" to set URL of active tab of front window to "https://clau.de/chrome/reconnect"'
sleep 6
tail -5 ~/Library/Logs/Claude/main.log | grep -i "Chrome extension connected"
Then check/fix 0.sock symlink (Step 2b). Verify with list_connected_browsers — should return browser within ~10 seconds.
Observed 2026-04-29: reconnect URL woke the suspended service worker, restoring connection with no manual action.Case B: Auth failure (requires Step 6 / manual re-auth)
chrome-native-host.log shows repeated start/stop cycles (~2 min apart)"Chrome extension connected to bridge" in main.logDiagnosis order: Always compare the extension account with the Desktop account BEFORE concluding Step 6 is needed.
On macOS, pgrep "chrome-native-host" returns nothing because pgrep matches the truncated process name chrome-na (15-char limit). To verify the native host is alive, use lsof on the socket files instead:
lsof /tmp/claude-mcp-browser-bridge-$(whoami)/*.sock 2>/dev/null | tail +2
Socket mtime showing a past date is normal if the native host hasn't been restarted — it doesn't mean the host is dead. Observed 2026-04-28.
In a scheduled-task session, calling tabs_context_mcp with createIfEmpty: false returns the literal string "No tab group exists for this session. Use createIfEmpty: true to create one." — this is the healthy response, not an error. The bridge is alive and reachable; there's simply no MCP tab group attached to this session yet. Stop the loop and report success. Confirmed 2026-04-29.
list_pages and all other chrome-devtools-mcp tools fail with:
"The selected page has been closed. Call list_pages to see open pages."
Root cause: chrome-devtools-mcp's MCP server process persists the last selected page reference
in memory. When that page is closed between sessions, the server enters a stuck state where
every call (including list_pages and new_page) returns this error. Unrecoverable within
the session — resolves on full Claude Desktop restart.
This is NOT a Chrome failure. Control_Chrome.get_current_tab, list_tabs, and open_url
succeed normally when this happens.
Scheduled task health check: If list_pages returns this error, use
Control_Chrome.get_current_tab as the liveness check. If that returns valid tab data → Chrome
IS healthy. Report as outcome C: "Chrome healthy, devtools MCP stuck (resolves on Claude restart)."
Note: occurs even with --isolated configured — isolation prevents profile collisions but does
not prevent the in-memory selected-page state from going stale.
When Claude Desktop switches to a different account, the Chrome extension stays signed in as the old one. list_connected_browsers returns [], and the reconnect URL and pairing page fail silently.
Diagnosis: open chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/options.html and compare the email shown top-right with the account in Claude Desktop settings. If they differ, Step 6 (manual re-auth) is required.
Chrome profile note: a managed (Workspace) Chrome profile may block extension installs. The Claude extension must live in a profile that allows it. When re-authing, sign in to the extension with the same Claude account that Claude Desktop uses (not the Chrome/Google account), then navigate Chrome to https://clau.de/chrome/reconnect and verify list_connected_browsers returns 1 browser within ~10s.
DevTools 148 (release notes: https://developer.chrome.com/blog/new-in-devtools-148/#extension-debugging) added a 5-tool Extensions category to chrome-devtools-mcp. Verified against the locally installed CLI v1.1.1:
--categoryExtensions / --category-extensions flag): list_extensions, reload_extension, trigger_extension_action, install_extension, uninstall_extension.autoConnect, browserUrl, and wsEndpoint (i.e. attach mode) are unsupported until Chrome 149.148.0.7778.181.Re-check the gate (cheap, run before assuming it's still closed):
defaults read "/Applications/Google Chrome.app/Contents/Info.plist" CFBundleShortVersionString
# >= 149 → extension tools should work in attach mode; wire the diagnostic below.
Diagnostic to wire in once Chrome >= 149 (planned, not yet active): before the 0.sock symlink surgery (Step 2b) or manual re-auth (Step 6), launch chrome-devtools-mcp with --categoryExtensions and:
list_extensions — confirm the Claude-in-Chrome extension (fcoeoabgfenejglbffodgkkbkcdhcgfn) is present and read its background service-worker state directly, instead of inferring health from logs.reload_extension on that ID — a targeted service-worker reload that may restore the bridge without a full Chrome restart or socket-symlink intervention.Until the gate clears, keep using the existing log-grep + 0.sock + account-comparison flow above; the extension tools add nothing in attach mode on Chrome 148.
When main.log's newest entries are days old and its last Chrome lines are "Shutting down MCP Server" — Claude Desktop itself is closed. No socket/symlink/pairing fix can produce a bridge connection because the consumer app is absent. Diagnostic: pgrep -fl "Claude.app/Contents/MacOS". Fix: open -a "Claude", wait ~25s, then re-run the reconnect URL. Note: in VSCode-extension/Cowork sessions the mcp__Claude_in_Chrome__* server is never attached at all (ToolSearch finds nothing) — that alone is NOT evidence of breakage; use chrome-devtools-mcp (list_pages) as that session's browser path. After Desktop relaunch the extension may still need one manual click (extension icon → Connect) before "Chrome extension connected to bridge" appears.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
chrome-mcp, connection-repair, troubleshooting, claude-desktop
npx claudepluginhub msapps-mobile/claude-plugins --plugin fix-chrome-connection3 skills in this plugin
/chrome-devtools-mcp-cleanupDiagnose + clean up the recurring chrome-devtools-mcp wedge — multiple stale `chrome-devtools-mcp@latest` parent processes colliding on the shared `~/.cache/chrome-devtools-mcp/chrome-profile` directory. Use when state-changing tools (new_page, navigate_page, select_page, take_snapshot) error with "The browser is already running for /Users/.../chrome-profile. Use --isolated to run multiple browser instances." while `list_pages` still works./chrome-health-checkQuickly checks whether the Claude in Chrome MCP connection is working and reports the status. Use when the user says "is chrome connected?", "check chrome", "chrome status", "test chrome connection", "is the chrome extension working?", or any variation of wanting to know if Chrome is reachable before starting browser-based work. Also use proactively before running Chrome automation tasks if there's any doubt the connection is live.
Other plugins' skills for the same job