Browser automation for AI agents · Rust

The browser your agent
would pick.

A small Rust MCP server on a bundled Chromium. It speaks Playwright MCP’s tools, uses a third of the memory, and adds what agents kept asking for: pages as Markdown instead of giant snapshots, many steps in one call, and a hand-off that gives a person the exact live page.

$ git clone https://github.com/luka-loehr/browser-rs
$ cd browser-rs && cargo build --release
$ claude mcp add browser-rs …/target/release/browser-rs
Memory, 4 real pages
535 MB
Playwright MCP: 1,496 MB
Server ready
3–6 ms
Chromium starts on first use
Wikipedia navigate
214 ms
Playwright MCP: 315 ms
Binary
9.5 MB
plus a pinned Chromium

Against @playwright/mcp 0.0.80

Memory after 4 pages
535 MB · 5 processes
1,496 MB · 9 processes
Navigate Wikipedia / Hacker News / GitHub
214 / 185 / 274 ms
315 / 229 / 330 ms
Snapshot of GitHub
26 ms
36 ms
Tool schemas in the agent's context
15.9k chars
19.5k chars

Same machine, same pages, both on chrome-headless-shell, three rounds and medians, memory summed across the whole process tree. The script is scripts/bench_browser.py.

Tools

Everything Playwright MCP has, and what agents asked for

The same tool names and parameters as @playwright/mcp: 38 by default, 83 with every capability on. The difference is how an agent reads: most calls never need a snapshot, and when one does, the reply holds only what changed.

browser_text
The page as Markdown: the article with its author and date, one section by heading, or just the opening paragraph.
browser_links
Every link as one compact line with its page region, so picking the right one costs a few hundred tokens.
browser_batch
Navigate, type, click, wait and read in one call. Each step can assert a value and stop the batch.
browser_fetch
HTTP with the browser's cookies, sent directly: no CORS, JSON cut down to the fields you ask for.
browser_scrape
Many URLs at once in background tabs, each read as Markdown or by your own function.
browser_read
One value, or every match, as an assertion when you add equals or contains.
browser_table · browser_extract
Tables as TSV or JSON; repeated items as one JSON object per line.
browser_handoff
A person takes over the exact live page in a tab of their own browser, then hands it back.
Designed by its users

Opus agents did real work with it, then complained

Six agents, restricted to browser-rs, each got a hard multi-step task: researching GitHub pull requests, a Wikipedia link race, Hacker News with the linked articles, a full checkout with its error cases, fourteen tricky widgets, and debugging on MDN. Every tool call was timed on the server. After each round, their bugs and feature requests went into the code.

Round 1
5 · 8 · 7 · 7 · 5 · 5
0 of 6
$4.57
Round 2
7 · 8 · 7 · 8 · 7 · 8
0 of 6
$2.71
Round 3
8 · 8 · 7 · 8 · 8 · 7
4 of 6
$2.67
Round 4
8 · 8 · 7 · 9 · 8 · 8
2 of 6
$1.67
Round 5
8 · 8 · 7 · 8 · 8 · 6
2 of 6
$2.67
Round 6
8 · 8 · 9 · 8 · 8 · 8
4 of 6
$2.36

From round two on, all six said they would choose browser-rs over Playwright MCP. The Wikipedia race went from 75,000 characters of replies to 3,400.

Hand-off

When a human has to log in, nothing reloads

The browser stays headless and keeps running. browser_handoff opens a live view of the exact page in a tab of your own browser: click, type and paste into it, answer its dialogs, follow the pop-up it opens, then press Done. Half-filled forms, a game in progress, anything in memory is still there when the agent continues.

The view streams straight from Chromium over localhost behind a random token, draws only the newest frame, and sends your input without buffering.

One paste

Let your agent install it

The runbook checks your toolchain, builds, registers the server with your client, downloads Chromium once and proves it works with a real page.

Paste into your agent
Install browser-rs, the Rust browser MCP server, for me. Run this first,
then follow it exactly:

    curl -fsSL https://browser-rs.lukaloehr.com/setup.txt

Ask me its first question before doing anything else.
Get started

Two steps

01

Build it

A Rust toolchain is all it needs. Chromium for Testing downloads itself on the first tool call, or ahead of time with browser-rs install.

$ git clone https://github.com/luka-loehr/browser-rs
$ cd browser-rs && cargo build --release
02

Add it to your client

Headless by default. Add --caps all for cookies, storage, network mocking, tracing, video, PDF and testing tools.

$ claude mcp add browser-rs …/target/release/browser-rs

Tested on macOS. Linux uses the same code but is untested, and Windows is not supported yet. In the hand-off view, headless Chromium does not draw native dropdowns or file pickers, and passkeys do not work; use a one-time code. Playwright’s own browser_run_code_unsafe needs its Node runtime and is not included.