hooosberg/AgentLimb
Sobre
MIT open-source Chrome extension (5.0★ on CWS) + 100% local MCP bridge. Let any AI agent control multiple background tabs & profiles with native silent file upload.
IA e aprendizado de máquinaCrescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- +1
- em 15 dias
- +14
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalAgentLimb
English · 简体中文
Install on Chrome Web Store (5.0★) · Official Website · Offline Releases · Tutorials
Current version: v0.9.0 / l23 · MIT Open Source (Free for personal & commercial use) (see CHANGELOG.md).
AgentLimb is a cross-platform, MIT open-source Chrome extension + 100% local MCP bridge (127.0.0.1) that lets any MCP-capable AI agent control your real Chrome browser. Works out of the box with Claude Code, OpenAI Codex, Cursor, Antigravity, Windsurf, Trae, Tencent WorkBuddy, Doubao MCP, Cline, Roo Code, and any standard MCP client — across Windows, macOS, and Linux (Chrome / Edge / Brave / Arc).
Why AgentLimb?
- MIT Open Source & 100% Local: Standard OSI MIT license (safe for personal and commercial use), zero cloud relay, zero telemetry, zero npm runtime dependencies.
- Official Chrome Web Store Extension (5.0★ · 560+ users): One-click install from the Chrome Web Store, or load the offline zip in Developer Mode.
- Real Logged-In Browser & Background Multi-Tab Control: Keeps all your cookies, sessions, and extensions intact. Operates multiple background tabs concurrently inside an orange
AgentLimbtab group via focus emulation — never steals your foreground focus. - Native Background File Upload (
upload_file): Upload videos, images, and multi-file batches directly into<input type="file">without popping up OS file dialogs — built for real-world content publishing, form filling, and batch workflows. - Multi-Profile Routing + Complete 17-Tool Native Set: Control multiple Chrome profiles simultaneously via the
browserparameter, with built-in network capture (read_network_requests), console logs (read_console_messages), JS eval (javascript_eval), accessibility tree (read_page/find),wait, andbrowser_batch(up to 20 actions in one call).
Comparison with Other Browser MCP Tools
| Feature | AgentLimb (v0.9.0) | Playwright / Puppeteer MCP | Typical Single-Tab Extension MCP |
|---|---|---|---|
| License | MIT (Free & Commercial OK) | Apache-2.0 / MIT | Varies |
| Chrome Web Store | Yes (5.0★ · 560+ users) | No (CLI / Headless) | Often unpacked only |
| Reuse Real Logins / Cookies | Yes (your daily Chrome) | No (clean headless profile) | Yes |
| Multi-Tab Background Control | Yes (non-intrusive, no focus steal) | Headless only | Usually foreground-bound |
| Multi-Chrome Profile Routing | Yes (native browser param) |
Manual launch args | Rarely supported |
| Silent Background File Upload | Yes (upload_file, no OS dialog) |
Yes (headless only) | Rarely supported |
| Network & Console Capture | Yes (200-entry ring buffer) | Yes | Partial |
| Universal AI Compatibility | Any MCP client (IDE & Chat Agents) | Any MCP client | Often tied to one IDE |
Copying the prompt is the whole first-time authorization. Enabling and trusting MCP stays with the agent's own software. Inside the 30-minute window that Copy opens, the first AI to connect is trusted automatically — no confirmation page, no pairing code. The side panel teaches you the copy step while unpaired, and becomes the chat window once connected. The panel is optional: the agent works either way, in its own background tab, without disturbing the page you are reading.
Quick start
Recommended: Install directly from the Chrome Web Store, open the AgentLimb side panel, click "Copy connection prompt", and paste it to your AI agent (your agent will automatically install
~/.agentlimband configure MCP).
Prefer manual CLI / offline setup? Follow the steps below:
# 1. Check Node.js >=18, then install the local MCP host and print the config JSON
node --version
bash scripts/install.sh --client-name "WorkBuddy" --client-kind "workbuddy"
# Windows: powershell -ExecutionPolicy Bypass -File scripts/install.ps1 --client-name WorkBuddy --client-kind workbuddy
# 2. Load the extension in Chrome
# chrome://extensions → Developer mode → Load unpacked → select this folder
# Windows: keep this folder on a plain-English path (e.g. C:\AgentLimb).
# A path with non-ASCII characters fails to load — see the note below.
# 3. Click "Copy connection prompt" in the side panel and hand it to your agent
# Copying is itself the authorization (30-minute window); no code to paste anywhere
# Enable/trust MCP when the software asks, and reload as needed
# 4. Call AgentLimb ping and tabs_context from the agent session to verify; no confirmation page appears
The installer only places the host files and prints JSON — it never writes another app's own configuration. The intake window opened by Copy lasts 30 minutes and authorizes exactly one AI; if it expires, click Copy again — no config change, no restart. Config format and the MCP enable/trust entry point are decided by each client; never read the generic JSON example as "already enabled".
Windows: unzip to a plain-English path (e.g.
C:\AgentLimb). A folder path containing non-ASCII characters — most often a Chinese user name, e.g.C:\Users\张三\Desktop— makes Chrome refuse to load the extension withCould not load javascript 'kernel/control/content/a11y-tree.js' for script.Spaces are fine. macOS and Linux are unaffected. Verified on real Windows with Edge 155 and Chrome 156.
Local debugging (works without Claude Code):
node bin/agentlimb.mjs mcp # stdio MCP; starts the bridge after initialize
node bin/agentlimb.mjs status # probe whether the bridge is online
npm test # end-to-end protocol tests (with a simulated extension)
When it does not connect
Check in this order. Each step rules out one stage, and passing one stage says nothing about the next.
| Symptom | What it means | What to do |
|---|---|---|
On Windows the extension will not load; the error mentions Could not load javascript … |
The extension folder sits on a path containing non-ASCII characters | Move the folder to a plain-English path such as C:\AgentLimb, then load it again; spaces are fine |
| A tool call returns "not authorized" | The 30-minute intake window expired, or another AI already used it | Click Copy connection prompt again — no config change, no restart |
| The app lists AgentLimb but tools never answer | The MCP entry is merged but not enabled/trusted by that app, or its process is not running | Enable and trust MCP in the app, then restart its MCP process |
| Nothing happens at all | The host may not be where the config points | node bin/agentlimb.mjs status, then confirm ~/.agentlimb/host/mcp-server.mjs exists |
| A second AI cannot take over | One controller holds the browser task lock while the first AI is busy | Wait for the current task; a switch while busy is refused by design |
| The first connection takes a while | The service worker was asleep | Open the side panel to wake it; otherwise expect up to about a minute |
ping and tabs_context succeeding in the session you actually care about is the only proof the connection works. A reachable port, a trust file, or another client's success never substitutes for it.
Architecture
┌─────────────┐ stdio MCP ┌──────────────────────┐ SSE (push) ┌─────────────────────┐
│ AI client │ ◄──────────► │ host/mcp-server.mjs │ ◄─────────── │ Extension service │
│ (any client) │ JSON-RPC │ host/bridge-server │ POST (back) │ worker: persistent │
└─────────────┘ └──────────────────────┘ │ debugger session + │
127.0.0.1:8765-8780 (up to 16 hosts) │ content scripts │
└─────────────────────┘
Three roles, zero dependencies (Node built-ins and plain JS only — no npm packages):
| Layer | Files | Responsibility |
|---|---|---|
| Extension background | kernel/control/background/ |
Bridge client (SSE/POST), CDP debugger management, tool routing |
| Page scripts | kernel/control/content/ |
Accessibility tree (resident from document_start), control indicator |
| Side panel | ui/sidepanel/ |
Connection prompt, per-AI isolated chat, client management, settings (no confirmation page) |
| Local host | host/ bin/ |
MCP stdio server + local HTTP/SSE bridge |
| Shared | kernel/shared/constants.js kernel/control/host/tools.js kernel/prompt/ |
Protocol constants, tool catalog (one source for both sides), prompt generation |
Install, client trust, and browser authorization are separate stages
The installer deploys ~/.agentlimb and prints the mcpServers.agentlimb block. After merging it into the target app's real config, the user still has to enable/trust MCP as that app requires. Copy connection prompt in the side panel performs the authorization in the same gesture: the extension opens a 30-minute window and the first unknown AI to connect inside it is trusted — no confirmation page, no pairing code. If the window expired or was already consumed, tool calls immediately return "not authorized" so the user can copy again, with no config change and no restart. Only a successful ping and tabs_context from the current target session proves the connection works.
The host keeps a stable identity file per client name + kind combination; the old shared client-id.json does not inherit trust. A known identity with saved trust reconnects automatically and never steals the current chat window; a new identity needs one intake window. An old runtime directory, a reachable port, a trust file, or another client's success can never prove, on their own, that the current client is connected.
The extension connects up to six MCP hosts at once and keeps their trust separately; connectedClientId marks the single controller. A trusted client's handshake never takes control automatically — an explicit switch only applies while the task is idle, and a switch while busy is refused. Non-ping tools from other clients queue until the host deadline and are dropped if they expire.
Interaction principles
- The side panel and control are fully decoupled: tool calls travel service worker ↔ bridge, whether or not the panel is open.
- Unpaired: the panel offers the copy prompt; settings stay reachable from the top bar.
- Paired: the panel is the chat window with the current controller. The top bar keeps the copy prompt and settings, and shows the current AI and the number of saved pairings. Every message automatically carries a screenshot of the current tab, its title/URL, a body excerpt, and refs for interactive elements — so "what is this page about" or "click this for me" needs no separate screenshot or tab report. Enter sends, Shift+Enter adds a newline.
- The AI's replies come back to the same window (the
saytool); the work in between folds into one "ran N steps" row that expands on click, so the transcript is never flooded with logs. - In-page control feedback: a glowing outline plus a ghost cursor, so whichever tab you are in, you can see which tab the agent is touching.
- Per-client trust is kept separately: a dropped connection or an exiting MCP process only marks the client offline; removing it in settings is what revokes that client's trust.
- One controller, serial execution: another trusted client never takes control just by starting up or handshaking. The user can switch while idle; a busy switch is refused. A newly paired client waits for the current task to finish before taking over.
pingonly checks, it never takes control.
Efficiency design (the key fixes against the reference implementation)
The archived 0.2 line used HTTP polling for its control path, and every hop cost something. This line fixes each one:
| # | Old problem | This line |
|---|---|---|
| 1 | The service worker polled the bridge queue every 300ms, with a 50ms busy-poll; alarms restarted the relay after suspension | SSE long-lived push, zero latency host→ext; POST for replies; alarms only as a last-resort wake-up |
| 2 | debugger.attach + detach per action (10–50ms each, fighting DevTools for the lock) |
Persistent per-tab attach, in-flight deduplication, reattach only when Chrome kicks it |
| 3 | Content scripts injected on demand, re-asked on every snapshot | document_start all-frame resident a11y script; ref map cached in a WeakMap |
| 4 | Only the foreground tab could be operated | Emulation.setFocusEmulationEnabled plus auto-mute, so background tabs are operable without stealing focus |
| 5 | Fixed-quality PNG screenshots, frequently over the size limit | Adaptive JPEG quality (75→10), ~1.2MB base64 budget |
| 6 | One tool call per step, RTT stacking up | browser_batch submits up to 20 actions in one call |
| 7 | Four task tools (task_plan / task_step_done / task_complete / task_fail) plus side-panel progress rendering, all overhead |
Removed for minimal overhead (15 lean browser tools, plus local say and ping) |
Other details: every CDP command has a timeout; console/network are captured continuously on the persistent session (200-entry ring buffer); password and sensitive fields are redacted inside the a11y tree; same-origin iframes and shadow DOM are walked into the tree with coordinate offsets.
Tool catalog (17, including local say and ping)
tabs_context tab_new tab_close tab_activate read_page find computer
form_input upload_file navigate javascript_eval wait read_console_messages
read_network_requests browser_batch say ping
Multi-browser / multi-profile routing
When you only run one Chrome profile, you never have to think about routing. If you open 2+ Chrome profiles simultaneously (each with AgentLimb installed, for example multi-account operations), AgentLimb routes commands across them without adding extra tools or changing your MCP config:
- Automatic profile identity + one-click copy: each Chrome profile generates a persistent ID (
Profile-xxxxxx) and automatically reads the signed-in Google email as its default label if available. The bottom bar of the side panel shows the current browser profile (label (id)) — click it to copy the identifier for your AI, or click Rename (Settings → Advanced) to give each browser a short alias (e.g.work,personal). - Optional
browserparameter on every browser tool: passbrowser: "work"(supports exact ID, exact label, or unambiguous substring match) onnavigate,tabs_context,computer,say, etc. to operate multiple browsers simultaneously or sequentially. - Auto-injected context & disambiguation: when 2+ browsers are connected to the bridge at once, tool results automatically include a
MULTI-BROWSER (auto)hint listing all connected profiles (labelandid). If your instruction is ambiguous across multiple open browsers, the AI is instructed to ask which browser profile to operate first.
The catalog lives in kernel/control/host/tools.js and is shared by the extension and the MCP host — change it once, both sides follow.
Layout
manifest.json MV3 (debugger / sidePanel / tabGroups / alarms)
kernel/shared/constants.js protocol constants, SSE frame types, storage keys
kernel/control/host/tools.js tool catalog (single source of truth)
kernel/control/background/
service-worker.js entry: wiring + message routing + alarm keepalive
bridge-client.js port discovery, SSE, pairing, user_message queue
debugger.js persistent attach / focus emulation / adaptive screenshots / event capture
router.js executor for the 15 browser tools
kernel/control/content/
a11y-tree.js document_start all-frame injection: ref map + accessibility tree
indicator.js glowing outline / ghost cursor / stop button
kernel/prompt/build-prompt.js the connection prompt the side panel copies (zh/en)
ui/sidepanel/ onboarding, current-AI chat, multi-client settings
host/bridge-server.mjs HTTP+SSE bridge, trust registry, tool_call correlation
host/mcp-server.mjs stdio MCP ↔ bridge
bin/agentlimb.mjs CLI: install / config / doctor / mcp / status / pair-status / uninstall
host/install.mjs shared install logic and MCP JSON generation
host/diagnostics.mjs read-only connection-stage diagnostics
scripts/install.sh|ps1 Node version check, then delegate to the CLI
tests/ Node's native test runner, including end-to-end protocol tests
What is actually verified
npm testcovers the protocol and modules automatically;node scripts/live-test.mjsruns a browser/MCP integration pass with its own temporary HOME, Chrome profile, extension copy, and ports, then cleans up — it never touches your daily~/.agentlimbinstall.- Earlier live and cross-platform reports are historical baselines; they do not establish acceptance for the current source version.
- Loading the config and trusting MCP inside real agent clients, plus specific models and monkey testing, still need independent acceptance. Nothing is claimed to pass without observed evidence.
Known boundaries
- Up to 16 candidate MCP hosts (as defined by
BRIDGE_PORTS, 8765~8780 to prevent Winsock TIME_WAIT exhaustion) are probed; one controller holds the current browser task lock. Trust, chat history, and drafts are isolated per AI. - Side-panel chat is "leave a message" semantics: a message is delivered with the agent's next tool result (it is not pushed while the agent is idle).
javascript_evalgoes through CDP, so it still works on pages with a strict CSP (debugger permission).- The first connection depends on the service worker being awake: once installed it stays resident while Chrome runs; after a sleep, expect up to about a minute to reconnect (opening the panel triggers it immediately).
Relationship to the old version
main in this repository is the maintained line (the contents of this working tree). The 0.2 era version (cowork_local) is archived on the
archive/cowork-local branch and is no longer updated. The old line retains its task progress mechanism, HTTP polling bridge, 12-language i18n and agentlimb.com site.
Links
| Official Website | https://agentlimb.com/ |
| GitHub | https://github.com/hooosberg/AgentLimb |
| Blog & Tutorials (Hooosberg) | https://hooosberg.com/en/apps/agentlimb/ |
If AgentLimb is useful to you, please ⭐ star it on GitHub — it is the biggest encouragement for an independent developer, and it decides whether this project keeps shipping: https://github.com/hooosberg/AgentLimb
Explore projetos relacionados
Carregando…