OpenBrowser - Claude Code Plugin

May 6, 2026 ยท View on GitHub

AI-powered browser automation for Claude Code. Control real web browsers directly from Claude -- navigate websites, fill forms, extract data, inspect accessibility trees, and automate multi-step workflows.

Local OpenBrowser sessions persist cookies and login state by default. The CLI daemon saves them in ~/.config/openbrowser/profiles/daemon/storage_state.json, and the MCP server saves them in ~/.config/openbrowser/profiles/default/storage_state.json unless you override those paths. Managed profiles also auto-clean disposable Chromium caches so they do not grow like normal long-lived Chrome profiles.

Prerequisites

  • Chrome or Chromium installed on your system
  • Python 3.12+ with uv package manager
  • Claude Code CLI

Installation

From GitHub marketplace

# Add the OpenBrowser marketplace (one-time)
claude plugin marketplace add billy-enrizky/openbrowser-ai

# Install the plugin
claude plugin install openbrowser@openbrowser-ai

This installs the MCP server, 6 skills, and auto-enables the plugin. Restart Claude Code to activate.

Local development

# Test from a local clone without installing
claude --plugin-dir /path/to/openbrowser-ai/plugin

OpenClaw

OpenClaw supports OpenBrowser via the CLI daemon. Install OpenBrowser, then use openbrowser-ai -c from the Bash tool:

openbrowser-ai -c "await navigate('https://example.com')"
openbrowser-ai -c "print(await evaluate('document.title'))"

The daemon starts automatically on first use and persists variables across calls.

For OpenClaw plugin documentation, see docs.openclaw.ai/tools/plugin.

Standalone MCP server (without plugin)

Add to your project's .mcp.json:

{
  "mcpServers": {
    "openbrowser": {
      "command": "uvx",
      "args": ["openbrowser-ai", "--mcp"]
    }
  }
}

Available Tool

The MCP server exposes a single execute_code tool that runs Python code in a persistent namespace with browser automation functions. The LLM writes Python code to navigate, interact, and extract data.

Authenticated browser state is also persisted, so once a user logs in, later MCP calls can keep using the same cookies and localStorage.

Functions (all async, use await):

CategoryFunctions
Navigationnavigate(url, new_tab), go_back(), wait(seconds)
Interactionclick(index), input_text(index, text, clear), scroll(down, pages, index), send_keys(keys), upload_file(index, path)
Dropdownsselect_dropdown(index, text), dropdown_options(index)
Tabsswitch(tab_id), close(tab_id)
JavaScriptevaluate(code) -- run JS in page context, returns Python objects
Downloadsdownload_file(url, filename) -- download a file using browser cookies, list_downloads() (sync, no await) -- list downloaded files
Statebrowser.get_browser_state_summary() -- page metadata and interactive elements
CSSget_selector_from_index(index) -- CSS selector for an element

Pre-imported libraries: json, csv, re, datetime, asyncio, Path, requests

Available if installed: numpy/np, pandas/pd, matplotlib, BeautifulSoup, PdfReader (requires pip install openbrowser-ai[pdf])

Benchmark: Token Efficiency

CLI Benchmark: 4-Way Comparison (6 Tasks, N=3 runs)

Four CLI tools compared with a single Bash tool each. Claude Sonnet 4.6 on Bedrock. Randomized order. All achieve 100% accuracy.

CLI Benchmark: Token Usage vs Duration

CLI ToolDurationTool CallsBedrock API Tokens
openbrowser-ai84.8 +/- 10.9s15.3 +/- 2.336,010 +/- 6,063
browser-use106.0 +/- 9.5s20.7 +/- 6.477,123 +/- 33,354
agent-browser99.0 +/- 6.8s25.0 +/- 4.090,107 +/- 3,698
playwright-cli118.3 +/- 21.4s25.7 +/- 8.194,130 +/- 35,982

openbrowser-ai uses 2.1-2.6x fewer tokens than all competitors via Python code batching and compact DOM representation. Raw data: benchmarks/e2e_4way_cli_results.json.

CLI Benchmark: Per-Task Token Usage

Full 4-way comparison

E2E LLM Benchmark: MCP Server Comparison (6 Tasks, N=5 runs)

MCP ServerToolsBedrock API TokensTool Calls (mean)vs OpenBrowser
Playwright MCP22158,7879.43.2x more tokens
Chrome DevTools MCP (Google)26299,48619.46.0x more tokens
OpenBrowser MCP150,19513.8baseline
ModelPlaywright MCPChrome DevTools MCPOpenBrowser MCP
Claude Sonnet 4.6 ($3/$15 per M)$0.50$0.92$0.18
Claude Opus 4.6 ($5/$25 per M)$0.83$1.53$0.30

Full MCP comparison with methodology

CLI Execute Mode

Run browser automation directly from Bash without the MCP server:

# Execute code via persistent daemon
openbrowser-ai -c "await navigate('https://example.com')"
openbrowser-ai -c "print(await evaluate('document.title'))"

# Daemon management
openbrowser-ai daemon start|stop|status|restart

Variables persist across -c calls while the daemon is running. The daemon starts automatically on first use and shuts down after 10 minutes of inactivity.

The CLI daemon uses ~/.config/openbrowser/profiles/daemon as its default browser profile and writes a matching storage_state.json, so saved logins survive daemon restarts.

Configuration

Optional environment variables:

VariableDescription
OPENBROWSER_HEADLESSSet to true to run browser without GUI
OPENBROWSER_ALLOWED_DOMAINSComma-separated domain whitelist
OPENBROWSER_USER_DATA_DIRChrome profile directory for saved MCP sessions
OPENBROWSER_STORAGE_STATEJSON file for saving and restoring cookies plus localStorage
OPENBROWSER_COMPACT_DESCRIPTIONSet to true for minimal tool description (~500 tokens)
OPENBROWSER_MAX_OUTPUTMaximum output characters per execution (default: 10,000)
ANONYMIZED_TELEMETRYSet to false to disable anonymized usage telemetry (default: true)

Set these in your .mcp.json:

{
  "mcpServers": {
    "openbrowser": {
      "command": "uvx",
      "args": ["openbrowser-ai", "--mcp"],
      "env": {
        "OPENBROWSER_HEADLESS": "true"
      }
    }
  }
}

Skills

The plugin includes 6 built-in skills that provide guided workflows for common browser automation tasks. All skills use the CLI-first approach via openbrowser-ai -c for direct code execution. Each skill is triggered automatically when the user's request matches its description.

SkillDirectoryDescription
web-scrapingskills/web-scraping/Extract structured data from websites, handle pagination, and multi-tab scraping
form-fillingskills/form-filling/Fill out web forms, handle login/registration flows, and multi-step wizards
e2e-testingskills/e2e-testing/Test web applications end-to-end by simulating user interactions and verifying outcomes
page-analysisskills/page-analysis/Analyze page content, structure, metadata, and interactive elements
accessibility-auditskills/accessibility-audit/Audit pages for WCAG compliance, heading structure, labels, alt text, ARIA, and landmarks
file-downloadskills/file-download/Download files (PDFs, CSVs, images) using the browser's authenticated session and read content

Each skill file (SKILL.md) contains YAML frontmatter with trigger conditions and a step-by-step workflow. All skills use openbrowser-ai -c via the Bash tool for CLI-first browser automation.

Testing and Benchmarks

# E2E test the MCP server against the published PyPI package
uv run python benchmarks/e2e_published_test.py

# Run MCP benchmarks (5-step Wikipedia workflow)
uv run python benchmarks/openbrowser_benchmark.py
uv run python benchmarks/playwright_benchmark.py
uv run python benchmarks/cdp_benchmark.py

Troubleshooting

Browser does not launch: Ensure Chrome or Chromium is installed and accessible from PATH.

MCP server not found: Verify uvx is installed (pip install uv) and the MCP server starts (uvx openbrowser-ai --mcp).

Session timeout: Browser sessions auto-close after 10 minutes of inactivity. Use any tool to keep the session alive.

License

MIT