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: --autoConnect hooks 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=beta till 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=beta required 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 🀯.

Original article

← All notes