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:
--verbose
Watch capture happen as it arrives, which is the fastest way to confirm a fresh install is really working:
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:~/.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.