Skip to main content
Glama

agentbrowse

A browser an AI agent can drive, with a slot for Burp in the middle. Phase 1 wraps Chromium (Playwright) and an optional stealth backend (patchright) behind one CLI: GET a URL, snapshot the page, keep a profile.

This tool detects challenges and hands them to a human; it does not defeat them.

Install

python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/playwright install chromium

Stealth engine, optional:

.venv/bin/pip install patchright && .venv/bin/patchright install chromium

Related MCP server: CloakBrowser MCP

Use

.venv/bin/python -m agentbrowse open https://example.com/ --json
.venv/bin/python -m agentbrowse open https://target.example/ --headed --proxy http://127.0.0.1:8080 --insecure --profile burp
.venv/bin/python -m agentbrowse snap --json
.venv/bin/python -m agentbrowse profiles list
.venv/bin/python -m agentbrowse profiles delete burp --force
.venv/bin/python -m agentbrowse open https://target.example/ --challenge-report
.venv/bin/python -m agentbrowse open https://target.example/ --headed --pause-for-human
.venv/bin/python -m agentbrowse open https://target.example/ --geo US --proxy-pool proxies.yaml
.venv/bin/python -m agentbrowse open https://target.example/ --flare-solverr http://127.0.0.1:8191
.venv/bin/python -m agentbrowse mcp --proxy http://127.0.0.1:8080 --insecure --profile burp

--insecure sets Playwright ignore_https_errors so Burp's MITM certificate is accepted. --proxy takes http://127.0.0.1:8080, 127.0.0.1:8080, or socks5://user:pass@host:1080.

--challenge-report prints the detection and nothing else. A detected challenge that is not cleared exits 4. In a headless session the message is run again with --headed --pause-for-human. --pause-for-human only waits; it does not solve the interstitial. --geo reads a user-supplied YAML or JSON pool ([{country, url}]) and does not ship any proxies. --flare-solverr points at a FlareSolverr you already run. If that process is down, open continues.

Profiles live in ~/.agentbrowse/profiles/<name> (override the root with AGENTBROWSE_HOME). Each command is one-shot: open launches Chromium, GETs the URL, prints a snapshot, and closes. snap relaunches that profile and GETs the saved URL. The state file stores profile name, URL (userinfo stripped), headless, and the insecure flag. It does not store proxy credentials or cookies.

Cookie export/import uses Playwright storage state (export_cookies / import_cookies).

Use with AI agents

agentbrowse mcp is a long-running MCP server. Transport is newline-delimited JSON-RPC 2.0 on stdio: one JSON object per line. stdout is reserved for protocol messages. The startup line agentbrowse MCP server on stdio goes to stderr. The browser starts on the first browser_open.

{
  "mcpServers": {
    "agentbrowse": {
      "command": "agentbrowse",
      "args": ["mcp", "--profile", "burp", "--proxy", "http://127.0.0.1:8080", "--insecure"]
    }
  }
}

Add --headed when the window should be visible. Flags match open: --headed, --proxy SPEC, --profile NAME, --insecure.

Tool

Arguments

Returns

browser_open

url

snapshot (url, title, challenge, text, elements, console_errors)

browser_snapshot

the same snapshot

browser_click

selector

ok, url, title

browser_type

selector, text, optional submit

ok, url

browser_screenshot

path

ok, path

browser_evaluate

expression

ok, result

browser_cookies

cookies: name, domain, path, expires

browser_close

ok

browser_cookies is redacted on purpose. Values are credentials and are never returned. browser_evaluate runs in the page; an expression containing require(, process., or import( is refused.

Limits

  • The one-shot open command is GET navigation. The MCP server can click, type, screenshot, and evaluate in the page. submit on browser_type presses Enter.

  • challenge on a snapshot is null on a clean page, or {kind, confidence, evidence, suggested_action} when an interstitial is detected.

  • Exit code 4 means a challenge was detected and not cleared. The tool does not solve captchas.

  • Default engine is chromium. create_engine("stealth") uses patchright and raises EngineUnavailable with an install hint if it is missing.

Tests

.venv/bin/python -m pytest -q

Tests bind 127.0.0.1 only. The browser test skips if Chromium was not installed.

Credits

See CONTRIBUTORS.md.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets local AI agents drive the Chrome browser a user already has open, including signed-in sessions, by listing tabs, reading page text and actionable elements, then clicking, filling, selecting, scrolling, navigating, and capturing viewport screenshots without exporting cookies. Runs as a dependency-free local stdio process over Native Messaging, with per-tab leases, automatic reconnection, and pause/write-action controls.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to run Playwright-compatible browser automation with persistent profiles, proxies, Chrome extensions, and humanized mouse, keyboard, and scroll interactions over stdio or Streamable HTTP. Supports web research, daily automation, testing workflows, and optional session-scoped CDP access.
      297 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Lets AI coding tools drive the real, already-logged-in Chrome browser over local stdio—snapshotting and reading pages, clicking, typing, managing tabs, capturing screenshots, and inspecting network, console, storage, and cookies—without opening a remote-debugging port. It installs as a Chrome extension plus native-messaging bridge, so agents work in the user's authenticated sessions while passing bot detection.
      1 npm
      ISC
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to perform real Chromium browser automation using Playwright-compatible tools, including persistent profiles, proxies, extensions, and humanized interactions over stdio or Streamable HTTP.
      297 npm
      MIT