Skip to main content
Glama

BrowserTwin

BrowserTwin™ lets AI agents drive the Chrome that is already installed on a computer, in a dedicated profile, and hand control back and forth with the person at the keyboard. The person can watch every step, take over at any time, and give control back when they are done.

It runs locally. There is no cloud service, no remote browser and no account.

Why we built it

We wanted an agent browser that fits into how you already work:

  • No new browser to install. BrowserTwin drives the Chrome you already have, in its own profile, so your everyday Chrome stays untouched.

  • One line to install, nothing to configure. No admin rights, no separate runtime: the installer puts everything in your user folder and brings its own Node.js (installers).

  • You and the agent take turns. Hand the window over, step in, and hand it back at any time.

  • Built to be embedded. Ship the engine inside your own app under a clear license: the AGPL-3.0, or a commercial license for closed-source products. See docs/embedding.md.

Related MCP server: chrome-faithful

What is in it

  • Engine: a daemon that starts Chrome over a CDP pipe, keeps task spaces (windows and tabs that belong to one agent task), tracks who is in control, and shows that on the page.

  • CLI btwin: runs agent scripts against the engine (btwin nodejs), prints the usage guide for agents (btwin skill), sets up profiles and sign-in (btwin setup), and updates itself.

  • MCP server (btwin mcp): the same engine as a local stdio MCP server.

  • Host API (hostapi/1): a local socket API for apps that embed the engine or show its state.

  • Tray / menu bar app (Tauri): status, task list, hand-off bar, settings.

  • Chrome extension: the toolbar button and page layer of the dedicated profile.

Prebuilt installers for macOS and Windows are attached to the releases of this repository.

Try the MCP server

d2wolab/browsertwin MCP server

BrowserTwin is listed in the Glama MCP directory. There you can browse the server's tools and check its quality score, and try it online with MCP Inspector.

Status

Beta (0.1.x). Interfaces in hostapi/1 only grow (fields and methods are added, never removed or changed). Everything else may still change between beta versions; see the changelog in packaging/public/CHANGELOG.md.

Requirements

  • Node.js 24 or newer (.nvmrc)

  • Google Chrome (stable) for running; tests in npm test do not start Chrome

  • Git (the build fetches the pinned SDK sources, see below)

  • For the tray app: Rust (stable) and the platform toolchain (Xcode command line tools on macOS, MSVC Build Tools on Windows)

Build

npm ci
npm run build:sdk     # builds the script SDK (packages/sdk) into dist/sdk
npm run build         # TypeScript workspaces
npm test              # unit and contract tests, no real browser
cargo build --manifest-path apps/menubar/Cargo.toml

The script SDK in packages/sdk/ is derived from an MIT-licensed SDK (see packages/sdk/LICENSE and THIRD_PARTY_NOTICES.md).

Run a development build:

node packages/cli/dist/bin.js setup           # create the dedicated profile, sign in once
node packages/cli/dist/bin.js nodejs < packaging/public/examples/02-screenshot.mjs
node packages/cli/dist/bin.js skill           # usage guide for agents

More examples: packaging/public/examples. The agent guide is packaging/skill/SKILL.md; its references/ files are added when the release is packaged (scripts/release/render-skill.mjs), so those links work only in an installed copy.

Release packaging (npm run package:mac, npm run package:win) needs signing keys; the steps are in the header comments of scripts/release/package.mjs and .github/workflows/release.yml.

Repository layout

Path

What it is

packages/protocol

Shared interfaces, IPC framing, paths, host API types, i18n tables (generated)

packages/daemon

The engine (wwt-browserd): Chrome launch, task spaces, control hand-off, host API

packages/worker

Script process: runs agent scripts with the SDK against the daemon

packages/snapshot

Page snapshot engine (text and element refs from Page.getAnnotatedPageContent)

packages/profile

Dedicated profile store and non-secret import from other browsers

packages/overlay

In-page status layer (edge highlight, agent pointer)

packages/extension

Companion Chrome extension (MV3)

packages/cli

btwin CLI

packages/mcp

Local stdio MCP server

packages/hostapi-client

TypeScript reference client of the host API

apps/menubar

Tray / menu bar app (Tauri, Rust + HTML)

tools/viewer

Minimal host API viewer for manual checks

i18n/

UI strings, one file per language (node scripts/make-i18n.mjs writes the copies)

packaging/

Installers, one-line install scripts, MCP bundle, public release files

scripts/

Build, SDK fetch, release tooling

test/

Contract, corpus, chaos and integration tests

Embedding the engine in another app

See docs/embedding.md for the options an embedding app sets (no BrowserTwin UI, own data folder, own server name, updates off) and docs/hostapi.md for the socket protocol. The engine never exposes cookies, page storage or passwords through any API.

Security

Report vulnerabilities privately; see SECURITY.md.

Contributing

Bug reports and ideas go to the issues of this repository. See CONTRIBUTING.md.

License

Draft wording, to be reviewed by a lawyer before publication.

BrowserTwin is free software under the GNU AGPL-3.0 (AGPL-3.0-only). You can install and use it at home or at work, for any purpose, at no cost.

If you want to embed BrowserTwin in a product you distribute, or run a modified version as a network service, without publishing your source under the AGPL, a commercial license is available. See COMMERCIAL.md or email d2wolab@gmail.com.

Third-party components keep their own licenses: see THIRD_PARTY_NOTICES.md. The BrowserTwin name and logo are covered by TRADEMARKS.md, not by the code license.

Available Tools

6 tools
list_spacesList task spacesA
Read-only

List task spaces: id, name, ownership (agent, agentDelegatedToUser = the user has control, user) and, for spaces you control, their tabs with URLs.

Inputs: no named parameters.

run_actionsRun page actionsA
Destructive

Run a list of page actions (click, fill, press, select, check, uncheck, wait) in order in one call, on a page of a task space you control. Stops at the first failure; nothing is reordered or retried. Each step reports what changed (URL, dialog, new tab, list counts, messages); after a click or key the next step waits for the page to be quiet (≤300 ms). Stops if the user has control. For anything else use run_script.

Inputs: actions (required), space_id (required), page, settle.

run_scriptRun browser scriptA
Destructive

Run a BrowserTwin SDK script (JavaScript, top-level await; same API as btwin nodejs, see resource wwt-lite://guide or help()). Batch several steps into one script: open or resume a space, act, wait, then console.log what the next step needs (a snapshot last). Returns the console output and errors. If the output says the user has control, stop and tell the user.

Inputs: code (required).

screenshotPage screenshotA
Read-only

PNG screenshot of a page in a task space you control; default is its active page. Read-only; stops if the user has control.

Inputs: space_id (required), page.

snapshotPage snapshotA
Read-only

Text snapshot (accessibility tree with @refs) of a page in a task space you control (default: its active page). For an overview use format "summary" (fields with dropdown options, buttons, links). To read data use "text", "list" with a selector (one line per item), "tables" or "pairs" (JSON). Output is cut at max_chars. Read-only; stops if the user has control. In a script, print page.snapshot() last instead.

Inputs: space_id (required), page, delta, limit, +5 more.

wait_for_controlWait for controlA
Read-only

After handing control to the user (task.handOff({ message })), wait until they give it back in the browser, then continue. Returns when control is back or after timeout_minutes (default 10); call again to keep waiting. Never takes control back.

Inputs: space_id (required), timeout_minutes.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 6 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: list_spaces, snapshot, screenshot, and wait_for_control are unambiguous. The main overlap is run_script versus run_actions, since both can click/fill/wait on pages, but the descriptions explicitly delineate the boundary (ordered action lists vs. arbitrary SDK scripting) so misselection is unlikely.

    Naming Consistency4/5

    Four of six tools follow a verb_noun pattern (run_script, run_actions, list_spaces, wait_for_control), while snapshot and screenshot are bare nouns. The deviation is minor and readable, but it keeps the set from being fully uniform.

    Tool Count5/5

    Six tools is a tight, well-scoped set for a browser-automation server: observation (snapshot, screenshot), action (run_actions, run_script), discovery (list_spaces), and handoff (wait_for_control). Each tool earns its place with no redundancy.

    Completeness4/5

    The surface covers the core loop of listing spaces, observing pages, acting, and handing control to the user, with run_script serving as a general escape hatch for opening/resuming spaces and other SDK operations. Explicit lifecycle tools for spaces (create/close) and navigation are absent, but agents can work around this via run_script.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that enables AI coding agents to take over a real, already-logged-in Chrome via CDP, with port lease, watchdog, and state-machine governance for concurrency and stability.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that gives AI agents faithful control of real, logged-in Chrome profiles via a secure local bridge and extension, with exact multi-profile routing and no debug profiles or remote debugging ports.
      5
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      A CDP-native MCP server that lets AI agents drive a real Chrome browser with deep network/console inspection, robust page interaction, and the ability to reverse-engineer a site's API flow into runnable code with dependency chaining and replay verification.
      52
      22 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      A local MCP server that lets AI agents and human operators drive isolated Chromium profiles with their own cookies, fingerprints, and proxies, exposing tools for navigation, clicking, typing, extraction, screenshots, JavaScript evaluation, tabs, cookies, and waits. Because session and login state persist per profile, agents can carry out real authenticated workflows across sessions.
      MIT