Browser Bridge

Browser Bridge

Control your real Chrome from any AI agent

185 commands · HTTP API + MCP Server + CLI · Smart caching saves 90% tokens · Zero authentication friction

185 Commands MCP Compatible MIT License No Bot Detection
⭐ View on GitHub 📦 Install

The Problem

Every browser automation tool (Playwright, Puppeteer, browser-use) launches a fresh, empty browser — no logins, no cookies, no extensions. Your AI agent has to re-authenticate everywhere, fight captchas, and gets flagged as a bot.

Browser Bridge controls the browser you're already using.

Task Playwright / Puppeteer Browser Bridge
Automate Gmail Login → 2FA → trust device → automate ✅ Just automate (already logged in)
Scrape LinkedIn Login → captcha → scrape ✅ Just scrape (already logged in)
Fill a bank form Login → 2FA → SMS → fill ✅ Just fill (already logged in)
Post on social media Login → 2FA → post ✅ Just post (already logged in)

No re-authentication. No 2FA. No captchas. No bot detection.

185
Commands
100+
MCP Tools
90%
Token Savings
15
Categories

Unique Features

No competitor has these. This is what makes Browser Bridge special.

🧠 Smart Caching

Caches element selectors — no re-query needed on repeated actions.

Saves 90% tokens

📄 page_summary

AI-optimized compact page description instead of full HTML.

Saves 96% tokens

🔍 page_diff

Only return what changed since last call. Perfect for monitoring.

Saves 95% tokens

📝 fill_form

Fill entire form + submit in one call. Supports selector, name, id, label.

Saves 80% tokens

🔀 batch_conditional

Multi-step tasks with if/then/else/wait logic in one call.

Saves 80% tokens

👤 Session Profiles

Save/restore named profiles (cookies + localStorage + sessionStorage). Hot-swap accounts.

🤖 humanize_typing

Type with realistic delays + occasional typos. Bypasses behavioral bot detection.

🖱️ humanize_click

Click with offset + pre-click delay + multi-step mouse movement.

💬 natural_find

Find element by natural language ("blue submit button"). Heuristic scoring, no LLM.

🔄 Auto-retry

All clicks/fills retry 3x with exponential backoff. Fixes flakiness.

📸 Screenshot to File

Save screenshots to disk — no base64 in response.

Saves 99.9% tokens

🌐 HAR Recording

Capture all network traffic in HAR 1.2 format. Plus request mocking.

Quick Start

1. Install

git clone https://github.com/NaveedAshraf1/browser-automation-extension.git
cd browser-automation-extension/extension
npm install
npm start

2. Load Chrome Extension

Open chrome://extensions → Enable Developer mode → Load unpacked → Select the extension/ folder

3. Use It

curl
Python
JavaScript
# Navigate to a website
curl -X POST http://localhost:8766/api/command \
  -H 'Content-Type: application/json' \
  -d '{"cmd":"navigate","args":{"url":"https://example.com","wait":true}}'

# Get a compact page summary (saves 96% tokens)
curl -X POST http://localhost:8766/api/command \
  -H 'Content-Type: application/json' \
  -d '{"cmd":"page_summary","args":{}}'

# Click a button by text (auto-wait + auto-retry)
curl -X POST http://localhost:8766/api/command \
  -H 'Content-Type: application/json' \
  -d '{"cmd":"click","args":{"text":"Learn more"}}'

# Fill an entire form in one call
curl -X POST http://localhost:8766/api/command \
  -H 'Content-Type: application/json' \
  -d '{"cmd":"fill_form","args":{"fields":{"#email":"user@example.com","#password":"secret123"},"submit":"#login-btn"}}'
import requests

API = "http://localhost:8766/api/command"

def browser(cmd, **args):
    r = requests.post(API, json={"cmd": cmd, "args": args})
    return r.json()["result"]

# Navigate
browser("navigate", url="https://example.com", wait=True)

# Get page summary (compact, AI-optimized)
summary = browser("page_summary")
print(summary["title"], summary["visibleText"][:100])

# Click by text
browser("click", text="Learn more")

# Fill a form
browser("fill_form", fields={"#email": "user@example.com", "#password": "secret"}, submit="#login")

# Save session profile
browser("profile_save", name="work")
const API = 'http://localhost:8766/api/command';

async function browser(cmd, args = {}) {
  const res = await fetch(API, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ cmd, args }),
  });
  const data = await res.json();
  if (!data.ok) throw new Error(data.error);
  return data.result;
}

// Navigate and get page summary
await browser('navigate', { url: 'https://example.com', wait: true });
const summary = await browser('page_summary');
console.log(summary.title, summary.links);

MCP Server Setup

Browser Bridge includes an MCP server with 100+ tools for AI agents.

Claude Desktop

{
  "mcpServers": {
    "browser-bridge": {
      "command": "node",
      "args": ["/path/to/extension/mcp-server.js"]
    }
  }
}

Cursor / Windsurf

Add the same config to ~/.cursor/mcp.json or your Windsurf MCP config.

HTTP Transport

node mcp-server.js --http --port 8767
# MCP endpoint: http://localhost:8767/mcp

How We Compare

Feature Browser Bridge Playwright Puppeteer browser-use
Uses YOUR real Chrome✅❌❌❌
Keeps logins/sessions✅❌❌❌
HTTP API (any language)✅❌❌❌
MCP Server✅✅❌❌
Total commands185~80~60~20
Smart caching✅❌❌❌
Token saver commands✅ (9)❌❌❌
Session profiles✅❌❌❌
Humanized input✅❌❌❌
Auto-retry✅✅❌❌
HAR recording✅❌✅❌
Bot detection bypass✅❌❌❌
Cross-browser❌✅❌✅

185 Commands Across 15 Categories

Navigation (7)

navigatego_backgo_forwardreloadstop_loadingwait_for_loadwait_for_url

Page Inspection (14)

snapshota11y_snapshotpage_summarypage_diffget_titleget_urlget_textget_htmlfind_elementnatural_findget_bounding_boxget_attributesquery_selectorquery_selector_all

Interaction (17)

clickreal_clickclick_enhancedfind_and_clickhumanize_clickfillfill_formtypehumanize_typingpress_keyhoverscrollscroll_realselect_optiondrag_and_dropfocusblur

Wait / Assert (8)

waitwait_for_selectorwait_for_textwait_for_selector_gonewait_for_stateassert_visibleassert_textassert_state

Screenshots (3)

screenshotscreenshot_fullscreenshot_element

Cookies & Storage (9)

get_cookiesset_cookieget_all_cookiesclear_all_cookiesclear_site_dataget_local_storageset_local_storagesave_storage_staterestore_storage_state

Session Profiles (4)

profile_saveprofile_restoreprofile_listprofile_delete

Network (7)

network_log_startnetwork_log_stopnetwork_log_getnetwork_log_exportintercept_requestsnetwork_blocknetwork_block_list

Emulation (6)

emulate_geolocationemulate_networkemulate_color_schemeemulate_mediaemulate_touchemulate_timezone

Smart Caching & Token Savers (13)

smart_findsmart_clickcache_getcache_validatesave_selectorget_selectorlist_selectorsdelete_selectorbatchbatch_conditionalpage_summarypage_difffill_form

Chrome Features (9)

bookmarks_listbookmarks_searchbookmarks_createbookmarks_deletehistory_searchhistory_get_visitssessions_listget_notificationsidle_state