Skip to content

CLI reference

The installed executable is browsermesh.

text
Usage:
  browsermesh [options]              Serve the MCP protocol over stdio
  browsermesh --install-browser      Download the Chromium build BrowserMesh uses
  browsermesh --doctor [--json]      Check this installation and exit
  browsermesh --help                 Show the full option list
  browsermesh --version              Print the installed version
CommandBehaviorExit status
browsermeshstart MCP stdio serveruntil transport closes or shutdown
browsermesh --install-browserinstall Playwright Chromiumnon-zero on failure
browsermesh --doctorrun bounded diagnostics as readable text1 when status is failed
browsermesh --doctor --jsonthe same diagnostics as one JSON result1 when status is failed
browsermesh --helpprint the full option list to stdout0
browsermesh --versionprint the installed version to stdout0
an unknown or misused optionprint the reason and a usage summary to stderr2

Options

Every option sets the environment variable that already configures it, and the command line wins over the environment. A rejected value names the variable it came from and exits with status 2.

OptionVariableEffect
--timeout <ms>BROWSERMESH_TIMEOUT_MSDefault bounded operation timeout
--data-dir <path>BROWSERMESH_DATA_DIRDirectory for saved browser state
--log-level <level>BROWSERMESH_LOG_LEVELdebug, info, warn, error, or silent
--max-sessions <n>BROWSERMESH_MAX_SESSIONSMaximum concurrent sessions
--max-pages <n>BROWSERMESH_MAX_PAGESMaximum managed pages per session
--tools <profiles>BROWSERMESH_TOOLSPublish only these profiles: core, observability, persistence
--headlessBROWSERMESH_HEADLESSRun Chromium without a visible window
--headedBROWSERMESH_HEADLESSShow the Chromium window (default)
--no-persistenceBROWSERMESH_PERSISTENCEDisable saved browser state
--no-schema-refsBROWSERMESH_SCHEMA_REFSPublish expanded schemas for clients that cannot resolve $ref
--no-auto-installBROWSERMESH_AUTO_INSTALLDo not download Chromium automatically on first use

Browser startup is lazy: discovering tools does not require Chromium to launch. The first start of a fresh installation downloads Chromium before connecting the transport, unless --no-auto-install says otherwise; a failed download still leaves the protocol usable, with the failure reported by browser_session_create.

Doctor

Doctor validates the Node.js version, BrowserMesh version chain, private data-directory access, Chromium executable availability, and a bounded real browser/context/page smoke test with cleanup.

bash
npx -y browsermesh --doctor --json

Doctor output is structured and safe for diagnostics. It does not return browser state or credentials. Apply the remediation supplied by a failed check; the most common is:

bash
npx -y browsermesh --install-browser

Released under the Apache License 2.0.