Skip to content
View source (opens in a new tab)

View source (opens in a new tab)

github.com • November 17, 2026

Let your AI agents use your real browser: your tabs, your logins, your extensions. A small native MCP server and a Chromium extension, for OpenCode , Claude Code, Codex, Cursor and any other MCP client.

Agents get a browse MCP server. 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 .

It works in Chrome, Edge, Brave, Arc, Helium, Vivaldi, Opera and Chromium.

Or paste this into your agent: "Set up browse so you can use my Chrome: run curl -fsSL | bash " . It sets browse up for the agent that ran it.

Other ways to install, all of which end in the same browse install :

There's always exactly one browse : a global package install is left to its package manager (nothing is copied 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 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/bin to your PATH when it copied browse there ( --no-modify-path skips 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 time). Type to all supported agents, ↑/↓ to move, Space or Tab to toggle, Enter to confirm. An agent running browse install sets up itself. Without a terminal OpenCode is the default. Edits keep the and formatting of each agent's config.

Connects the extension. If no browser has browse yet, install opens it in the Chrome Web Store; add it, and install pairs it once it's there. 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.

CONFIG 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.

For any other stdio MCP client, run browse 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.

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 install again, or run browse pair : it prints a one-time code ( XXXX-XXXX , good for 10 minutes) and waits. Open Extensions → browse → Options , 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 unpairs one.

Browser on another computer

When your agent runs on one machine and your browser on another (over Tailscale, say), browse runs to the agent and the extension connects to it across the network:

On the agent's machine run browse install --remote (or browse set hostname 0.0.0.0 after 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 on 127.0.0.1 only.

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 are automatic. The relay checks once at start and then hourly, and installs a new version when no agent is using the browser:

the install script's binary (and npx/bunx copies) read the channel's manifest from the release service and replace ~/.local/bin/browse after checking its size and SHA-256;

global installs read npm's dist-tag ( latest , or dev / beta for those builds) and run the package manager that installed them ( npm install -g , bun add -g , pnpm add -g , yarn global add , volta install ) into the same place.

The relay restarts on the new version when it's idle; 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). To go back, rerun the install script with --channel or --version , or install @opencode/browse@ with your package manager. The Chrome Web Store updates the extension.

Dev builds : every push to dev publishes one: curl -fsSL | bash -s -- --channel dev , or npx @opencode/browse@dev install . The store extension works with dev builds. To try the dev extension too, download , unzip it, turn on Developer mode on your browser's extensions page, click Load unpacked , pick the folder and run browse pair ( browse extension prints these steps on the dev channel). Remove the store extension first so only one browse runs in that profile.

It 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.

Tabs are the handle. navigate without a tab opens a new background tab and returns its id; every other call passes that tab . 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 and browser . Popups a page opens become agent tabs too.

Tabs keep their ids, and an agent can name one. tabs with action: "new" and an id like work-mail opens that tab once: asking again returns the same tab without navigating it, and every tool takes work-mail as tab . The id lasts while the browser runs, through service-worker restarts. An extension update or reload keeps it only for tabs in browse's agent group (grouping on); lent and ungrouped tabs get a new id then, and a browser restart starts over. A tab opened this way is never closed as idle: only an agent or you close it. tabs lists each tab's id, url, title, group, last use and whether a call is running in it.

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. The browser's debugging bar ( Cancel ) disconnects browse from every tab. Chrome's own pages, the Web Store included, 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 chrome-macbook ); status lists them, and new tabs open in the default browser unless browser names 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 settings tool when you ask them to.

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).

Everything is a CLI too: browse navigate prints the new tab's id, then browse snapshot --tab , browse click e12 --tab , browse execute --file script.js . browse tools lists them and browse --help shows a tool's options.

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 free port from 19990–19997 when another program holds it). The extension connects to the relay over a WebSocket and runs its commands in your browser through chrome.debugger .

The relay ( browse serve , in rust/ ) keeps agent tabs, handoffs, recordings and network captures, talks the Chrome DevTools Protocol to each tab, and runs execute scripts in an embedded JavaScript engine (QuickJS). It exits when nothing uses it.

The extension ( src/ ) runs the relay's commands through chrome.debugger , keeps agent tabs in collapsed groups by default (or their own window), closes idle ones, and shows the toolbar badge and the handoff card.

Quiet in the page. browse doesn't enable the CDP domains pages can detect, runs its own code in isolated worlds and leaves no globals behind. Input moves like a person: curved mouse paths, paced typing, gliding scroll (turn Human-like input off for full speed). This makes an agent hard to spot, not impossible: the browser shows its "started debugging" bar while the debugger is attached.

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/ /browse/relay-token (readable only by you). The MCP server and CLI read it for you. The relay listens on 127.0.0.1 only (unless you open it with set hostname , and then only the extension link) and refuses cross-site browser requests and foreign Host headers.

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 ).

execute is 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 and OPENCODE_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. allowedOrigins limits 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. readOnly refuses clicks, hover, drag, typing, key presses, filling, selecting, uploads and commands after the tab opens. Scrolling to an element or to the page's edges still works. eval and webmcp still 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. fill hides 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. eval results, console messages, page text and screenshots are returned as they are.

WebMCP tools come from the page. Their names, titles, descriptions, schemas, annotations, origin and results are whatever a page supplies; browse doesn't verify them, and an annotation like readOnly is only the page's word. Treat them like any other page text, not as instructions from the user.

Bot challenges. After a 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:

browse status shows 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 the status tool.

After the relay restarts, the extension reconnects by itself within 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_MS and OPENCODE_BROWSER_PING_TIMEOUT_MS .

Logs: ~/.local/state/browse/logs/relay.log .

Another program's server on port 19988: browse takes the 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 install again, or browse pair and 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.

A 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. 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.

We don't take pull requests. Open an issue describing the bug or idea, and our agents usually turn it around fast.