Agent-first-browse
Token-efficient browser control over MCP for AI agents, with accessibility-tree perception
Agent-first-browse is an open-source MCP server for browser automation. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Linux, macOS
- Runs
- Locally
- What it can do
- Can change data (2 tools)
- Version
- 0.1.1
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add agent-first-browse -- uvx agent-first-browseAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"agent-first-browse": {
"command": "uvx",
"args": [
"agent-first-browse"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"agent-first-browse": {
"command": "uvx",
"args": [
"agent-first-browse"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"agent-first-browse": {
"command": "uvx",
"args": [
"agent-first-browse"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"agent-first-browse": {
"type": "stdio",
"command": "uvx",
"args": [
"agent-first-browse"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add agent-first-browse -- uvx agent-first-browseOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.agent-first-browse]
command = "uvx"
args = ["agent-first-browse"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"agent-first-browse": {
"command": "uvx",
"args": [
"agent-first-browse"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Or run: gemini mcp add -s user agent-first-browse uvx -- agent-first-browse
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "agent-first-browse": { "command": "uvx", "args": [ "agent-first-browse" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Agent-first-browse
Agent First Browse gives AI assistants a way to operate a real Chromium browser while sending the model far less page data than typical browser agents. Instead of passing raw DOM dumps on every step, it builds a compact list of clickable and typeable elements, hides controls that sit behind modals or overlays, and sends only what changed between consecutive steps. Passwords, OTPs, PINs and card numbers are masked before they reach prompts or logs.
The project ships as a Python package with a stdio MCP server exposing seven browser tools for starting sessions, perceiving pages, acting on elements, taking screenshots, comparing engines and exporting metrics. It also includes a command-line daemon for stepwise control and an autonomous runner built on LangGraph that checks its own actions before moving on. Setup for MCP hosts such as Claude Desktop, Claude Code and Cursor is a single uvx command, and no external LLM API keys are needed for the MCP or CLI paths.
This suits developers building or debugging agents that need reliable browser interaction on live sites, especially single-page apps and pages with pop-ups. It is released under the Apache 2.0 licence and can be run from source for local development.
Tools this server provides (7)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 7 tools change data; 5 names don't say.
From the server's own tool labels and tool names; not verified by us.
- browser_startName suggests: changes
- Launch an isolated Chromium session.
- browser_perceive
- Run accessibility-tree-first perception and return compact ref elements.
- browser_act
- Execute goto, click, type, hover, select_option, press_enter, press_key, scroll or wait.
- browser_screenshot
- Save a viewport or full-page PNG screenshot to disk.
- browser_stopName suggests: changes
- Close one session or shut down all active sessions.
- browser_compare
- Diff legacy and v2 sessions side-by-side.
- browser_metrics
- Export cumulative Markdown or JSON telemetry.
What it does
- Accessibility-tree perception
- Pages are read through a compact accessibility-tree view with a DOM fallback for custom ARIA widgets.
- Occlusion pruning
- Controls hidden behind modals, cookie banners and overlays are removed from the element list before the model sees it.
- Delta snapshots
- Repeat steps on the same URL send only added, changed and removed controls to reduce prompt size.
- Stale-reference recovery
- Element handles are rebound when single-page app re-renders move buttons during an action.
- Secret masking
- Passwords, OTPs, PINs and card fields are redacted before reaching prompts or logs.
- Seven MCP tools
- Browser start, perceive, act, screenshot, stop, compare and metrics tools are exposed over stdio.
Good for
- Give a coding assistant in Claude Code or Cursor the ability to open and inspect live web pages
- Automate multi-step form or checkout flows while keeping prompt token usage low
- Compare legacy and accessibility-first perception on the same site to measure speed and token cost
- Run an autonomous browser task from the command line with a verification loop
- Debug agent behaviour on single-page apps where elements move after re-renders
Pricing
Open source
Free and open source under Apache 2.0; self-hosted.
Prices change. Check xel-studio.vercel.app before you buy.
Agent-first-browse FAQ
How do I install Agent-first-browse for Claude Desktop?
Install the agent-first-browse package with pip, run python -m playwright install chromium, then add an mcpServers entry that runs uvx with --from agent-first-browse and agent-browse-mcp.
Does Agent-first-browse need an LLM API key?
The MCP server and the CLI daemon run with zero external LLM API keys. The autonomous LangGraph runner uses keys configured through a .env file.
Which licence does Agent-first-browse use?
It is licensed under the Apache License 2.0.
What Python version is required?
Python 3.11 or newer on Linux, WSL or macOS.
Is Agent-first-browse free?
Yes. Agent-first-browse is open source, so you can use and self-host it for free.
How do I add Agent-first-browse to Claude Code?
Run this command in your terminal: claude mcp add agent-first-browse -- uvx agent-first-browse
What are the best alternatives to Agent-first-browse?
The closest alternatives to Agent-first-browse are Agent Browser, Browser MCP, playwright_mcp, Substrate Browser and CloakMCP.
Where this comes from
- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.
