Browser MCP
by ricsam
README.md
# Browser MCP
Connect a dedicated Chrome profile to trusted MCP clients through a native Node CLI, Bun control plane, PostgreSQL, and React dashboard.
- **Community:** self-hosted, first-account administrator bootstrap and configurable OIDC.
- **Managed:** separate build-time artifact with GitHub sign-in and explicit device approval.
Start with the [quickstart](docs/quickstart.mdx), or [install your own server](docs/helm.mdx). See [releases](docs/releases.mdx) for the current version and platform support.
## Browser host
Requires Node **>=22.14.0** and installed stable Chrome on Linux or macOS. It creates its own profile, never imports your daily-driver cookies, and does not download Chrome during npm installation or agent-only commands. Version 0.3.30 unifies the CLI, server images and community-only Helm chart; native protocol 3 and the database schema are unchanged.
```sh
npm install -g @ricsam/browser-mcp@0.3.30
browser-mcp browser start --server https://browser-mcp.click --profile work
```
Use your own server URL for community. Open the CLI's device approval URL, sign in, verify the request, and explicitly approve. Managed uses GitHub; community uses its configured authentication. Create a separate expiring MCP credential in the dashboard and configure the displayed `/b/<browser-id>/mcp` URL with an Authorization bearer header. Never put broad MCP/runtime credentials in URLs, chat, or shell arguments.
To run multiple browsers, use different `--profile` names in separate terminals. CLI 0.3.7 and newer can also launch them together: `browser-mcp browser start --profile work --profile personal`. Each has separate sign-ins, pairing and MCP credentials; approve each profile separately. Local stop affects only the selected profile; Ctrl-C closes all browsers launched by that command. See [multiple browsers](docs/native-cli.mdx#multiple-local-browsers).
Local controls are `browser-mcp browser pause`, `resume`, `status`, and `stop` with the same `--profile`. Remote clients cannot undo a local pause. Ctrl-C during startup cancels remaining startup work and waits for resources already acquired; repeated termination signals wait for the same cleanup, and one cleanup error does not skip other independent safe cleanup stages.
Starting a named profile again reopens the web pages that were open when it stopped, after Ctrl-C, `stop`, closing the last window or a crash, once the runtime's page protections are in place. `--no-restore-tabs` starts with a blank window. See [tabs after a restart](docs/native-cli.mdx#tabs-after-a-restart).
Within one browser, agents can create isolated **browser sessions** (`browser_create_session`) to be signed in to the same site as several accounts at once: each is a Chrome of its own with its own profile, started in the background when a tab is opened in it and kept on disk, still signed in, until an agent ends it. See [isolated browser sessions](docs/native-cli.mdx#isolated-browser-sessions).
Unexpected Chrome exits report the child exit code/signal and retain private, bounded diagnostics under `~/.browser-mcp/diagnostics`. Raw stderr, page content and CDP endpoints are not logged. Requested shutdown, normal exit and transport disconnect are distinguished. Recovery lock/socket artifacts are never removed automatically and the CLI never reattaches to an old Chrome process. After stopping the prior CLI and Chrome, `browser-mcp browser recover --profile work` can remove only verified stale lock/socket artifacts while preserving profile data. It refuses live, reused or uncertain owners, unsafe artifacts, and orphan paths without trustworthy provenance. See [native CLI setup](docs/native-cli.mdx) for the full recovery procedure, lifecycle, updates and platform limitations.
## Trust boundary
MCP credentials grant broad browser access, including signed-in pages, arbitrary page JavaScript, input and screenshots—not read-only or per-site access. Use task-specific profiles and trusted clients. Password masking is not universal secret detection. Screenshots, live pixels and ordinary JavaScript may reveal secrets. TLS does not hide relay traffic from the server operator.
Files use short-lived purpose-scoped HTTPS capabilities and private staging, not model-visible base64. The [direct-download workflow](docs/direct-download-links.md) returns ordinary HTTPS GET bearer URLs for downloads, exports, script artifacts and screenshot files (`browser_screenshot` can also capture one element by ref, like Playwright's `locator.screenshot()`), ready for `curl` without headers/cookies or a chat adapter. A result with several export or artifact files also has one tar bundle link and a ready-to-run shell command that saves all of them in one step. Those narrow URLs intentionally appear in model context/history and may appear in shell logs; do not publish them. Upload and secret-export capabilities (an HTTPS URL plus an Authorization header) are likewise in ordinary tool text, so clients that pass only text content to the model can use them; keep their bearer in private header/capability files, not command arguments. Secret capture returns metadata only; explicit exports carry sensitive capabilities and must never be sourced as shell code. See [data/secrets](docs/native-data.md), [forwarding](docs/forwarding.mdx), and [security](docs/security.mdx).
Version 0.3.30 is a security update of the server runtime: the server images run on Bun 1.4.5 (updated TLS, DNS and HTTP libraries); a private root CA you trust for OIDC or PostgreSQL must now carry the CA extensions ([releases](docs/releases.mdx)). Tools and behaviour are those of 0.3.26. It retains 0.3.29's managed sign-in limits keyed on the client address Cloudflare reports, 0.3.28's Better Auth 1.7.27 security update, 0.3.27's server runtime Bun 1.4.4 (CVE-2026-111497 in Bun's brotli decoder, and the compromised eMudhra intermediate certificate authorities), and 0.3.26's actions that wait for the answer to an HTTP sign-in or a JavaScript dialog instead of giving up after 20 seconds, clicks on links to slow pages that are made rather than refused, reads refused at once with `navigation_loading` while a tab loads another page, `page_busy` for a click a busy page had not finished handling, and clicks, boxes and element screenshots that land on elements of iframes with borders or padding and of frames restored from the back/forward cache, 0.3.25's HTTP Basic and Digest sign-ins as dialogs, answered from the local vault or a sign-in card in [live view](docs/live-view.mdx), and phone takeover with drag, pointer mode, zoom and Fit, 0.3.24's `target` locators, structured matches and DOM-backed refs, compact outlines and smaller tool list, new waits, read-only scripts, WebMCP calls by name, element and file screenshots and isolated [browser sessions](docs/mcp-tools.mdx#browser-sessions), 0.3.23's live view without the "You're in control" card, 0.3.22's passkey prompt detection, 0.3.21's takeover in live view, with `user_in_control` refusals and tab results without internal session identifiers, 0.3.20's screenshots returned as soon as Chrome captures them with `pageState` observation timing, 0.3.19's upload and secret-export capabilities in ordinary tool text with up-front transfer grant limits, 0.3.18's private download routing, as well as background screenshots, capture-only download retry, coherent local resume, bounded FIFO queuing and broader [document access](docs/document-access.md). **Keep administrative sign-ins outside automated profiles unless deliberately delegated:** internal pages, local files and the Browser MCP dashboard are no longer blanket-blocked; Chrome's own interface limits still apply. Use matching server/CLI versions; older runtimes report update-required errors for missing capabilities. Stop the old CLI, then restart the same named profile to preserve sign-ins. The npm distribution remains one cross-platform Node package.
## Server development
Requires Bun 1.4.5 and Docker Compose v2:
```sh
bun install --frozen-lockfile
(cd frontend && bun install --frozen-lockfile)
cp .env.example .env
```
In the untracked `.env`, configure independent random `POSTGRES_PASSWORD`, `AUTH_SECRET`, and `SETTINGS_ENCRYPTION_KEY` values, and matching `DATABASE_URL`. Use `PUBLIC_URL=http://127.0.0.1:5173` for Vite or `http://localhost:3000` for the built server. Production requires HTTPS. Never commit credentials.
```sh
docker compose up -d --wait postgres
bun backend/migrate.ts
bun --watch backend/server.ts
# Separate terminal:
cd frontend && bun run dev --host 127.0.0.1
```
Build deliberately selected editions with `EDITION=community bun scripts/build.ts` or `EDITION=managed bun scripts/build.ts`. Outputs are `dist/server.js`, `dist/migrate.js`, and `dist/web`. Run schema bootstrap before serving. Managed additionally requires GitHub OAuth runtime secrets. Runtime environment variables cannot switch a built edition.
**Exactly one server replica is supported.** Connections, grants and streams are process-local. Restarts interrupt work; uncertain browser actions are not replayed. There is no transparent stream resumption, horizontal scaling or zero-downtime upgrade claim.
## Manual testing
Product testing is **manual only**, end to end through an operator-driven OpenCode
(or equivalently configured pi) session. No automated unit, integration, browser,
or agent test suites run locally or in CI. Compiler/typechecks, builds and static
publication safeguards are not product acceptance tests.
See [manual testing](docs/manual-testing.md) for the dedicated testing provider,
secret-backed OpenCode launcher, browser setup, scenarios and evidence checklist.
```sh
node scripts/manual-agent.mjs
```
In an Octomerge project, `--r5d` loads the launcher's private configuration from the project's secrets.
CI only checks compilation/builds. A green build does not mean the product has
been manually verified.
- [Quickstart](docs/quickstart.mdx) · [Native CLI](docs/native-cli.mdx)
- [Self-host](docs/self-host.mdx) · [Helm](charts/browser-mcp/README.md) · [Managed](docs/managed.mdx)
- [Authentication](docs/authentication.mdx) · [Tools](docs/mcp-tools.mdx)
- [Privacy](docs/privacy.mdx) · [Operations](docs/operations.mdx) · [Releases](docs/releases.mdx)
Canonical managed host: https://browser-mcp.click. Documentation: https://browser-mcp.mintlify.site. No SLA is promised.
## License
[MIT](LICENSE). Report security issues privately as described in [SECURITY.md](SECURITY.md).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues