DEV Community

Jeet Dhandha
Jeet Dhandha

Posted on Originally published at jeet-dhandha.github.io

WebBridge for Agents - Multi-Profile Chrome Browser Automation & MCP Server for AI Agents (agent-webbridge)

TL;DR / What is WebBridge?

WebBridge (agent-webbridge) is an open-source (MIT), clean-room browser automation engine and stdio Model Context Protocol (MCP) server for AI agents.

Unlike traditional headless scrapers that trigger Cloudflare captchas or official extensions restricted to a single tab, WebBridge drives your real Google Chromeβ€”with your authentic login sessions, cookies, and 2FAβ€”across multiple profiles simultaneously, with true per-tab DevTools parallelism.


The Problem: Why Existing Browser Bridges Choke on Real Work

If you've tried giving AI agents (Claude Code, Cursor, Windsurf) access to a browser, you've likely hit these walls:

  1. Headless Scrapers (Playwright / Puppeteer): Bot protection (Cloudflare Turnstile, Akamai, Google reCAPTCHA) immediately flags them. Re-logging into Google, GitHub, or LinkedIn headlessly is painful and fragile.
  2. Single-Tab Bottlenecks: Most browser extensions funnel every Chrome DevTools Protocol (CDP) command through a single global "active tab". If your agent needs to compare 5 documentation pages or scrape 10 search results, it has to wait serially.
  3. Single Account Concurrency: You can't easily instruct an agent to inspect a deployment in your Work Google profile while drafting an issue in your Personal profile without manual tab switching.

How WebBridge Solves It

caller (Claude / Cursor / curl)
          β”‚ HTTP POST /command (port 10086) or stdio MCP
          β–Ό
   awb central router
     β”œβ”€β”€ Profile "Work"      ──▢ daemon (port 13336) ──▢ extension ──▢ Tabs 1, 2, 3 (parallel)
     β”œβ”€β”€ Profile "Personal"  ──▢ daemon (port 13222) ──▢ extension ──▢ Tabs 4, 5    (parallel)
     └── Profile "Developer" ──▢ daemon (port 13431) ──▢ extension ──▢ Tabs 6, 7    (parallel)
Enter fullscreen mode Exit fullscreen mode

1. True Per-Tab CDP Parallelism

WebBridge attaches chrome.debugger per tab using an internal Map keyed by tabId. N tabs in one profile run concurrently:

  • Serial execution: 5 tabs evaluating sleeping payloads take ~9.3 seconds.
  • WebBridge parallel execution: 5 tabs evaluate concurrently in ~3.5 seconds.

2. Multi-Profile Fleet Orchestration

Behind a lightweight loopback router on 127.0.0.1:10086, WebBridge manages isolated daemons for each Chrome profile. Pass "profile": "Work" or "profile": "Personal" in any command to drive multiple identities at once.

3. Community Recipes (awb-recipes)

Never let your agent guess fragile CSS selectors. WebBridge includes awb-recipesβ€”structured, community-maintained JSON playbooks with battle-tested fallback selectors and anti-bot caveats for Google Search, GitHub Gists, Hacker News, LinkedIn, and more.

4. Zero Cloud, Zero Telemetry

Everything runs locally on 127.0.0.1. No external relay, no accounts, and built-in security filters rejecting any unauthorized non-loopback Host or remote Origin requests.


Architectural Comparison

Feature Headless Playwright Cloud Browser APIs Traditional Bridges WebBridge (agent-webbridge)
Real Logged-in Sessions ❌ Requires re-login ❌ Isolated remote box βœ… Yes βœ… Yes (Full 2FA & Cookies)
Multi-Profile Concurrency ❌ Complex setup ❌ Costly ❌ 1 profile βœ… Unlimited Profiles (NΓ—M)
Per-Tab Parallelism βœ… Yes ⚠️ Metered/Throttled ❌ 1 Tab at a time βœ… True Parallel CDP (Map)
Browser identity ❌ Often challenged ⚠️ Varies βœ… Your own Chrome profile βœ… Your own Chrome profile
MCP Integration ⚠️ Needs wrapper ⚠️ Custom REST ⚠️ Experimental βœ… Zero-dep stdio & HTTP MCP
Cost & Privacy Free / Local $0.05–$0.20 / min Free / Closed 100% Free, MIT, 127.0.0.1

30-Second Setup for Claude Code & Cursor

Step 1: Install CLI & Daemon

npm i -g agent-webbridge
awb setup "Work"
Enter fullscreen mode Exit fullscreen mode

(Follow the interactive prompt to load the unpacked extension into Chrome Developer mode.)

Step 2: Add to your MCP Config

For Claude Code:

claude mcp add chrome -- npx -y agent-webbridge mcp
Enter fullscreen mode Exit fullscreen mode

For Claude Desktop / Cursor / Windsurf (mcpServers):

{
  "mcpServers": {
    "chrome": {
      "command": "npx",
      "args": ["-y", "agent-webbridge", "mcp"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The 13 Headful Browser Tools Included

  1. navigate β€” Open URLs, wait for network idle, or spawn new background tabs.
  2. find_tab β€” Locate tabs across profiles by URL regex or page title.
  3. evaluate β€” Execute sandboxed JS expressions in page context.
  4. snapshot β€” Extract clean accessibility trees with stable @e element references.
  5. click / trusted_click β€” Dispatch real CDP-level mouse events (isTrusted: true).
  6. fill β€” Set input values with native event dispatching (supports <input>, <textarea>, and contenteditable).
  7. network β€” Capture and inspect XHR/fetch request traffic.
  8. upload β€” Handle native file input uploads.
  9. screenshot β€” Capture full-page or viewport PNGs directly to disk.
  10. save_as_pdf β€” Export pages to clean PDFs.
  11. list_tabs β€” Inspect all open tabs and tab groups across profiles.
  12. close_tab β€” Safely release debugger attachments and close tabs.
  13. close_session β€” Clean up tab groups when tasks conclude.

Links & Ecosystem

Feedback, PRs, and community recipes are welcome! ⭐ Star the project on GitHub if you find it helpful!

Top comments (0)