Command line interface

The CLI is first-class. It is not just an implementation detail behind MCP.

Use it when you want to run the server directly, choose ports, override the broker path, or lock the local transport down with an auth token.

--port

Browser WebSocket port

--fallback-ports

Backup browser ports

--broker-port

Internal broker port

--broker-fallback-ports

Backup broker ports

--auth-token

Shared local auth

Direct run

Start the stdio server from the shell.

The bare command and the explicit serve subcommand both launch the same runtime.

browsefleetmcp
browsefleetmcp serve

Local checkout

Run the current repo build instead of the published package.

This is the cleanest path when you are developing the repo and do not want any client or shell session to pull the npm release.

npm run build
node /absolute/path/to/browsefleetmcp/dist/index.js
browsefleetmcp --port 9200 --fallback-ports 9202,9204

browsefleetmcp \
  --broker-port 9300 \
  --broker-fallback-ports 9302,9304
browsefleetmcp --auth-token your-shared-token

BROWSEFLEETMCP_AUTH_TOKEN=your-shared-token browsefleetmcp

Operational commands

Check health, create sessions, reload the extension, and clean up from the shell.

The CLI is not just a launcher. It also exposes the same operational hooks the MCP surface uses for session creation and recovery.

browsefleetmcp health
browsefleetmcp create-session --url https://example.com --label "Docs Search"
browsefleetmcp destroy-session --session-id <session-id>
browsefleetmcp reload-extension
browsefleetmcp restart-transport

Local debugging

Use the inspector when you want to debug the server path directly.

The repo already includes an inspector script in package.json. That gives you a direct way to inspect the MCP server outside the client UIs.

npm run inspector