Agent Webbridge

io.github.jeet-dhandhav1.3.1更新於 Oct 9, 2026

Drive your real, logged-in Chrome (many profiles, parallel tabs) from any MCP client. Local only.

已驗證STDIO僅桌面Developer ToolsBrowser Automation

概覽

AI 產生的概覽

讓 AI 助理透過本機 MCP 工具操作你已登入的真實 Chrome,進行導覽、點擊、填表、截圖與 JavaScript 求值。

功能
在本機執行 MCP 伺服器,控制你真實的 Chrome 瀏覽器,沿用你既有的登入工作階段,而非無頭或雲端瀏覽器。工具包含 navigate、find_tab、snapshot、click、trusted_click、fill、upload、evaluate、screenshot、save_as_pdf、network、list_tabs、close_tab 與 close_session。呼叫可指定 Chrome 設定檔與工作階段,因此多個設定檔與大量分頁可以並行執行。所有通訊都經由本機回送介面。
適用情境
當助理需要在依賴你現有登入、通行金鑰或雙重驗證的頁面中操作,或目標網站會阻擋無頭與雲端瀏覽器時適用。也適合需要多個帳號或多個分頁並行的工作,例如讀取頁面、填寫表單或截圖。不適用於對你無權自動化的帳號或網站進行無人看管的操作。
執行需求
需要 macOS 或 Windows、Google Chrome 以及 Node.js 18 或更新版本;此套件透過 npx 在本機執行。一次性安裝會部署守護程序與 Chrome 擴充功能,每個 Chrome 設定檔都需要啟動並連線。未宣告帳號、API 金鑰或環境變數,但非標準 Chrome 安裝可設定 AWB_CHROME_BIN 與 AWB_CHROME_DIR。Linux 路徑已撰寫但未經測試。
安裝前請注意
它會以你的身分在你已登入的瀏覽器中操作,因此任何能連上本機回送命令埠的本機程式也能做同樣的事;請只在信任的機器與帳號上執行。發佈、付款、刪除等不可逆操作應保留人工確認。它可以讀取頁面內容、執行 JavaScript、擷取網路請求、上傳檔案,並把截圖或 PDF 存到磁碟。請僅對你有權自動化的帳號與網站使用,並遵守其條款。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Agent Webbridge,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

agent-webbridge

[npm] [Chrome Web Store] [license] [node]

Let Claude Code, Cursor and any MCP client drive your real, logged-in Chrome — many profiles, many tabs, in parallel. No headless re-login, no bot detection, no cloud. Nothing leaves 127.0.0.1.

Add it to your agent (30 seconds)

bash
npm i -g agent-webbridge && awb setup "Work"     # once: installs the daemon + the Chrome extension

Then add the MCP server to Claude Desktop, Claude Code, Cursor or Windsurf:

json
{  "mcpServers": {    "chrome": { "command": "npx", "args": ["-y", "agent-webbridge", "mcp"] }  }}

Claude Code: claude mcp add chrome -- npx -y agent-webbridge mcp

Or install it as an agent skill (Claude Code, Cursor, Codex and others): npx skills add jeet-dhandha/agent-webbridge

Your agent now has browser_navigate, browser_snapshot, browser_click, browser_fill, browser_evaluate, browser_screenshot and more — all running in your Chrome, with your sessions. Pass profile to choose an account and tabId to run tabs in parallel. If a call fails, browser_status tells the agent which profile isn't connected.

Why not Playwright or a cloud browser?

Cloud browsers (Browserbase, Steel…)Headless Playwright / Puppeteeragent-webbridge
Costusage-basedfreefree, MIT
Your logins, passkeys, 2FAre-auth or upload cookiesre-login; 2FA breaksalready signed in
Bot detection (Cloudflare, Datadome)flagged cloud IPsoften blockedit's your real browser
Where your data goesa third-party serverlocallocal only, 127.0.0.1
Several accounts at onceseparate sessions to managemanual orchestrationone profile per account, parallel tabs

It automates a browser you are already signed in to — use it only on accounts and sites you are entitled to automate, and respect each site's terms.

agent-webbridge is a tiny Node daemon (one runtime dependency: ws) plus a clean-room MV3 Chrome extension. An agent POSTs a command to a local router → the router fans it out to the right profile's daemon → the extension attaches the Chrome DevTools Protocol per tab.

See it work

Real runs, not mock-ups: a script sends MCP calls to npx agent-webbridge mcp, which drives a real, signed-in Chrome profile. The screenshots are the browser's own and the timings are measured. Public pages only; nothing is submitted to any account.

Read any page: snapshot + evaluate on Hacker News
[Read any page]
Five tabs at once: 3.5 s in parallel vs 9.3 s one at a time
[Five tabs in parallel]
Use your real login: a signed-in editor, filled in, stopped before publishing
[Use your real login]
Fill and submit forms (fields, radios, checkboxes)
[Fill and submit forms]

Timings come from one MacBook on home broadband; yours will differ.

Overview

  • Drive your real browser — your actual Chrome, your actual login sessions. No headless re-login, no scraping around auth.
  • Run tabs in parallel — the extension attaches chrome.debugger per tab, so N tabs in one profile run concurrently. 10 tabs finish as fast as 1 (~2 s, flat).
  • Span multiple profiles — one daemon per profile. Total concurrency = profiles × tabs, all from one endpoint.
  • Stay private — own daemon, own MV3 extension, no closed-source dependency, no account. Everything is local.

Install

bash
npm i -g agent-webbridge        # 1. the daemon + the `awb` CLIawb setup "Work"                # 2. opens the Chrome Web Store; click "Add to Chrome"

awb setup opens the Agent WebBridge listing in your chosen profile and polls while you click Add to Chrome. As soon as it detects the install, it wires the profile to its daemon and brings the fleet up.

Requirements: macOS or Windows · Google Chrome · Node.js ≥ 18.

Quickstart

bash
awb up "Work" "Personal"        # bring profiles up (setup did this on first run)
# Drive any profile by name — using the handy cmd helper function:cmd(){ curl -s -m 60 -X POST http://127.0.0.1:10086/command -H 'Content-Type: application/json' -d "$1"; echo; }
cmd '{"action":"navigate","args":{"url":"https://news.ycombinator.com"},"session":"scan","profile":"Work"}'
awb down                        # stop the fleet when done

Every call is a POST /command on 127.0.0.1:10086. Wrap payloads in single quotes ('...') to prevent shell quote-escaping issues. "session" groups a task's tabs into one Chrome tab group; "profile" picks which Chrome profile to drive. Pass {"action":"screenshot","args":{"path":"/path/to/img.png"}} to save screenshots directly to disk.

Tools

ToolDoes
navigateOpen a URL in a new or existing tab
find_tabLocate a tab by URL / title
evaluateRun JavaScript in the page, return the result
snapshotAccessibility tree with stable @e element refs
clickClick an element by @e ref
trusted_clickReal mouse click (CDP, isTrusted) for pages that ignore click
fillSet native inputs and contenteditable fields
uploadUpload a file to a file input
screenshotCapture a page screenshot
save_as_pdfSave the page as a PDF
networkCapture network requests
list_tabsList the session's tabs
close_tabClose a tab
close_sessionClose a session and its tab group

How it works

  AI agent  ──HTTP POST /command──▶  router (127.0.0.1:10086)   routes by "profile"                                          │                       ┌──────────────────┼──────────────────┐                       ▼                  ▼                  ▼                  daemon "Work"      daemon "Personal"     daemon …      one per profile                       │  WebSocket                       ▼                  MV3 extension      ──chrome.debugger (a Map: one attach PER TAB)──▶                       │                       ▼                  Chrome DevTools Protocol      tab 1 ║ tab 2 ║ tab 3   (concurrent)

The router proxies each command to the per-profile daemon on its deterministic hashed port; the daemon relays over WebSocket to that profile's extension; the extension keeps a Map of chrome.debugger attachments — one per tab — and issues CDP calls. That per-tab map is the whole trick: bridges that funnel everything through a single "current tab" can only drive one tab per profile; this drives N.

CLI

CommandDoes
awb setup <profile…>One-time install: walk through "Load unpacked", connect, bring the fleet up
awb up <profile…>Start the named profiles' daemons + router, open windows, connect
awb downStop the router + fleet
awb connect <profile…>Point each profile's extension at its daemon
awb check [profile…] [--json]Read-only readiness probe (folder? dev-mode? loaded? connected?) — what an agent polls during install
awb statusPer-profile daemon + extension-connection status
awb doctorDiagnose the environment (Chrome, profiles, daemon, extension)
awb mcpRun the stdio MCP server (what the config above launches)
awb profilesList Chrome profiles, their hashed ports, and extension presence

<profile> is anything that resolves uniquely — the profile name ("Work"), an email, or the Chrome directory ("Profile 2").

Use it from an AI agent

Ship it as a Claude Code skill / plugin — the bundled agent-webbridge skill teaches an agent the full flow (install via awb check --json, then drive over POST /command). To hack on the extension itself, awb install-dev Load-unpacks the in-repo build (chrome://extensions → Developer mode → Load unpacked → agent-webbridge-extension/); it ships its own key, so the dev id is stable across reloads.

Platform

macOSWindows
Profile discovery~/Library/Application Support/Google/Chrome%LOCALAPPDATA%\Google\Chrome\User Data
Chrome binary/Applications/Google Chrome.appProgram Files\Google\Chrome\Application\chrome.exe (auto-detected)
Daemon, router, MCP, all tools✅✅
Install flow (awb setup)opens the profile window via AppleScriptopens it by launching Chrome with the profile
Tab/window housekeeping (focus, tidy blank windows)✅skipped — cosmetic only

Set AWB_CHROME_BIN / AWB_CHROME_DIR if Chrome or its data directory is somewhere non-standard (Chrome Beta, portable installs). Linux paths are wired up but untested.

On Windows, run commands from PowerShell or cmd (the curl examples below use bash quoting; in PowerShell use curl.exe and a here-string, or just use the MCP server). The daemon and the Windows code paths are covered by CI on windows-latest; the Chrome-launching steps (awb setup / awb up) are the least-tested part — please open an issue if one misbehaves.

Security

  • Everything listens on 127.0.0.1 only. As of 1.3.1 the router and daemons also refuse requests that carry a web Origin or a non-loopback Host, so a website you visit cannot drive the bridge (see the changelog). Upgrade from earlier versions and restart the fleet with awb down && awb up.
  • It acts as you, in your signed-in browser. Any local program that can reach 127.0.0.1:10086 can do the same, so only run it on a machine and account you trust, and keep irreversible actions (posting, paying, deleting) behind a human confirmation in your agent.
  • Report vulnerabilities privately through GitHub's "Report a vulnerability" on the Security tab.

License

MIT © jeet-dhandha

來源:README.md,提交 bfd8cf7

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v1.3.1最新Oct 9, 2026