agent-in-browser
Drives the Brave browser over the Chrome DevTools Protocol (CDP), letting agents navigate pages, read snapshots with element refs, click, type, fill forms, take screenshots, and capture console/network activity.
Drives Firefox (and Firefox Developer Edition / Nightly) over WebDriver BiDi, exposing the same tool catalogue for navigation, page snapshots, form filling, clicking, screenshots, and console/network inspection.
Drives the Opera browser over the Chrome DevTools Protocol (CDP), enabling agents to automate navigation, page understanding, input, screenshots, and console/network capture.
Browser detection support for Safari via WebDriver (safaridriver) is included, with full automation support planned on the roadmap.
Drives the Vivaldi browser over the Chrome DevTools Protocol (CDP), providing browser automation for navigation, element interaction, form filling, screenshots, and diagnostics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-in-browserGo to localhost:3000, fill the signup form, click Sign up, and check console errors."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-in-browser
A real browser for any AI agent, any model, and any test runner β one dependency-free binary.

Real recording, not a mock-up. The agent reads the page as a snapshot with element refs, types, fills the form and clicks, first in Chrome (CDP), then in Firefox (WebDriver BiDi). Regenerate it with task demo.
agent-in-browser is an open take on "Claude in Chrome". It doesn't need an extension or a vendor-specific runtime. It drives the browsers you already have through their native automation protocols:
Browser | Protocol | Status |
Chrome, Chrome Beta/Canary, Chromium, Edge, Brave, Vivaldi, Opera | Chrome DevTools Protocol (CDP) | β |
Firefox, Firefox Developer Edition / Nightly | WebDriver BiDi | β |
Safari | WebDriver (safaridriver) | π£ detected, roadmap |
It's available three ways, all backed by the same tool catalogue:
MCP server (
agent-in-browser mcp): plugs into Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI, Windsurf, VS Code/Copilot, Zed, opencode and any other MCP client, whatever model sits behind it.Shell CLI (
agent-in-browser call <tool> β¦): for agents without MCP, for scripts, and for humans. Calls share one persistent browser.Scenario runner (
agent-in-browser run test.yaml --browser chrome,firefox): replays tool calls as automated tests across a browser matrix, with JUnit/JSON reports.
An agent skill (skills/agent-in-browser/SKILL.md) ships inside the binary and teaches agents the workflow.
Install
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Gwakko/agent-in-browser/main/scripts/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/Gwakko/agent-in-browser/main/scripts/install.ps1 | iex
# Homebrew (macOS / Linux)
brew install gwakko/tap/agent-in-browser
# With Go
go install github.com/gwakko/agent-in-browser/cmd/agent-in-browser@latest
# From a checkout (needs Task: https://taskfile.dev)
task install # β ~/.local/bin/agent-in-browser + alias `aib`Related MCP server: Web Agent MCP
Connect your agent
agent-in-browser setup claude-code --write # runs `claude mcp add --scope user β¦`
agent-in-browser setup cursor --write # merges ~/.cursor/mcp.json (a .bak is kept)
agent-in-browser setup codex --write # appends to ~/.codex/config.toml
agent-in-browser setup gemini --write # ~/.gemini/settings.json
agent-in-browser setup vscode # prints the snippet for .vscode/mcp.json
agent-in-browser skill install --for claude # ~/.claude/skills/agent-in-browser (also: codex, agents, --dir)Claude Desktop, one click: download agent-in-browser-<version>.mcpb from the latest release and open it. It also appears in the MCP Registry as io.github.Gwakko/agent-in-browser.
Without --write, setup only prints the config. Pass browser options through with --args "--browser firefox --headless". See docs/integrations.md for every client.
Use it from the shell
agent-in-browser call navigate url=localhost:3000
agent-in-browser call snapshot
# - textbox "Email" [ref=e3] (required, type=email)
# - button "Sign up" [ref=e7]
agent-in-browser call type ref=e3 text=me@example.com
agent-in-browser call click ref=e7
agent-in-browser call wait_for text=Welcome
agent-in-browser call console_messages level=error
agent-in-browser call screenshot # β prints PNG path
agent-in-browser stopUseful flags (they work anywhere on the command line): --browser firefox, --headless, --instance work for a second, independent browser, --endpoint http://127.0.0.1:9222 to attach to a browser you started yourself, and --viewport 390x844.
Test scenarios
name: signup
browsers: [chrome, firefox]
steps:
- navigate: http://localhost:3000/signup
- fill_form:
fields:
- { selector: "#email", value: "qa@example.com" }
- { match: "I accept the terms", value: true }
- click: Sign up
- wait_for: { text: "Welcome" }
- assert: { url_contains: "/dashboard", no_console_errors: true }agent-in-browser run tests/*.yaml --browser chrome,firefox,edge --junit report.xmlFull format: skills/agent-in-browser/references/scenarios.md.
Tools
browser_status Β· browsers_installed Β· tabs_list Β· tab_new Β· tab_select Β· tab_close Β· navigate Β· snapshot Β· find Β· click Β· hover Β· type Β· press_key Β· fill_form Β· scroll Β· wait_for Β· get_text Β· screenshot Β· evaluate Β· console_messages Β· network_requests Β· resize Β· browser_close
Arguments are documented in docs/tools.md, which task docs:tools generates.
How it works
agent ββMCP/stdioβββ
shell ββcallββββββββΌβββΆ tools βββΆ session βββΆ Driver ββCDPβββββββΆ Chrome / Edge / Brave / β¦
CI ββββrun yamlβββββ (one catalogue) (attach|launch) ββBiDiββββββΆ Firefox
page lib (injected JS):
snapshot Β· refs Β· fill Β· findThe browser runs on a dedicated profile (
~/.agent-in-browser/profiles/<instance>-<browser>) and is detached, so it survives MCP server restarts. Separate CLI calls reuse it through~/.agent-in-browser/instances/<name>.json.Page understanding (snapshot, refs, form filling) is injected JavaScript that works the same in every engine. Trusted input, screenshots, tabs and console/network capture come from each protocol's driver.
Details: docs/architecture.md Β· browser notes: docs/browsers.md Β· plans: docs/roadmap.md.
Development
task build # bin/agent-in-browser
task test # unit tests
task test:e2e # scenario on every installed browser
task smoke # CLI scenario run, chrome+firefox
task inspect # MCP Inspector against the local build
task build:all # cross-compile 6 targets into dist/
task release TAG=v0.1.0 # tag β GitHub Actions β goreleaserSecurity notes
The debugging endpoint listens on
127.0.0.1only. Even so, any local process can drive that browser, so don't sign it into accounts you wouldn't hand to the agent.Since Chrome 136, remote debugging is refused for your default Chrome profile. agent-in-browser always uses its own profile. To reuse your logins, sign in once inside the agent's browser window and the profile keeps them.
License: MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI to control a real browser through MCP tools for clicking, typing, navigation, screenshots, and more. It supports a follow mode that tracks the active tab, plus fixed mode for controlling specific tabs.147 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a real browser via MCP tools for web navigation, interaction, page inspection, tabs, forms, files, sessions, and browser automation.MIT
- AlicenseBqualityBmaintenanceEnables AI agents to perform low-latency web automation with a persistent headed Chrome/Chromium instance, including navigation, DOM interaction, content extraction, screenshots, tab management, and batch/code execution via 18 MCP tools.20MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents and human operators to launch and drive isolated, persistent browser profiles β each with its own cookies, fingerprint, and proxy β from any MCP client. Exposes tools for navigating, clicking, typing, extracting content, taking screenshots, evaluating JavaScript, managing tabs and cookies, and waiting on page events.MIT