Requirements
One-command setup
The setup script covers everything on this page for the common case: it downloads the extension, lets you choose bun, pnpm or npm to run the companion, writes the MCP config for the agents you pick, and prints the pairing steps.bash setup.sh --test is a dry run: it prints every command and file it would write without touching anything. The script lives at setup.sh in the repo.
The companion
The companion is the MCP server. It is published on npm asbrowspark-mcp (alias browspark) and runs with a single command, no clone or install step:
bun companion/src/index.ts runs the same code from source.
Started by an MCP client it speaks MCP over stdio. On every start it also opens 127.0.0.1:9223 for the extension’s WebSocket bridge, the HTTP MCP endpoint and the live view. If that port is already taken by another companion, the new process becomes a relay to the existing one instead of failing. See Multiple agents.
Single-file build
Clients that run MCP servers in a sandbox without access to your source tree (Gemini’s local command option, some IDE sandboxes) can use a compiled binary:Flags and environment
The full list is in the CLI and environment reference.
The extension
- Release zip
- Unpacked from source
- Packaged zip
Download
browspark-extension.zip from the latest release, unzip it, then chrome://extensions → Developer mode → Load unpacked → the unzipped folder. This is what the setup script does, into ~/browspark-extension.debugger (drive tabs), tabs (list and open them), storage (settings and the shared list), alarms (idle detach timer) and downloads (report downloads). It has no host permissions and injects nothing into pages on its own.
Pairing
The companion creates a random token in~/.browspark/token (mode 0600) on first start. The extension must present it to connect. Get it from any of these places:
- Ask the agent to run
browser_status; while unpaired the output includes the token and port. - The companion prints it on stderr at startup:
browspark: ready on ws://127.0.0.1:9223 (pairing token …). cat ~/.browspark/token.
chrome.storage.local, so it survives browser restarts. Delete the file to rotate the token; the dashboard then needs the new one.
Updating
The companion updates itself:bunx browspark-mcp@latest resolves the newest version each time the client starts it. For the extension:
chrome://extensions. The dashboard shows a banner when the extension files on disk are newer than the running service worker, and it shows the companion’s version next to the connection status so you can tell when the two are out of step.