.agents / browser
Ultra-fast, zero-Node Python CDP Browser MCP for AI coding agents.
Connects directly to your local Chrome, Edge, or Brave instance via native CDP. Headless by default.
Quickstart
1-Step Setup
pip install agents-browser && agents-browser init
Scaffolds ~/.agents/browser/, autowires MCP configurations into your installed IDEs, and registers assistant skills.
Source checkouts can also be installed and managed using vand.
Why .agents/browser?
Traditional browser automation MCPs (Playwright, Puppeteer) introduce massive friction:
- Download ~300MB Chromium binaries that hog disk space
- Spin up heavy Node.js runtimes that leave detached zombie processes
- Lack access to existing user sessions, cookies, and saved logins
- Dump 100k+ tokens of raw bloated HTML into LLM context windows
agents-browser connects directly to your installed browser via native CDP:
- Headless by Default: Silent
--headless=newbackground automation. Visible window only on explicit ask. - Zero Node.js / Zero 300MB Downloads: Pure lightweight Python (
FastMCP+websockets). - Indexed
@refInteractive Snapshots: Generates clean markdown with compact element references ([@1] Button: Login,[@2] Input: Search). - High-Level Built-in Tools: Web search, clean reader-mode extraction, table scraping, batch form filling, dropdown selection, viewport scrolling, in-page search, and network/DOM stability detection.
- Persistent Sessions (
~/.agents/browser): Preserves cookies, sessions, and saved logins across turns. - Universal Multi-IDE Auto-Config: Plugs into Cursor, Antigravity, Claude Desktop, and Zed in 1 second.
Architecture & Flow
┌─────────────────────────────────────────────────────────────┐
│ CODING AGENT / IDE │
│ Cursor · Antigravity · Claude Code · Windsurf · Zed │
└──────────────────────────────┬──────────────────────────────┘
│ FastMCP stdio
▼
┌─────────────────────────────────────────────────────────────┐
│ AGENTS-BROWSER CDP CLIENT │
│ Pure Python WebSocket · Port 9222 · Zero Node Runtime │
└──────────────────────────────┬──────────────────────────────┘
│ Direct CDP Commands
▼
┌─────────────────────────────────────────────────────────────┐
│ LOCAL BROWSER (Chrome / Edge / Brave) — headless=new │
│ Persistent Profile: ~/.agents/browser │
└──────────────┬───────────────────────────────┬──────────────┘
│ │
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ INDEXED SNAPSHOTS │ │ HIGH-LEVEL TOOLS │
│ [@1] Button: Sign In │ │ browser_search │
│ [@2] Input: Search │ │ browser_read_article │
│ Compact Interactive Tokens │ │ browser_fill_form │
└─────────────────────────────┘ └─────────────────────────────┘
CLI Reference
| Command | Purpose |
|---|---|
agents-browser init |
Plug & Play setup: auto-configures MCP across Cursor, Antigravity, Claude Desktop, Zed |
agents-browser open <URL> |
Navigates headless (add --visible for a desktop window) |
agents-browser system-open <URL> |
Opens URL in the OS default desktop browser |
agents-browser search "<query>" |
Performs a web search and prints top 10 organic markdown results |
agents-browser read |
Extracts active web page in clean Reader Mode |
agents-browser snapshot |
Captures text outline with compact indexed @ref interactive elements |
agents-browser screenshot --out <file> |
Captures a full or viewport PNG screenshot |
agents-browser serve |
Runs the FastMCP stdio server (default) |
MCP Tools Reference
| Tool | Parameters | Description |
|---|---|---|
browser_open |
url, new_tab, visible (default: false) |
Navigate headless by default; set visible=True only when asked for a window. |
browser_system_open |
url |
Open URL in the user's personal OS default browser (no CDP). |
browser_set_headless |
headless (default: true) |
Restart CDP browser in headless or visible mode. |
browser_snapshot |
None | Extract clean text outline with indexed @ref element IDs (@1, @2). |
browser_click |
target |
Click element by @ref (e.g. @1), CSS selector, or matching text. |
browser_type |
target, text, clear, press_enter |
Focus and type text into input/textarea. |
browser_select |
target, value |
Select dropdown <select> option by text, value, or substring. |
browser_scroll |
direction ("down", "up", "top", "bottom"), amount |
Scroll the active page viewport. |
browser_go_back |
None | Navigate back in browser history. |
browser_reload |
ignore_cache (default: false) |
Reload active page (optional hard refresh). |
browser_wait_stable |
timeout_ms, quiet_ms |
Wait for network requests (fetch/XHR) and DOM mutations to settle. |
browser_find |
query, forward, match_case |
Fast in-page text search with match stats without dumping full page. |
browser_search |
query, engine (default: "duckduckgo") |
Direct web search returning top organic results with Title, URL, and Snippet. |
browser_read_article |
None | Extracts clean article markdown, stripping ads, navbars, and banners. |
browser_scrape |
selector, mode ("text", "table", "links") |
Structured data extraction from CSS selector. |
browser_fill_form |
fields_json, submit_selector |
Batch fill form fields and submit in one call. |
browser_screenshot |
full_page, optional path |
Saves PNG to ~/.agents/browser/screenshots/ and returns path + Image (not a base64 data-URL). |
browser_evaluate |
script |
Execute arbitrary JavaScript in tab context. |
browser_tabs |
None | List active browser tabs with IDs and titles. |
browser_switch_tab |
tab_id |
Switch active tab focus. |
Supported Ecosystem
- Claude Code: Bound via MCP server and
.agents/skills/browser-browse. - Google Antigravity: Integrated via
.gemini/configrules andagents-browserMCP. - Cursor: Automatically configures
.cursor/mcp.jsonand agent rules. - Zed: Configures
context_serversand mirrors assistant skills. - VS Code / Windsurf: Autowires Cline / Roo-Code MCP configuration.
Open ABI Specification
Detailed architectural specifications live in abi/:
abi/WHY.md— Rationale & why CDP beats heavy Node.js frameworks.abi/LAYOUT.md— Storage taxonomy in~/.agents/browser/.abi/MCP.md— Tool surface definitions and request/response contracts.abi/TOOLS.md— Exhaustive MCP tool reference & type signatures.abi/PLATFORM.md— Multi-platform browser binary & profile resolution.
Testing & Verification
Run the test suite:
python tests/run_all_tests.py
License
MIT License. See LICENSE for details.
Metadata
Release files for agents-browser 0.45.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agents_browser-0.45.0.tar.gz | 38.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agents_browser-0.45.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 75.0 kB
Release files / agents_browser-0.45.0.tar.gz
| Download URL | agents_browser-0.45.0.tar.gz |
|---|---|
| Size | 38.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9357d6655c07e4b8e438c90bf183da060311f908837fe858f1b3e9b9cca17d62
|
|
BLAKE2b-256 checksum How to use checksums |
08c3f97b6f51cc2890c2d962606b4c576e0ff6e26aa6453ad14cfe23c0834964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agents_browser-0.45.0-py3-none-any.whl
| Download URL | agents_browser-0.45.0-py3-none-any.whl |
|---|---|
| Size | 37.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d2f674a88ee9e1893c52eadcb5f9f4f54329c874e0c4f248df62d44bae5558b
|
|
BLAKE2b-256 checksum How to use checksums |
7c89bdb75edeace4a5b7a58e4f03b6b948495fa16be40faec0695f392b608138
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|