Chrome DevTools MCP: Let AI Coding Agents Hijack Your Live Browser Session ππ€
Yo, my guy, before we dive inβWHY does this even exist? π₯
Coding agents (like Gemini CLI or Cursor) were stuck in a bubble. They'd spin up fresh Chrome profiles, forcing you to re-login everywhere π. Or you'd debug manually in DevTools, spot a busted network request, and think "damn, wish my AI could just see this." Pain city. This ships in Chrome M144 (beta now) so agents reuse your live sessionβlogged-in sites, selected elements, active traces. Seamless handoff from human to AI debugging. Ohhhhh moment unlocked β
.
Big Picture: Where It Fits π
OLD FLOW β NEW FLOW β
βββββββββββ βββββββββ
Agent ββββββΊ New Profile Agent ββββββΊ YOUR Live Chrome
(Re-login hell) (Reuse session + DevTools)
DevTools ββββΌββ Manual only DevTools ββββΌββ AI takeover
β β
βΌ βΌ
Stuck switching! Hybrid power! π
- Chrome DevTools MCP: Server bridges AI agents to DevTools protocols.
- New trick:
--autoConnecthooks into running Chrome (not just fresh ones). - Fits with existing: Remote ports, temp profilesβnow + live sessions.
How It Works: Step-by-Step Mechanics βοΈ
1οΈβ£ Enable remote debugging (Chrome >=144):
- Hit
chrome://inspect#remote-debugging. - Flip the switch in the dialog. (One-time setup.)
βββββββββββββββββββββββββββββββ
β chrome://inspect β
β #remote-debugging β
β β Enable remote debugging? β β Click YES
β ββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββ
2οΈβ£ Fire up MCP server with autoConnect:
- Example for gemini-cli config:
{ "mcpServers": { "chrome-devtools": { "command": "npx", "args": ["chrome-devtools-mcp@latest", "--autoConnect", "--channel=beta"] } } } --channel=betatill stable drops.
3οΈβ£ Permission dance:
- Agent asks β Chrome pops dialog: "Allow remote debug?"
- Click Allow β "Chrome is being controlled..." banner shows.
- Boom, agent accesses your session.
4οΈβ£ AI in action:
- Prompt: "Check performance of developers.chrome.com"
- Agent opens site, runs traceβin your logged-in Chrome.
- Or: Select element/network in DevTools β Tell agent "Fix this crap."
Your DevTools βββΊ Select Node/Request βββΊ Agent Investigates
β
ββ MCP Server βββΊ Remote Debug Port βββΊ Live Session β
Details + Gotchas (Don't Skip These) π
- Security: Dialog every time, plus banner. No sneaky malware vibes.
- Multi-instance? Still worksβisolates via profiles if needed.
- Beta only:
--channel=betarequired now. Stable soonβ’. - Full docs: GitHub README.
- Future drip: More DevTools panels (Console? Sources?) coming. Stay tuned π.
TL;DR / BURN THIS IN π―
- Why: Ditch re-logins, blend manual + AI debugging.
- Do: Enable
chrome://inspect#remote-debuggingβ--autoConnectβ Allow β Profit.
You tracking, fam? This flips workflowsβtest it, your brain will explode π€―.