Skip to main content
Every flag has a matching BROWSER_TOOLS_* environment variable, so you can configure the server whether your MCP client lets you pass arguments or only environment.

Flags

BROWSER_TOOLS_STATE_DIR and BROWSER_TOOLS_LOG_LEVEL are also honoured. Passing them through an MCP client config looks like this:
A relative --screenshot-dir resolves against the working directory your MCP client launched the server in, which is not always your project. Use an absolute path if you are not sure.

Diagnostics

--doctor

The first thing to run when something is not working:
It reports your Node version, whether the connector started, whether the extension is connected, whether the screenshot directory is writable, and which browser audits will use — with a suggested fix for each problem it finds, then exits.

--verbose

Watch capture happen as it arrives, which is the fastest way to confirm a fresh install is really working:
Output goes to stderr, so it is safe to enable on the MCP server without corrupting the JSON-RPC stream, and values are printed after redaction. Without it the connector reports only connect and disconnect, so a working capture and a silent one look identical.

Sharing one browser session

By default the MCP server runs its own connector, which is all you need. If you want several MCP clients — say Cursor and Claude Code at once — reading the same browser session, start the connector once:
Every client then attaches to it automatically. To attach explicitly, or to reach a connector on a non-default port:
The connector publishes its port and token to ~/.browser-tools-mcp/session.json, written owner-only (0600), so an MCP process started separately can attach without probing anything. Override the location with BROWSER_TOOLS_STATE_DIR.
If port 3025 is taken, the connector picks the next free port in the 3025–3035 range and the extension discovers it. You do not normally need to set --port.

The extension panel

A few settings live in the browser rather than on the command line, because they control what the extension captures before anything is sent. Open DevTools and select the BrowserTools panel:

Capture modes

DevTools protocol is richer, and is the default. It makes Chrome display a “started debugging this browser” banner. Wrap page console replaces the page’s console methods instead. No banner, and it is the mode that works in Firefox — at the cost of missing some browser-generated messages the protocol would report.
Headers are off by default in both directions, and storage values are withheld unless a tool asks for them. See privacy & security.