← Back to directory
Z

ZeroToken

Community
Record once, automate forever. Lightweight MCP for AI agent browser automation with trajectory recording and low-token script replay.
GitHub source repository ↗
★ 454 Stars Category · Browser Popular
54FMRS · D

ZeroToken is an MIT-licensed, community-maintained lightweight browser automation MCP engine built around record-once, replay-forever: trajectory recording plus deterministic script replay cuts token usage on repetitive tasks. It offers 26 browser_* primitives, multi-tab and iframe management, SmartSelector/SmartWait/ErrorRecovery stability layers, adaptive element fingerprint re-location, an exploration recording mode, SQLite persistence, and both stdio and Streamable HTTP transports. OpenClaw users must use HTTP mode to keep browser state, and must install Playwright Chromium themselves. It is not an official product and carries no commercial support; users are responsible for target-site terms and local data security.

Reliability
10/20
Security and permissions
8/20
Maintenance
12/20
Documentation
13/20
Setup experience
11/20
Read the FMRS scoring method →

ZeroToken is a lightweight browser automation MCP engine for AI agents. The agent drives the browser step by step in ReAct style through atomic MCP tools, while the system records a full trajectory (page state, screenshots, results, and fuzzy points). Trajectories can be exported as AI-friendly prompts or converted into deterministic replayable scripts, so repeated runs need no step-by-step LLM reasoning and consume far fewer tokens. It uses a five-layer architecture (Transport → Handler → Service → Domain → Repository/Infrastructure) with Pydantic v2 models, stores scripts, trajectories, sessions, fingerprints, bindings and runtime state in SQLite, and drives a real browser through Playwright/Chromium.

Tools

browser_init
Initialize the browser; pass stealth=true for stealth launch and fingerprint masking against anti-bot defenses
browser_open
Open a URL in the page
browser_click
Click a page element
browser_input
Type text into an input field
browser_hover
Hover the mouse over an element
browser_keyboard
Send a keyboard key combination (e.g. Control+S)
browser_scroll
Scroll the page by direction and amount
browser_drag_drop
Drag a source element onto a target element
browser_upload
Upload a local file to a file-type input
browser_download
Trigger and complete a file download, returning the saved path
browser_evaluate
Evaluate a JavaScript expression in the page
browser_new_tab
Open a new tab and return its tab_id
browser_list_tabs
List all open tabs
browser_switch_tab
Switch to a given tab
browser_close_tab
Close a given tab
browser_enter_iframe
Enter the context of a given iframe
browser_exit_iframe
Exit the current iframe context
trajectory_start
Start recording an operation trajectory (task_id, goal)
trajectory_complete
Finish recording; with export_for_ai=true export an AI prompt that marks fuzzy points
trajectory_list
List saved trajectories
trajectory_delete
Delete a given trajectory to avoid accumulating too many records
trajectory_to_script
Convert the trajectory of a task_id into a replayable script
trajectory_explore_start
Start exploration recording mode to isolate AI trial-and-error paths from the real trajectory
trajectory_explore_stop
Stop exploration mode; keep can be none / last / all
script_generate
Generate a script from a trajectory
script_run
Deterministically replay a script, optionally with vars; failures or judgment points pause into a session
script_resume
Resume a paused script session with resolution retry / skip / patch / abort
script_health
Check consecutive failures and success rate of a script
script_deprecate
Mark a script as deprecated (e.g. after a site redesign)
script_restore
Restore a deprecated script
script_bind
Bind an external job_id to a script, with optional default_vars
script_binding_set
Bind an OpenClaw job_id to a script task_id
run_script_by_job_id
Run a script in one step by binding key (job_id) with no step-by-step LLM reasoning

Setup

  1. Install: pip install zerotoken or uv add zerotoken; 2. Install the browser: playwright install chromium (required); 3. For OpenClaw, run zerotoken-mcp-http in the background (defaults to http://0.0.0.0:8000/mcp; set the port with --port or ZEROTOKEN_HTTP_PORT); 4. In ~/.openclaw/openclaw.json, configure zerotoken under mcpServers as url: "http://localhost:8000/mcp" — do not use command; 5. Install the zerotoken-openclaw Skill (clawhub install zerotoken-openclaw, or copy skills/zerotoken-openclaw); 6. Enable the MCP server in OpenClaw and make sure the skill is loaded. Cursor and similar IDEs use stdio mode with command: "zerotoken-mcp" (or command: "uv", args: ["run", "zerotoken-mcp"]).
claude_desktop_config.json
{
  "mcpServers": {
    "zerotoken": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Fit and risk

Best for

  • Record-once, run-forever scheduled or repetitive tasks such as daily logins and timed scraping
  • Agent setups that want lower token cost instead of step-by-step LLM reasoning on every run
  • Projects needing rich browser primitives: multi-tab, iframes, file upload/download, drag and drop
  • Automation flows that need element fingerprints and adaptive re-location to survive site redesigns

Not for

  • Environments that cannot run Playwright/Chromium or install a browser
  • Clients that rely only on stdio while needing browser state across calls (the README states command mode spawns a new process per tool call, destroying the browser instance)
  • Production-critical systems requiring official commercial support or an SLA
  • Setups that do not accept local SQLite persistence of trajectories, screenshots and sessions

Required permissions

  • Local filesystem read/write (SQLite database zerotoken.db, upload and download paths)
  • Network access (target websites, Playwright/Chromium download)
  • Launch and control a local Chromium browser process
  • In OpenClaw, run a local HTTP service on a listening port (default 8000)

Risks and side effects

  • Scripts act as a real browser and perform clicks, typing, uploads and downloads, so mistakes can change data or submit forms unintentionally
  • Trajectories store page state and screenshots (base64 images may contain sensitive data) on disk in SQLite, creating privacy and credential-leak risk
  • Fingerprint masking via browser_init(stealth=true) may violate target sites' terms of service
  • Depends on target page structure: selector failure remains the main instability factor (60% per the README), so scripts may break after redesigns
  • HTTP mode listens on 0.0.0.0 by default and can be called by others if exposed to untrusted networks

Troubleshooting

  1. Browser state lost, every action feels like the first: you are still in command (stdio) mode; make sure zerotoken-mcp-http runs in the background and openclaw.json configures zerotoken with url instead of command
  2. Connection failure / MCP unavailable: verify zerotoken-mcp-http is running on the expected port (default 8000) and the URL matches the config
  3. Browser will not start: run playwright install chromium
  4. Responses too large: pass include_screenshot: false to browser tools
  5. Too many records: inspect saved trajectories with trajectory_list and remove unneeded ones with trajectory_delete(task_id)
  6. Element lookup failures: pass auto_save: true for key elements to store fingerprints, then adaptive: true to re-locate after redesigns
  7. Repeated script failures: check script_health for success rate and use script_deprecate followed by script_restore if needed

Use cases

AI agent browser automation (OpenClaw, LLM agents)
RPA replay of repetitive web operations
Scheduled web data scraping
Automated testing by recording and replaying test steps
Exporting trajectories as AI prompts for Skills or other modules to analyze

Supported clients

OpenClawFull support
CursorFull support