Claude Code Browser Automation: Connect Claude Code to Real Chrome
Give Claude Code complete, secure access to your authenticated Google Chrome sessions. Automate research, web app debugging, form submissions, and data extraction with zero cloud dependencies.
npm i -g agent-webbridge && awb setup "Work", then execute claude mcp add chrome -- npx -y agent-webbridge mcp. Claude Code instantly receives 13 browser control tools (navigation, accessibility snapshots with @e refs, clicks, typing, JavaScript execution) operating inside your live browser sessions.
1. 5-Minute Setup Walkthrough
Follow these three steps to connect your local Claude Code terminal environment to your browser:
Step 1: Install the WebBridge CLI
npm i -g agent-webbridge
Step 2: Pair Your Chrome Profile
Run the guided setup wizard. This locates your Chrome profiles, prints the exact extension path to load into Chrome, and pairs your profile with its local daemon:
awb setup "Work"
Step 3: Register WebBridge in Claude Code
Register the stdio Model Context Protocol (MCP) server directly inside Claude Code:
claude mcp add chrome -- npx -y agent-webbridge mcp
Alternatively, install it into Claude Code's agent skill registry:
npx skills add jeet-dhandha/agent-webbridge
2. Tested Claude Code Prompt Recipes
Here are verified prompt patterns that Claude Code executes accurately using WebBridge:
Recipe 1: Authenticated SaaS & Cloud Console Inspection
"Open my AWS Billing console or Stripe Dashboard in Chrome, take an accessibility snapshot of current month usage, and summarize anomalies."
Claude Code uses browser_navigate to load the URL, leverages your existing login cookies without triggering 2FA, reads the DOM via browser_snapshot, and returns structured tables.
Recipe 2: Multi-Tab Documentation Research
"Navigate to these 3 GitHub issue links in parallel tabs, evaluate the recommended fixes in each discussion, and synthesize a code patch."
Claude Code spawns parallel tabs using newTab: true, concurrently snapshots all 3 pages in seconds, and synthesizes the result without losing terminal focus.
Recipe 3: Complex Multi-Step Form Filling with Confirmation
"Fill out the staging deployment form with our test environment parameters. Show me the filled state before clicking Submit."
Claude Code targets fields using compact accessibility refs (e.g. browser_fill on @e12), captures a screenshot with browser_screenshot, and asks for your confirmation before executing browser_click on the submit button.
3. Safety & Human Review Boundaries
When giving AI agents access to real browser sessions, safety is paramount:
- Visible Tab Groups: Claude Code's browser sessions are grouped under an explicit tab group (e.g.
agent:mcp). You can see every tab as it opens and watch actions occur in real time. - Kill Switch: Closing the tab group or running
awb downinstantly terminates daemon access. You remain in complete control. - Localhost Loopback Only: Requests never leave
127.0.0.1. No third-party servers see your prompts, browsing history, or session data. - Human-in-the-Loop: You can explicitly instruct Claude Code never to submit forms, process payments, or delete resources without human confirmation in the terminal.
4. Troubleshooting & Diagnostics
If Claude Code encounters connection issues, run these diagnostic commands in your shell:
# Check extension, daemon, and profile status
awb doctor
# Verify the fleet router is healthy
curl -s http://127.0.0.1:10086/status
# Start or restart profile daemons
awb up "Work"
Frequently Asked Questions
awb doctor to verify local extension installation, followed by awb up to ensure daemons and the 127.0.0.1:10086 router are running. You can test the connection directly via curl http://127.0.0.1:10086/status.