[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109720":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":26,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":15,"starSnapshotCount":15,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},109720,"browse","anomalyco\u002Fbrowse","anomalyco","Let your AI agents use your real browser: an MCP server and a Chromium extension",null,"TypeScript",1060,79,4,28,0,33,391,855,133,103.68,"MIT License",false,"dev",true,[],"2026-11-23 19:55:23","2026-11-23 19:10:17","\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets\u002Fbanner-dark.png\">\n  \u003Cimg src=\"assets\u002Fbanner-light.png\" alt=\"browse: let your AI agents use your real browser. An isometric desk computer whose screen shows a web browser with an agent's tab group, cabled to a small relay box.\">\n\u003C\u002Fpicture>\n\nLet your AI agents use your real browser: your tabs, your logins, your extensions. An MCP server and a Chromium\nextension, for [opencode](https:\u002F\u002Fopencode.ai) and any other MCP client.\n\n---\n\nAgents get a `browse` MCP server. They open and drive tabs with Playwright, take screenshots, capture network\ntraffic and record the screen, in background tabs grouped out of your way. When it's your turn (a login,\na 2FA prompt, a payment), they hand the tab back to you and continue once you click **Continue**.\n\nIt works in Chrome, Edge, Brave, Arc, Helium, Vivaldi, Opera and Chromium.\n\n## Install\n\n```sh\ncurl -fsSL https:\u002F\u002Fopencode.ai\u002Fbrowse\u002Finstall | bash\n```\n\nOn Windows, run `irm https:\u002F\u002Fopencode.ai\u002Fbrowse\u002Finstall.ps1 | iex` in PowerShell. With Node.js,\n`npx @opencode\u002Fbrowse install` works too: it installs the package globally so agents run `browse` from PATH. The\ninstaller puts the `browse` command in `~\u002F.local\u002Fbin` (`$XDG_BIN_HOME` when set) and runs `browse install`. It reads\nthe channel's manifest from [Anomaly's release service](https:\u002F\u002Fanoma.ly\u002Frelease), downloads the binary for this\ncomputer, and verifies its size and SHA-256 before installing it. `--channel stable|beta|dev` picks the channel\n(`stable` by default); `--version \u003Cversion>` installs a specific version from npm, checked against npm's published\nSHA-512 integrity.\n\n`install` keeps its files in the XDG folders (`~\u002F.config\u002Fbrowse`, `~\u002F.local\u002Fshare\u002Fbrowse`, `~\u002F.local\u002Fstate\u002Fbrowse`\nand `~\u002F.cache\u002Fbrowse`; each honours its `XDG_*` variable), adds the `browse` MCP server to the agents you choose, and\nconnects the extension:\n\n1. **Choose your agents.** Detected agents start checked. Type to filter, use ↑\u002F↓ to move, Space to toggle and\n   Enter to confirm. You can uncheck OpenCode, choose an agent you haven't installed yet, or choose none for CLI-only use.\n   Your next interactive install starts with your last selection.\n2. **Add the extension.** `install` opens browse in the Chrome Web Store; add it to your browser, and `install` pairs\n   it once it's there. If it's already there, `install` opens its setup page with a one-time pairing code, so it\n   pairs without copying anything.\n\nThat's it. Ask an agent to *\"open news.ycombinator.com and tell me the top story\"*. Or paste this into opencode:\n*\"Install browse with `npx @opencode\u002Fbrowse install`.\"*\n\nRequirements: a Chromium browser, and [opencode](https:\u002F\u002Fopencode.ai) or another MCP client. The npx install also needs\nNode.js 22.19+.\n\n**Updates are automatic.** A binary install reads its channel's manifest from Anomaly's release service at launch and\nat least once an hour; an npm install checks npm's dist-tag once an hour. When the current release is a different build,\nthe relay reruns whatever installed browse in the background: a binary install reruns the install script that shipped\nwith the browse version it's running (not one downloaded at update time), which checks the file's size and SHA-256 and\nreplaces `~\u002F.local\u002Fbin\u002Fbrowse`; an npm install runs `npm install -g @opencode\u002Fbrowse@\u003Cversion>`. It restarts the relay\nwhen no agent is using the browser, without changing opencode's config. Running MCP servers swap to the new build\nbetween tool calls. Choose *Only tell me* or *Don't check* under **Updates** on the extension's\nsettings page (or `settings set autoUpdate=notify`, or `OPENCODE_BROWSER_AUTO_UPDATE=off`). Agents can read the current\nvalue from `status`, but the MCP `settings` tool can't read or change update behaviour; it stays with you. `browse\nupdate` updates now; to go back, rerun the installer with `--channel \u003Cchannel>` (binary installs follow the channel) or\n`--version \u003Cversion>` \u002F `npm install -g @opencode\u002Fbrowse@\u003Cversion>` (both from npm). The Chrome Web Store updates the\nextension.\n\n**Dev builds**: every push to `dev` publishes one. `npx @opencode\u002Fbrowse@dev install` follows the dev channel: it\ndownloads that build's extension into `\u003Ccache root>\u002Fextension`, which you load unpacked once (`browse extension` shows\nthe folder), and each update refreshes the folder and reloads the extension. A binary install follows the same dev\nchannel with `curl -fsSL https:\u002F\u002Fopencode.ai\u002Fbrowse\u002Finstall | bash -s -- --channel dev`. The zip is also at\nhttps:\u002F\u002Fanoma.ly\u002Frelease\u002Fbrowse\u002Fextension\u002Fdev\u002Fchromium and each binary at\nhttps:\u002F\u002Fanoma.ly\u002Frelease\u002Fbrowse\u002Fcli\u002Fdev\u002F\u003Ctarget>.\n\nThere's nothing to sign in to. Each browser pairs with the relay once and gets a key of its own (see\n[Security](#security)). If pairing didn't happen by itself, run `browse install` again to open a\npairing link. To pair by hand, run `browse pair` (from a checkout: `node cli\u002Fdist\u002Fcli.mjs pair`).\nIt starts the relay and waits. Open **Extensions → browse → Options**, expand **advanced** (or click **Pair with a code**),\nenter the printed code under **Pairing code**, and click **Connect**.\nThe command confirms which browser paired. `pair --list` shows paired browsers; `pair --revoke \u003Cbrowser>` unpairs one.\n\n### From source\n\nFor contributors, or before a release you need is on npm:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fbrowse.git && cd browse && bun run setup\n```\n\n`setup` builds the extension and the CLI, adds the `browse` MCP server to your selected agents, and puts a one-time pairing code\nin `browse\u002Fdist` (good for an hour), which the extension exchanges for its own key when it first connects. `install` points\nevery channel at the Chrome Web Store build; to use the build from your checkout instead, run\n`node cli\u002Fdist\u002Fcli.mjs extension`, which shows the `browse\u002Fdist` folder to load unpacked.\n\nThis needs [Bun](https:\u002F\u002Fbun.sh) as well. A checkout never updates itself: run `node cli\u002Fdist\u002Fcli.mjs update` in your\n`browse` folder (or ask your agent to update browse). It pulls the new commits (fast-forward\nonly, and never over local changes), rebuilds, and requests an extension reload. If the old extension cannot accept\nthe request, **reload browse on your browser's extensions page (↻)**. The manual equivalent of `update` is\n`git pull && bun run setup`. When there's an update, `status`, `doctor`, the extension's settings page and the agent (once\nper session) say so; browse checks the clone's remote at most every six hours. Set `OPENCODE_BROWSER_UPDATE_CHECK=0` to\nturn the check off.\n\n### Other MCP clients\n\nTo skip the picker, name one or more agents. Explicit names take precedence over caller detection:\n\n```sh\nbrowse install -a claude cursor --agent gemini\nbrowse install -a '*'   # every supported client, including those not installed (--all-agents)\nbrowse install -y       # detected clients in an ordinary shell (--yes)\n```\n\nInside a recognized agent, `install` targets that caller automatically. Without a terminal it configures the caller\nif it recognizes it. If it can't tell which agent ran it, it configures nothing and prints the MCP entry to add by\nhand, plus a `browse install --agent \u003Cname>` command for each agent it found. Outside a recognized agent, `-y` sets\nup every detected agent instead of opening the picker, with or without a terminal. Re-running install is additive:\nunchecking a client skips it, not a removal. `uninstall` removes the entries browse wrote, not unrelated servers or\nconflicting entries.\n\n\u003Cdetails>\u003Csummary>Supported agents and user-level config files\u003C\u002Fsummary>\n\n`CONFIG` is `$XDG_CONFIG_HOME` or `~\u002F.config`. `APP` is `~\u002FLibrary\u002FApplication Support` on macOS, `%APPDATA%` on\nWindows, or `CONFIG` on Linux. The paths below are defaults; a client's existing config or location override can apply.\n\n| Agent (flag) | User config | Format \u002F server key |\n| --- | --- | --- |\n| [OpenCode](https:\u002F\u002Fopencode.ai\u002Fv2\u002Fdocs\u002Fmcp-servers) (`opencode`) | `CONFIG\u002Fopencode\u002Fopencode.json` or `.jsonc` | JSONC · `mcp.servers` |\n| [Claude Code](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmcp-quickstart) (`claude`) | `~\u002F.claude.json` | JSON · `mcpServers` |\n| [Claude Desktop](https:\u002F\u002Fmodelcontextprotocol.io\u002Fdocs\u002Fdevelop\u002Fbuild-server) (`claude-desktop`) | `APP\u002FClaude\u002Fclaude_desktop_config.json` | JSON · `mcpServers` |\n| [Cursor](https:\u002F\u002Fcursor.com\u002Fdocs\u002Fcontext\u002Fmcp) (`cursor`) | `~\u002F.cursor\u002Fmcp.json` | JSON · `mcpServers` |\n| [Codex](https:\u002F\u002Fdevelopers.openai.com\u002Fcodex\u002Fmcp) (`codex`) | `~\u002F.codex\u002Fconfig.toml` | TOML · `mcp_servers` |\n| [VS Code, including Copilot agent mode](https:\u002F\u002Fcode.visualstudio.com\u002Fdocs\u002Fagents\u002Freference\u002Fmcp-configuration) (`vscode`) | `APP\u002FCode\u002FUser\u002Fmcp.json` | JSONC · `servers` |\n| [Windsurf](https:\u002F\u002Fdocs.windsurf.com\u002Fwindsurf\u002Fcascade\u002Fmcp) (`windsurf`) | `~\u002F.codeium\u002Fwindsurf\u002Fmcp_config.json` or existing `CONFIG\u002Fdevin\u002Fmcp_config.json` (`APP\u002Fdevin` on Windows) | JSON · `mcpServers` |\n| [Amp](https:\u002F\u002Fampcode.com\u002Fmanual\u002Fmcp) (`amp`) | `~\u002F.config\u002Famp\u002Fsettings.json` or `.jsonc` | JSONC · literal `amp.mcpServers` |\n| [Antigravity](https:\u002F\u002Fantigravity.google\u002Fdocs\u002Fcli\u002Fmcp) (`antigravity`) | `~\u002F.gemini\u002Fconfig\u002Fmcp_config.json` | JSON · `mcpServers` |\n| [Augment (Auggie CLI)](https:\u002F\u002Fdocs.augmentcode.com\u002Fcli\u002Fintegrations) (`augment`) | `~\u002F.augment\u002Fsettings.json` | JSON · `mcpServers` |\n| [Cline](https:\u002F\u002Fdocs.cline.bot\u002Fmcp\u002Fconfiguring-mcp-servers) (`cline`) | `~\u002F.cline\u002Fdata\u002Fsettings\u002Fcline_mcp_settings.json`; also recognizes the existing VS Code extension file in `APP\u002FCode\u002FUser\u002FglobalStorage\u002Fsaoudrizwan.claude-dev\u002Fsettings\u002F` | JSON · `mcpServers` |\n| [CodeBuddy Code](https:\u002F\u002Fwww.codebuddy.ai\u002Fdocs\u002Fcli\u002Fmcp) (`codebuddy`) | `~\u002F.codebuddy\u002F.mcp.json` (or existing `mcp.json`) | JSONC · `mcpServers` |\n| [Cortex Code](https:\u002F\u002Fdocs.snowflake.com\u002Fen\u002Fuser-guide\u002Fcortex-code\u002Fcortex-code-mcp) (`cortex`) | `~\u002F.snowflake\u002Fcortex\u002Fmcp.json` | JSON · `mcpServers` |\n| [Factory Droid](https:\u002F\u002Fdocs.factory.ai\u002Fcli\u002Fconfiguration\u002Fmcp) (`droid`) | `~\u002F.factory\u002Fmcp.json` | JSON · `mcpServers` |\n| [Gemini CLI](https:\u002F\u002Fgeminicli.com\u002Fdocs\u002Ftools\u002Fmcp-server\u002F) (`gemini`) | `~\u002F.gemini\u002Fsettings.json` | JSON · `mcpServers` |\n| [GitHub Copilot CLI](https:\u002F\u002Fdocs.github.com\u002Fen\u002Fcopilot\u002Fhow-tos\u002Fcopilot-cli\u002Fcustomize-copilot\u002Fadd-mcp-servers) (`copilot`) | `~\u002F.copilot\u002Fmcp-config.json` | JSON · `mcpServers` |\n| [Goose](https:\u002F\u002Fgoose-docs.ai\u002Fdocs\u002Fguides\u002Fconfig-file\u002F) (`goose`) | `CONFIG\u002Fgoose\u002Fconfig.yaml`; Windows: `APP\u002FBlock\u002Fgoose\u002Fconfig\u002Fconfig.yaml` | YAML · `extensions` |\n| [Grok Build](https:\u002F\u002Fdocs.x.ai\u002Fbuild\u002Fsettings) (`grok`) | `~\u002F.grok\u002Fconfig.toml` | TOML · `mcp_servers` |\n| [Hermes Agent](https:\u002F\u002Fhermes-agent.nousresearch.com\u002Fdocs\u002Fuser-guide\u002Ffeatures\u002Fmcp) (`hermes`) | `~\u002F.hermes\u002Fconfig.yaml` | YAML · `mcp_servers` |\n| [Junie](https:\u002F\u002Fjunie.jetbrains.com\u002Fdocs\u002Fjunie-cli-mcp-configuration.html) (`junie`) | `~\u002F.junie\u002Fmcp\u002Fmcp.json` | JSON · `mcpServers` |\n| [Kilo Code](https:\u002F\u002Fkilo.ai\u002Fdocs\u002Fautomate\u002Fmcp\u002Fusing-in-cli) (`kilo`) | `CONFIG\u002Fkilo\u002Fkilo.json` (also `.jsonc`, `config.json`) | JSONC · `mcp` |\n| [Kimi Code CLI](https:\u002F\u002Fmoonshotai.github.io\u002Fkimi-cli\u002Fen\u002Fcustomization\u002Fmcp.html) (`kimi`) | `~\u002F.kimi\u002Fmcp.json` | JSON · `mcpServers` |\n| [Kiro](https:\u002F\u002Fkiro.dev\u002Fdocs\u002Fmcp\u002Fconfiguration\u002F) (`kiro`) | `~\u002F.kiro\u002Fsettings\u002Fmcp.json` | JSON · `mcpServers` |\n| [LM Studio](https:\u002F\u002Flmstudio.ai\u002Fblog\u002Flmstudio-v0.3.17) (`lm-studio`) | `~\u002F.lmstudio\u002Fmcp.json` | JSON · `mcpServers` |\n| [Mistral Vibe](https:\u002F\u002Fdocs.mistral.ai\u002Fvibe\u002Fcode\u002Fcli\u002Fmcp-servers) (`vibe`) | `~\u002F.vibe\u002Fconfig.toml` | TOML · `[[mcp_servers]]` |\n| [Pi](https:\u002F\u002Fpi.dev\u002Fdocs\u002Flatest\u002Fmcp) (`pi`) | `~\u002F.pi\u002Fagent\u002Fmcp.json` | JSON · `mcpServers` |\n| [Qoder CLI](https:\u002F\u002Fdocs.qoder.com\u002Fcli\u002Fmcp-reference) (`qoder`) | `~\u002F.qoder\u002Fsettings.json` | JSON · `mcpServers` |\n| [Qwen Code](https:\u002F\u002Fqwenlm.github.io\u002Fqwen-code-docs\u002Fen\u002Fusers\u002Ffeatures\u002Fmcp\u002F) (`qwen-code`) | `~\u002F.qwen\u002Fsettings.json` | JSON · `mcpServers` |\n| [Roo Code (VS Code)](https:\u002F\u002Fdocs.roocode.com\u002Ffeatures\u002Fmcp\u002Fusing-mcp-in-roo) (`roo`) | `APP\u002FCode\u002FUser\u002FglobalStorage\u002Frooveterinaryinc.roo-cline\u002Fsettings\u002Fmcp_settings.json` | JSON · `mcpServers` |\n| [Warp](https:\u002F\u002Fdocs.warp.dev\u002Fagents\u002Fcapabilities\u002Fmcp) (`warp`) | `~\u002F.warp\u002F.mcp.json` | JSON · `mcpServers` |\n| [Zed](https:\u002F\u002Fzed.dev\u002Fdocs\u002Fai\u002Fmcp) (`zed`) | macOS: `~\u002F.config\u002Fzed\u002Fsettings.json`; Linux: `CONFIG\u002Fzed\u002Fsettings.json`; Windows: `APP\u002FZed\u002Fsettings.json` | JSONC · `context_servers` |\n\n\u003C\u002Fdetails>\n\nFor another stdio MCP client, add the `browse` command with the `mcp` argument. That works for a binary install and a\nglobal npm install, and keeps working when node changes under nvm\u002Ffnm:\n\n```json\n{ \"mcpServers\": { \"browse\": { \"command\": \"browse\", \"args\": [\"mcp\"] } } }\n```\n\n`browse install --agent '*'` writes this for every agent it knows. An npx-only client can run\n`npx @opencode\u002Fbrowse mcp` instead, but that entry updates only when npx resolves a newer package.\n\n### Browser on another computer\n\nWhen opencode runs on one machine and your browser on another (over Tailscale, say), the relay runs next to opencode\nand the extension connects to it across the network:\n\n1. On the opencode machine, install browse, then run `browse set hostname 0.0.0.0`.\n   The relay then listens on every network, restarting if it runs. Other computers reach only the extension link;\n   the HTTP API and CDP answer on `127.0.0.1` only. The command prints the address and a pairing code for step 2\n   (`browse pair` prints another; each works once, within 10 minutes).\n2. In the browser, open the extension's settings page (right-click the toolbar button, then **Options**). Under\n   **advanced**, replace `localhost:19988` in **Relay address** with that machine's address (a Tailscale IP or name, with\n   `:port` if it isn't 19988), enter the code under **Pairing code**, then click **Connect**. The page says right there\n   whether the relay answered and accepted the code.\n\n`browse set hostname 127.0.0.1` goes back to this computer only.\n\nPairing works as it does locally: the browser exchanges the code for a key of its own, and from then on both sides\nprove they hold that key on every connection, so anyone else on the network who reaches the port gets nothing. The\nconnection itself isn't encrypted by browse; use a network that is (Tailscale or WireGuard), not the open internet. Set\n**Relay** back to `localhost` (or clear it) to go back to a relay on the browser's computer.\n\n## Using it\n\n- **Agents open their own tabs** in the background of the window you last used, grouped together at the start of your\n  tab strip and collapsed unless you're looking at one. Agents can't switch you to their tabs or bring a window to the\n  front; popups an agent opens join its group, and if one takes over your window you get your tab back. Tabs nobody\n  touches for 10 minutes close by themselves (never while a script runs on them).\n- **Settings** (the extension's options page; each applies right away, to new tabs for window and grouping):\n  - **Where agents open their tabs:** in your window (default), or *in a separate window* of their own that opens\n    unfocused beside yours (on another display when there's no room on yours); their popups move there too.\n  - **Grouping:** one shared group for every agent (default; \"Agents · 3\", one per window, popups included; a handoff\n    opens it), *one collapsed group per agent session*, or *don't group* (agent tabs sit in the background of your tab\n    strip; pin one to keep it). Tabs already grouped stay where they are when you switch.\n  - **Close tabs agents haven't touched for:** 10 minutes (default), 30, 60, or *never*. Tabs a script runs on, a\n    handoff waits on or a recording records stay open regardless. With *never*, an agent's `tabs_cleanup` without a\n    time still closes only tabs idle for 10 minutes.\n  - **Agent cursor:** off (default) or *always show* it on agent tabs. Pages can detect it while it's shown.\n    Recordings still leave it out unless they ask for it (`cursor: true`).\n  - **Human-like input:** on (default), or *off*: faster, but easier for sites to flag as a bot.\n  - **Handoff notifications:** only while the tab is recorded (default), or *on every handoff*, as well as the card.\n  The relay's environment variables below override the window, cursor and input settings; the options page then\n  shows the value in effect and which variable set it. Agents can read and change these settings with the `settings`\n  tool when you ask them to (`node cli\u002Fdist\u002Fcli.mjs settings get`, `settings set grouping=shared` on the CLI); the\n  options page follows at once. The security switches below are environment-only, never settings.\n- **Hand an agent one of your tabs** by clicking the toolbar button on it. The badge shows **ON**; click again to take\n  it back. While an agent works the badge reads **RUN**, and **WAIT** when it needs you. The button always works: a\n  click while a script runs takes the tab back and stops the script. Agents can't close a tab you lent them. The\n  browser's debugging bar button (**Cancel** in Chrome, **OK** in some browsers like Dia) disconnects browse from\n  every tab: tabs you lent go back to you, and tabs agents opened stay open until idle cleanup closes them.\n- **Handoffs:** the page shows a small card with the site's origin. Do the human part, then click **Continue** on the\n  card or the toolbar button.\n- **Recordings show only the page.** Nothing from browse is drawn while a tab is recorded: no cursor, no\n  labels, no handoff card (you get a system notification instead; click it to go to the tab). If notifications are\n  turned off for the extension, the card is shown after all, and the recording includes it. For a demo video, ask for\n  the ghost cursor with `cursor: true` on the `recording` tool (`action: \"start\"`; `--cursor` on the CLI).\n- **Status:** the extension's options page shows whether the relay is connected and paired, and can copy diagnostics.\n\n## Tools\n\n| Tool | What it does |\n| --- | --- |\n| `execute` | Run Playwright code against the session's page (`page`, `context`, `snapshot()`, `handoff()`, …) |\n| `session_new`, `session_list`, `session_use`, `session_reset`, `session_delete` | Named sessions, each with its own tabs; they survive restarts |\n| `session_adopt` | Take over a tab you handed over with the toolbar button |\n| `session_allowlist` | Limit a session's tabs to the sites you name (also `allowedOrigins` on `session_new`) |\n| `network` (`action`: `start`, `status`, `stop`, `cancel`) | Capture traffic to a redacted HAR |\n| `recording` (`action`: `start`, `stop`, `status`, `cancel`) | Record a tab to MP4 or WebM (`cursor: true` draws the ghost cursor) |\n| `flight_recorder` (`action`: `start`, `status`, `save_last`, `cancel`) | Keep the last minute of video, save it when something breaks |\n| `secrets_list` | Site secrets you stored for the session's sites; agents type them with `secrets.type()` only on their sites, without seeing them |\n| `secrets_status`, `secrets_refresh`, `secrets_run` | Reuse captured credentials while keeping their values out of transcripts and artifacts |\n| `tabs_cleanup` | Close idle agent tabs (`idleMinutes` applies to the calling agent's own sessions; other agents' wait for the idle setting) |\n| `settings` | Read or change the settings below when the user asks (never the security switches or update behaviour); the options page updates live |\n| `status` | Connection status |\n\nEach agent has its own current session only when the client names the agent (OpenCode does; `status` reports\n`sharedSession`). With other clients, agents on one server share one current session; when several use it, each\nshould `session_new` its own and pass `session` on every call.\n\nThe agent reference is [`cli\u002Fskills\u002Fbrowse\u002FSKILL.md`](cli\u002Fskills\u002Fbrowse\u002FSKILL.md)\n(`browse skill` prints it). The MCP server also sends a short usage guide in its\ninitialize instructions. Everything is also a CLI:\n`node cli\u002Fdist\u002Fcli.mjs --help`.\n\n## How it works\n\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets\u002Fhow-dark.png\">\n  \u003Cimg src=\"assets\u002Fhow-light.png\" alt=\"Three machines on one bench, cabled in a line: the agent's terminal calling browse.execute, the relay box in the middle, and the computer whose browser the agent drives.\">\n\u003C\u002Fpicture>\n\nThe agent talks to the `browse` MCP server over stdio. The server hands each command to the relay on\n`127.0.0.1:19988`, and the extension, connected to the relay over a WebSocket, runs it in your browser through\n`chrome.debugger`.\n\n- **The relay** (`cli\u002F`) is a local Chrome DevTools endpoint backed by the extension. It keeps named sessions,\n  handoffs, recordings, network capture and a journal, and starts on demand.\n- **The extension** (`src\u002F`) connects to the relay and runs its commands through `chrome.debugger`. It keeps agent\n  tabs in collapsed groups (or their own window), closes idle ones, and shows the toolbar badge and the handoff card.\n- **Quiet in the page.** `execute` uses [Patchright](https:\u002F\u002Fgithub.com\u002FKaliiiiiiiiii-Vinyzu\u002Fpatchright), which hides\n  the usual automation tells (`navigator.webdriver`, the `Runtime.enable` leak), and the relay drops Patchright's media\n  emulation overrides. The extension adds nothing to pages you browse; in agent tabs it adds nothing to the DOM except\n  the handoff card while a handoff waits (and the ghost cursor when asked for). Both live in a closed shadow root on an\n  anonymous element, drawn from an isolated world. Input moves like a person: curved mouse paths, paced typing,\n  gliding scroll (turn *Human-like input* off on the options page, or `OPENCODE_BROWSER_HUMAN_INPUT=0`, for full speed). This makes an agent hard to spot, not impossible: the\n  browser shows its \"started debugging\" bar while the debugger is attached, focus emulation keeps background agent tabs\n  \"visible\", the card and cursor elements exist while shown, and `fillInput`'s fallback dispatches synthetic events\n  (it warns when it does).\n\nPermissions: `debugger`, `tabs`, `tabGroups`, `storage`, `alarms`, `offscreen` and `tabCapture` (recordings),\n`scripting` (to add the handoff script only to tabs agents use, never to every page), `webNavigation` (to keep popups\nagents open with their other tabs), `notifications` (to tell you an agent needs you while it records a tab), and access to\nall sites so agents can work wherever you ask. Nothing leaves your computer except what your agent sends to its model\nprovider; see the [privacy policy](store\u002Fprivacy-policy.md).\n\n## Security\n\nbrowse drives the browser you're signed in to, so it assumes that what an agent reads (a web page, an email)\nmay try to steer it, and that other programs on your computer may try to use the relay.\n\n- **Relay token.** Every HTTP request and CDP connection to the relay needs the token in\n  `~\u002F.local\u002Fshare\u002Fbrowse\u002Frelay-token` (readable only by you): an `Authorization: Bearer` header, or\n  `?opencodeBrowserToken=` on the CDP WebSocket URL. The MCP server and CLI read it for you. The relay listens on\n  `127.0.0.1` only and refuses cross-site browser requests and foreign `Host` headers.\n- **Pairing.** `pair` prints a short code (`XXXX-XXXX`) that works once, within 10 minutes; five wrong codes in a row\n  void every pending one. A browser exchanges it for a random key of its own, kept by the relay\n  (`browser-tokens.json` in the data folder, readable only by you) and in the extension's storage. The exchange runs\n  over a fresh key agreement (ECDH), so neither the code nor the key crosses the connection, and each side proves it\n  knows the code before the other gives anything away. On every later connection both sides prove they hold the key\n  (HMAC over fresh nonces) before the extension obeys anything, so a program that grabs the port first can't drive\n  your browser. `pair --list` shows paired browsers and when each was last seen; `pair --revoke \u003Cbrowser>` deletes a\n  browser's key and disconnects it. The relay accepts only the two published extension IDs (plus any listed in\n  `OPENCODE_BROWSER_EXTENSION_ORIGINS`). Browsers paired by an earlier version with its shared code switch to a key of\n  their own the next time they connect; `pair --revoke legacy` retires that code once they all have.\n- **Restricted `execute`.** Agent code runs in a restricted JavaScript realm on the relay: it withholds Node\n  APIs (`process`, `require`, `import()`, `fs`, network modules, Node fetch), limits files to the file roots, checks\n  the file paths in the raw CDP commands that take them, and stops synchronous code after about 2 seconds. It shares\n  the relay's process, so it is not a security boundary:\n  treat code an agent runs as code running as you. The relay starts with an allowlisted environment (the basics plus\n  `OPENCODE_BROWSER_*`, proxy variables and CA certificate paths), so your API keys aren't in it.\n- **CDP guardrails.** Cookie reads return only cookies for the session's own pages; cookie writes are limited to\n  those hosts. Clearing cookies, cache or site data, and closing the browser, are always refused. `page.bringToFront()`\n  is refused so agents can't raise windows over your work.\n- **Domain allowlists (opt-in).** `session new \u003Cname> --allow-origin example.com` (or `session allow`, or\n  `allowedOrigins` on `session_new` \u002F `session_allowlist`) limits where a session's tabs go. The relay refuses agent\n  navigations and new tabs to other hosts, stops or blanks links, redirects and script navigations that leave the\n  list, and closes popups that open elsewhere. Private, loopback and link-local addresses need an entry naming that\n  exact host; names are resolved first and the document's real remote IP is checked, against DNS rebinding.\n  Subresources (images, fetch, iframes, workers) are not blocked: request interception is shared with Playwright's\n  `page.route()`, so the relay can't own it reliably. Browsing through a local proxy makes every document look like\n  it came from the proxy's address, so name the hosts you need exactly.\n- **Site secrets.** `browse secrets add \u003Cname> --origin https:\u002F\u002Fexample.com` stores a password, key or (with\n  `--totp`) a TOTP seed, read from stdin or a hidden prompt, in `~\u002F.local\u002Fshare\u002Fbrowse\u002Fsite-secrets\u002F`\n  (0700\u002F0600). An agent types it with `secrets.type(locator, \"\u003Cname>\")`: the relay checks the field's frame URL from\n  the browser's frame tree against the secret's origins (and the session's allowlist) right before it inserts the\n  value, so a cross-origin iframe or a redirect gets nothing. The value never enters the execute realm, results,\n  logs, journals or HARs. Once typed it is in the page, where page script could read it, so pair secrets with an\n  allowlist (execute warns when you don't). A stored TOTP seed makes 2FA one factor; keep handing 2FA to yourself\n  when you can. `secrets list` and `secrets remove` manage them.\n- **Bot challenges.** After a navigation, execute reports Cloudflare, Akamai, DataDome, PerimeterX, Imperva, AWS WAF,\n  captcha walls and \"access denied\" pages in `aftermath.challenge`. It waits up to 15 s\n  (`OPENCODE_BROWSER_CHALLENGE_WAIT_MS`) for checks the browser clears by itself, and tells the agent to hand\n  interactive ones to you. It never solves them.\n- **Your tabs stay yours.** Agents use only tabs they opened or you lent them. The toolbar button always takes a tab\n  back; only a real click on the card or the toolbar button finishes a handoff, so a page can't fake it.\n- **Less on disk.** Session journals are private (0700\u002F0600), redact typed passwords, codes and tokens, and are pruned\n  after 14 days (200 at most). HARs replace credentials with references; typed passwords and one-time codes are never\n  stored. Secret profiles keep values out of transcripts and artifacts, but anything that runs with them (like\n  `secrets_run`) can use them. `secrets_run` commands get the relay's allowlisted environment plus the profile's\n  `BC_SECRET_N` values, not the environment you started opencode with: `PATH`, `HOME`, locale, `HTTP_PROXY`,\n  `HTTPS_PROXY`, `NO_PROXY`, `ALL_PROXY`, `SSL_CERT_FILE`, `SSL_CERT_DIR` and `NODE_EXTRA_CA_CERTS` pass through; other\n  variables (API keys included) don't.\n\nEscape hatches. Set them in the environment you start opencode (or your MCP client) from; the relay inherits\n`OPENCODE_BROWSER_*` variables. Run `node cli\u002Fdist\u002Fcli.mjs relay restart` after changing them:\n\n| Variable | Effect |\n| --- | --- |\n| `OPENCODE_BROWSER_ALLOW_NODE=1` | Run `execute` code with full Node access (`process`, `fs`, `import()`, any file path) |\n| `OPENCODE_BROWSER_ALLOW_ALL_COOKIES=1` | Let sessions read and write every cookie in the profile |\n| `OPENCODE_BROWSER_ALLOW_FOREGROUND=1` | Allow `page.bringToFront()` |\n| `OPENCODE_BROWSER_AGENT_WINDOW=separate` | Open agent tabs in a separate window (`current`: in the user's window), overriding the options page's *Where agents open their tabs* |\n| `OPENCODE_BROWSER_EXECUTE_SLICE_MS=2000` | Longest `execute` JavaScript may run without yielding before it is stopped (50 to 60000; every session waits meanwhile) |\n| `OPENCODE_BROWSER_GHOST_CURSOR=1` | Show the agent cursor on every agent tab outside recordings (pages can see it); `0` keeps it off. Overrides the options page's *Agent cursor* |\n| `OPENCODE_BROWSER_AUTO_UPDATE=notify` | Installs: only show new versions (`off`: don't check; `on`: install them when idle, the default). Overrides the status page's *Updates* |\n| `OPENCODE_BROWSER_HUMAN_INPUT=0` | Send input at full speed instead of human-like paths and pacing; `1` keeps them on. Overrides the options page's *Human-like input* |\n| `OPENCODE_BROWSER_CHALLENGE_WAIT_MS=15000` | How long `execute` waits for a bot check the browser clears by itself (0 to 60000; 0 reports it without waiting) |\n\n## Troubleshooting\n\n- `node cli\u002Fdist\u002Fcli.mjs status` shows the relay, the extension and every tab agents can use.\n- `node cli\u002Fdist\u002Fcli.mjs doctor` checks the install.\n- Logs: `~\u002F.local\u002Fstate\u002Fbrowse\u002Flogs\u002Frelay.log`.\n- Extension says another browser is connected: the relay is running an older browse that drives one browser profile at\n  a time. Update browse on the computer running the relay (or close the other browser), then click **Reconnect** on the\n  status page.\n- Extension says it's not paired (or that the relay was refused): run `bun run setup` again, then reload the extension\n  on your browser's extensions page.\n- **Load unpacked** fails, or the extension shows errors: load the `browse\u002Fdist` folder (built by `setup`), not\n  `browse` itself or `browse\u002Fpublic`. `node cli\u002Fdist\u002Fcli.mjs extension` shows the right folder.\n\n## Development\n\n```sh\nbun install && bun run dev       # rebuilds dist\u002F on change; reload the extension to pick it up\nbun run typecheck\nbun run test                     # the extension and cli\u002F test suites (bun test), no browser needed\ncd cli && bun src\u002Fmain.ts status # the CLI from source\nbun run release:check            # the store zip and npm tarball a release would publish, with its checks\n```\n\n`cli\u002F` is the npm package `@opencode\u002Fbrowse` with its own lockfile. The extension and the package share one version;\n[RELEASING.md](RELEASING.md) has the release flow (dev builds from every push to `dev`; stable releases only from the\nRelease workflow in GitHub Actions).\n\n## Contributing\n\nWe don't take pull requests. [Open an issue](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fbrowse\u002Fissues)\ndescribing the bug or idea, and our agents usually turn it around fast.\n\n## License\n\n[MIT](LICENSE)\n","anomalyco\u002Fbrowse 是一个让 AI 代理通过真实浏览器执行网页操作的工具，包含 MCP 协议服务端与 Chromium 扩展。核心功能包括：基于 Playwright 驱动后台标签页、截屏、捕获网络请求、屏幕录制，并支持在需人工介入时（如登录、2FA、支付）将标签页交还用户确认后继续执行。兼容 Chrome、Edge、Brave 等主流 Chromium 内核浏览器。适用于需要真实用户上下文（如已登录会话、插件环境、Cookie 状态）的自动化任务，例如 RAG 数据采集、多步骤 Web 操作代理、人机协同工作流等场景。",2,"2026-11-24 04:37:14","CREATED_QUERY"]