browse
Integrates with the user's real Firefox browser through a Firefox add-on, letting AI agents pair with the browser, work with existing tabs, logins, and extensions, group agent tabs out of the way, report status, and hand tabs back to the user for logins, 2FA, payments, or other manual steps before continuing. Intended browser capabilities include opening background tabs, reading pages, clicking, typing, screenshots, network capture, and screen recording, though the Firefox-native driver is not yet included in this build.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Firefox Edition
Let your AI agents use your real browser: your tabs, your logins, your extensions. A small native MCP server and a Firefox add-on, for OpenCode, Claude Code, Codex, Cursor and any other MCP client.
Agents get a browse MCP server. Where a page driver is available they open tabs in the background, read pages,
click, type, take screenshots, capture network traffic and record the screen, in tabs grouped out of your way. When
it's your turn (a login, a 2FA prompt, a payment), they hand the tab back to you and continue once you click
Continue.
This edition runs in Firefox 139 or newer. Firefox has no debugger API and no CDP since Firefox 141, so the add-on pairs, reports status, groups agent tabs and shows handoffs, and answers page commands at once with a message saying the Firefox-native driver isn't in this build yet — it never hangs.
Install
Quick Start
./setup-full.shIt installs or updates the CLI and MCP server from this checkout's cli/, adds browse to your agents, builds the
Firefox add-on and asks which Firefox profile to load it into, then loads it there and opens its setup page. Re-run it to update everything;
--extension-only skips the CLI/agent step, --project-only skips the add-on, and --profile <name> skips the
picker. Quit Firefox first: an add-on can only be loaded into a profile that isn't running, and it lasts until you
quit Firefox again.
Then restart your agent (or reload its MCP servers), run browse pair, and enter the code on the page Firefox opened
with the add-on.
Published builds
curl -fsSL https://opencode.ai/browse/install | bashOr paste this into your agent: "Set up browse so you can use my Firefox: run
curl -fsSL https://opencode.ai/browse/install | bash". It sets browse up for the agent that ran it but installs no
Firefox add-on: run ./setup-full.sh here to build and load one, or bun run build:firefox and load
dist-firefox/manifest.json in about:debugging#/runtime/this-firefox yourself. Then run browse pair.
Other ways to install, all of which end in the same browse install:
How | Command | Where |
Install script (macOS, Linux) |
|
|
Install script (Windows) |
|
|
npx, bunx |
| copied to |
npm |
| npm's global |
bun |
|
|
pnpm, yarn, volta |
| that manager's |
There's always exactly one browse: a global package install is left to its package manager (nothing is copied next
to it, and a leftover ~/.local/bin/browse from an earlier install is removed), and agents run the same browse your
terminal does. If browse install finds another browse on your PATH it tells you which one and how to remove it.
The install script reads the channel's manifest from Anomaly's release service, downloads
the binary for this computer and checks its size and SHA-256 before installing it. --channel stable|beta|dev picks
the channel (stable by default); --version <version> installs a specific version from npm, checked against npm's
published SHA-512 integrity. With npm, @opencode/browse@dev is the dev channel. The npm package is a small Node
launcher (Node 22+) that runs the native binary npm installed for your platform.
What browse install does
Puts browse in place (see above) and adds
~/.local/binto your PATH when it copied browse there (--no-modify-pathskips that).Adds the browse MCP server to your agents. In a terminal you get a picker: OpenCode and the agents found on this computer start checked (your last choice next time). Type to search all supported agents, ↑/↓ to move, Space or Tab to toggle, Enter to confirm. An agent running
browse installsets up itself. Without a terminal OpenCode is the default. Edits keep the comments and formatting of each agent's config.Connects the add-on. Load the Firefox add-on first (
./setup-full.shdoes it for you, or useabout:debugging#/runtime/this-firefox→ Load Temporary Add-on and pickdist-firefox/manifest.json). If a browser already has it, install opens its setup page with a one-time pairing code in the link, so it pairs without copying anything. Over SSH or without a display it prints a code instead.
Then ask your agent to "open news.ycombinator.com and tell me the top story". An agent that was already running needs a restart (or an MCP reload) to load browse.
browse install -a claude codex # these agents, without asking (--agent; names below)
browse install -a '*' # every supported agent, installed or not
browse install -y # every agent found on this computer
browse install --agent none # no agent: print the MCP entry to add by handCONFIG is $XDG_CONFIG_HOME or ~/.config. APP is ~/Library/Application Support on macOS, %APPDATA% on
Windows, or CONFIG on Linux. The paths below are defaults; a client's existing config or location override can apply.
Agent (flag) | User config | Format / server key |
OpenCode ( |
| JSONC · |
Claude Code ( |
| JSON · |
Claude Desktop ( |
| JSON · |
Cursor ( |
| JSON · |
Codex ( |
| TOML · |
| JSONC · | |
Windsurf ( |
| JSON · |
Amp ( |
| JSONC · literal |
Antigravity ( |
| JSON · |
Augment (Auggie CLI) ( |
| JSON · |
Cline ( |
| JSON · |
CodeBuddy Code ( |
| JSONC · |
Cortex Code ( |
| JSON · |
DeepSeek Harness ( |
| YAML · |
Factory Droid ( |
| JSON · |
Gemini CLI ( |
| JSON · |
GitHub Copilot CLI ( |
| JSON · |
Goose ( |
| YAML · |
Grok Build ( |
| TOML · |
Hermes Agent ( |
| YAML · |
Junie ( |
| JSON · |
Kilo Code ( |
| JSONC · |
Kimi Code CLI ( |
| JSON · |
Kiro ( |
| JSON · |
LM Studio ( |
| JSON · |
Mistral Vibe ( |
| TOML · |
Pi ( |
| JSON · |
Qoder CLI ( |
| JSON · |
Qwen Code ( |
| JSON · |
Roo Code (VS Code) ( |
| JSON · |
Trae CN ( |
| JSON · |
Warp ( |
| JSON · |
WorkBuddy ( |
| JSON · |
Zed ( | macOS: | JSONC · |
For any other stdio MCP client, run browse mcp:
{ "mcpServers": { "browse": { "command": "/home/you/.local/bin/browse", "args": ["mcp"] } } }(browse install --agent none prints this with your path.) Re-running install updates the entries it wrote and
leaves servers named browse that it didn't write alone.
Pairing
There's nothing to sign in to. Each browser pairs with browse once and gets a key of its own (see
Security). If pairing didn't happen by itself, run browse pair: it prints a one-time code (XXXX-XXXX,
good for 10 minutes) and waits. In Firefox open the add-on's options page — about:addons → browse → Preferences,
or the setup page the add-on opened — expand advanced (or click Pair with a code), enter the code under
Pairing code and click Connect. browse pair --list shows paired browsers; browse pair --revoke <browser>
unpairs one.
Browser on another computer
When your agent runs on one machine and your browser on another (over Tailscale, say), browse runs next to the agent and the extension connects to it across the network:
On the agent's machine run
browse install --remote(orbrowse set hostname 0.0.0.0after installing). browse then listens on every network, restarting the relay if it runs, and prints this machine's address and a pairing code. Other computers reach only the extension link; the HTTP API answers on127.0.0.1only.In the browser, open browse's setup page, choose Connect an agent on another computer and enter the address and code (or use Relay address and Pairing code under advanced on the options page).
The connection isn't encrypted by browse; use a network that is (Tailscale or WireGuard), not the open internet.
browse set hostname 127.0.0.1 goes back to this computer only.
Updates
Updates are automatic. Every relay checks at launch and then hourly, whatever the update setting, and installs the channel's release when it isn't the one running (a rollback reaches everyone too):
every install reads its channel's manifest from the release service (
stable, ordev/betafor those builds), withbrowse/<channel>/<version>/cli/<install kind>as the User-Agent;the install script's binary replaces
~/.local/bin/browsewith the manifest's tarball after checking its size and SHA-256;global installs run the package manager that installed them (
npm install -g,bun add -g,pnpm add -g,yarn global add,volta install) to install@opencode/browse@<the manifest's version>into the same place. A release reaches the service a few minutes before npm, so a package manager that doesn't have the version yet is retried quietly;npx,bunx,pnpm dlxandyarn dlxruns resolve the package themselves: they only tell you another release is out.
A relay browse started restarts on the new version when it's idle (one you run with browse serve in a terminal keeps
running until you restart it); agent tabs stay open and come back. A running MCP server keeps
working with the newer relay until the agent restarts it. browse update updates now and browse update --check only
looks. Choose Tell me or Off under updates on the extension's options page, or run browse update --mode notify|off (OPENCODE_BROWSER_AUTO_UPDATE=off in the environment overrides both). Off still checks hourly, and
installs nothing. To go back, rerun the install
script with --channel <channel> or --version <version>, or install @opencode/browse@<version> with your package
manager. A signed Firefox add-on updates from addons.mozilla.org; a temporary one is replaced by quitting Firefox and
running ./setup-full.sh --extension-only again.
Dev builds: every push to dev publishes one: curl -fsSL https://opencode.ai/browse/install | bash -s -- --channel dev, or npx @opencode/browse@dev install. Dev CLIs work with the Firefox add-on. To build the add-on from
a checkout, run bun run build:firefox and load dist-firefox/manifest.json from
about:debugging#/runtime/this-firefox (or let ./setup-full.sh --extension-only do it), then browse pair. Remove
any other copy of the add-on first so only one browse runs in that profile.
Uninstall
browse uninstallIt removes browse from every agent config it was added to, stops the relay, deletes ~/.local/bin/browse (for the
install script and npx installs), the PATH line it added and browse's files. A global package stays with its package
manager: uninstall prints the command (npm rm -g @opencode/browse, bun remove -g @opencode/browse, ...). Remove the
extension from your browser to finish.
Related MCP server: beifahrer
Using it
In the Firefox build, browse page goto <url>, browse page read and browse page screenshot drive a tab through
the add-on's own Firefox-native driver, and lending a tab attaches. The tools in the next section (snapshot refs,
clicking, typing, execute, capture) go through CDP, which Firefox doesn't have, so they don't work in Firefox yet;
status and settings work.
Tabs are the handle.
navigatewithout atabopens a new background tab and returns its id; every other call passes thattab. Agents use the tab ids they opened or were given, and leave other tabs alone unless you ask. Tabs can be opened with options that stick:group(the tab group's title, and a handle to close them together),allowedOrigins,readOnly,keepVisible,keepOpen(never close it as idle) andbrowser. Popups a page opens become agent tabs too.Tabs keep their ids, and an agent can name one.
tabswithaction: "new"and anidlikework-mailopens that tab once: asking again returns the same tab without navigating it, and every tool takeswork-mailastab. The id lasts while the tab stays open: a relay restart or extension reload keeps it, and a browser restart loses it (opening that id again is a fresh tab).tabslists each tab's id, url, title, group, last use and whether a call is running in it. A tab opened withkeepOpen: truestays until an agent or you close it; every other tab closes when idle like the rest.Agents open their own tabs in the background of the window you last used, grouped together and collapsed unless you're looking at one (you can turn that off). Agents can't switch you to their tabs or bring a window to the front. Tabs nobody touches for 10 minutes close by themselves (never while something runs on them). Closing agent tabs never quits the browser: on Windows and Linux, browse leaves a new tab (or window) behind when it would close the last one.
Relay restarts keep agent tabs. The relay saves the tabs agents opened and their options, and takes them back when it starts again (after an update, say).
Hand an agent one of your tabs by clicking the toolbar button on it. The badge shows ON; click again to take it back. While an agent works the badge reads RUN, and WAIT when it needs you. The button always works: a click while an agent runs takes the tab back. Firefox's own pages (about:addons, other add-ons' pages) can't be lent.
Handoffs: the page shows a small card with the site's origin. Do the human part, then click Continue on the card or the toolbar button. While a tab is recorded you get a system notification instead of the card.
Several browsers at once. Each connected browser has an id (like
firefox-laptop);statuslists them, and new tabs open in the default browser unlessbrowsernames another.Settings (the extension's options page, applied right away): where agent tabs open (your window or their own), grouping (one shared group, one per task, or none), whether browse collapses agent groups by itself or leaves them as you set them (a handoff still opens its group so you can find the tab), when idle tabs close (10, 30, 60 minutes or never), human-like input, and handoff notifications. Agents can read and change these with the
settingstool when you ask them to.
Tools
OpenCode, which composes tools in code mode, gets the plain tools. Every other MCP client gets execute, status and
tabs; execute runs JavaScript that can call all of them. The relay decides by the client's name
(OPENCODE_BROWSER_TOOLS=plain|execute|all on the relay overrides it). On Firefox, browse page goto|read|screenshot
drive a page through the add-on's native driver; navigate, snapshot, click, execute and the other tools above
need CDP, which Firefox doesn't provide, so they don't work there. status and settings do not need it.
Tool | What it does |
| Open a page: without |
| A compact outline of the page with refs ( |
| Act on a ref, selector or point, with human-like input |
| Wait for text, a URL or an element; answer dialogs; set files; run JavaScript in the page |
| The viewport, full page, an element or a rectangle; compare with a baseline |
| Capture a tab's traffic (credentials redacted) or its console messages and errors |
| Record a tab to a video file |
| Viewport, color scheme, user agent, geolocation and more; tools a page offers through WebMCP |
| List, open or close tabs ( |
| Ask you to do something only a person can do; ask you to show a flow while it records your steps |
| Read or change your settings when you ask; the relay, browsers, pairing state and what to do next |
| For other clients: JavaScript with a Playwright-style |
Everything is a CLI too in the released binary: browse navigate https://example.com prints the new tab's id, then
browse snapshot --tab <id>, browse click e12 --tab <id>, browse execute --file script.js. browse tools lists
them and browse <tool> --help shows a tool's options. A checkout's ./setup-full.sh configures the TypeScript
reference CLI in cli/ instead: setup, pair, status and uninstall are the same there, but browse tools,
browse execute --file and browse <tool> need the released browse from the install script or npm.
How it works
The agent starts browse mcp, a small stdio proxy, which starts the relay on demand and forwards each call to it on
127.0.0.1:19988 (or the next free port from 19990–19997 when another program holds it). The add-on connects to the
relay over a WebSocket and authenticates with the key it got when you paired it.
The relay (
browse serve, inrust/) keeps agent tabs, handoffs, recordings and network captures, serves the tool API to the MCP server, and runsexecutescripts in an embedded JavaScript engine (QuickJS). It runs until it's stopped (browse restart,browse uninstall, a signal) or restarts onto an update.The add-on (
src/) keeps agent tabs in collapsed groups by default (or their own window), closes idle ones, shows the toolbar badge and the handoff card, and reports status. Firefox has no debugger API, so page commands go through a Firefox-native driver instead: navigate, read, screenshot, evaluate and layout work, and a CDP method the driver doesn't implement says so precisely.Quiet in the page. The page script runs only in the tabs agents use, adds a handoff card there and leaves no globals behind. The native driver keeps the same rules: no CDP domains pages can detect, isolated worlds, and human-like input (curved mouse paths, paced typing, gliding scroll; turn Human-like input off for full speed).
Permissions: tabs, tabGroups, storage, alarms, scripting (to add the handoff card only to tabs agents use),
webNavigation (to keep popups agents open with their other tabs), notifications (to tell you an agent needs you),
management (to tell a loaded-from-disk build from a signed one), and access to all sites so agents can work wherever
you ask. There is no debugger permission: Firefox has no such API. Nothing leaves your computer except what your
agent sends to its model provider; see the privacy policy.
Security
browse drives the browser you're signed in to, so it assumes that what an agent reads (a web page, an email) may try to steer it, and that other programs on your computer may try to use the relay.
Relay token. Every request to the relay needs the token in
~/.local/share/browse/relay-token(readable only by you). The MCP server and CLI read it for you. The relay listens on127.0.0.1only (unless you open it withset hostname, and then only the extension link) and refuses cross-site browser requests and foreignHostheaders.Pairing. A pairing code works once, within 10 minutes; five wrong codes in a row void every pending one. A browser exchanges it for a random key of its own over a fresh key agreement (ECDH), so neither the code nor the key crosses the connection. On every later connection both sides prove they hold the key before the extension obeys anything, so a program that grabs the port first can't drive your browser. The relay accepts only the published extension IDs (plus any listed in
OPENCODE_BROWSER_EXTENSION_ORIGINS).executeis sandboxed, not a boundary. Scripts run in QuickJS inside the relay with CPU, memory and time limits, no Node, network or file access beyond the file roots (temp folders andOPENCODE_BROWSER_FILE_ROOTS). Treat code an agent runs as code running as you. The relay starts with an allowlisted environment, so your API keys aren't in it.CDP guardrails. Clearing cookies, cache or site data, closing the browser and changing site permissions are refused. Closing a page is handled like closing a target: a tab you lent is released, not closed. Cookie and storage access is limited to the hosts of the tab's own pages. Agents can't open browser-internal pages, other extensions or local files, or raise windows over your work.
Guardrails, not a data boundary.
allowedOriginslimits navigations, top-level documents and the tabs and popups an agent opens; requests a page makes itself (fetch, XHR, images, scripts, iframes) are not filtered.readOnlyrefuses clicks, hover, drag, typing, key presses, filling, selecting, uploads and navigation commands after the tab opens. Scrolling to an element or to the page's edges still works.evalandwebmcpstill run JavaScript in the page: they can read everything the page can, make requests as the page, and change it (click, submit, navigate). Snapshots, screenshots and the cookies the page itself can see stay readable. These keep an agent from wandering: for pages you don't want an agent to read, don't open them in browse.What output is masked.
fillhides values only for password and one-time-code fields. Snapshots leave out what's typed in editable fields, but not other page text. Network capture redacts credentials by name and shape (auth and API-key headers, cookie values, secret-named fields, token-like path segments), so a value under an ordinary name can still come through.evalresults, console messages, page text and screenshots are returned as they are.WebMCP tools come from the page. Their names, titles, descriptions, schemas, annotations,
originand results are whatever a page supplies; browse doesn't verify them, and an annotation likereadOnlyis only the page's word. Treat them like any other page text, not as instructions from the user.Bot challenges. After a navigation browse reports Cloudflare, captcha walls and "access denied" pages and tells the agent to hand interactive ones to you. It never solves them.
Your tabs stay yours. Agents use only tabs they opened or you lent them. Only a real click on the card or the toolbar button finishes a handoff, so a page can't fake it.
Escape hatches, set in the environment you start your agent from. The relay inherits OPENCODE_BROWSER_* variables
when it starts: it stops after 30 minutes without use, or run browse restart from a shell with the same variables:
Variable | Effect |
| Let tabs read and write every cookie in the profile |
| Let tabs use every site's storage, and load resources from any host with your credentials |
| Allow bringing a tab's window to the front |
| Allow |
| More folders tools may read and write (path-list separated) |
| Open agent tabs in a separate window ( |
| Send input at full speed; overrides the options page |
| Only tell about new versions ( |
| How long to wait for a bot check the browser clears by itself |
| How long the relay waits for the extension to answer a command |
| How long a ping may go unanswered before the browser counts as asleep |
| Pin the relay's port, with no fallback. The extension finds only browse's own ports (19988, 19990–19997) by itself, so enter |
| Which tools every client gets |
Troubleshooting
browse statusshows the install, the agents browse is set up in, updates, the relay, the extension and agent tabs, and says what to do when the extension is missing, unpaired, closed or out of date. Agents get the same from thestatustool.After the relay restarts, the extension reconnects by itself within about half a minute; calls made in the meantime wait for it.
An agent says browse's tools are missing: restart the agent (or reload its MCP servers) after
browse install."The browser isn't answering" while the computer is very busy: raise
OPENCODE_BROWSER_EXTENSION_TIMEOUT_MSandOPENCODE_BROWSER_PING_TIMEOUT_MS.Logs:
~/.local/state/browse/logs/relay.log.Another program's server on port 19988: browse takes the next free port from 19990–19997 and the extension finds it there. A port held by something that doesn't answer HTTP stops it; stop that program or set
OPENCODE_BROWSER_PORT.The extension says it's not paired, or the relay refused it: run
browse installagain, orbrowse pairand enter the code in the extension's options.An agent says browse was updated and its MCP server must restart: an MCP server started before an update to this version can't talk to the new relay. Restart the agent.
Development
bun install && bun run dev # rebuilds the extension into dist/ on change; load it unpacked, reload to pick it up
bun run typecheck && bun test ./test
cd rust && cargo test --workspace && cargo run -p browse -- statusA build from a checkout (cargo run -p browse -- install) is used in place and never updates itself. The extension in
dist/ keeps the manifest key, so it loads with the unpacked ID the relay trusts; run browse pair to pair it.
Firefox
Firefox has no debugger API, and no CDP since Firefox 141, so the Firefox build pairs, reports status
and groups tabs but can't drive pages yet: agent page tools fail at once with a message saying so. It needs Firefox
139 or newer: tabs.group/tabs.ungroup arrived in 138, but the tabGroups API that
src/background/agent-relay/{groups,grouping}.ts call (get, update, move, query) arrived in 139. That is the
strict_min_version in manifest.firefox.json and the firefox139 target in both vite configs.
./setup-full.sh # install everything and load the add-on into a profile you pick
bun run build:firefox # writes dist-firefox/
bun run dev:firefox # rebuilds dist-firefox/ on change
bun run lint:firefox # web-ext lint
bun run build-for-amo # zips dist-firefox under release/firefox for addons.mozilla.org./setup-full.sh builds the add-on, asks which Firefox profile to load it into and does it through the browser's own
AddonManager, then clears the temporary debugger prefs it used. To do it by hand, open
about:debugging#/runtime/this-firefox, click Load Temporary Add-on and pick dist-firefox/manifest.json, then
run browse pair and enter the code on the add-on's options page.
The Firefox manifest sets its own content_security_policy: Firefox's Manifest V3 default adds
upgrade-insecure-requests, which would rewrite the relay's ws://127.0.0.1 link to wss:// and break it.
bun run check:firefox is the end-to-end check: it installs the build in a headless Firefox, pairs it through
browse pair, reads the add-on's own pages and diagnostics, then drives a page through the native driver (navigate,
read, screenshot) and lends the tab, checking that the attach succeeds. Run it with the relay up and pass the code it prints: browse pair then
bun run check:firefox -- --code XXXX-XXXX. --pair form (the default) submits that code through the settings page's
own "Pair with a code" form; --pair file uses the unpacked build's relay-pairing.json instead.
RELEASING.md has the release flow (dev builds from every push to dev; stable releases only from the
Release workflow in GitHub Actions), and rust/PLAN.md the layout of the Rust crates. cli/ is the
earlier TypeScript implementation, kept as a reference.
Contributing
We don't take pull requests. Open an issue describing the bug or idea, and our agents usually turn it around fast.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Let AI agents observe and control Chrome tabs you explicitly share via Browse Bridge.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to control the user's Chrome or Firefox browser, leveraging existing sessions for tasks requiring authentication and user handoff.1847 npm23MIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to interact with the user's current Firefox or Chromium browser under per-site policies, allowing it to list tabs, read pages, take screenshots, fill fields, and click with user confirmation.AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to operate a real, logged-in Firefox session through an extension, including tab and history management, page reading, screenshots, and clicking, typing, or scrolling on domains the user approves.MIT
- AlicenseAqualityBmaintenanceLet AI agents use the Firefox, Zen, or LibreWolf browser you already have open, with your logins, cookies, and extensions intact. No Playwright, Chromium, or WebDriver. Agents work in background tabs while you keep browsing: read pages, click, fill forms, take screenshots, and capture network traffic. A WebExtension plus a local bridge lets several agents share one browser.6282 PyPI44MIT