Available Flags

The Browserbase MCP server accepts the following command-line flags:

FlagTypeDefaultDescription
--browserbaseApiKey <key>stringYour Browserbase API key for authentication
--browserbaseProjectId <id>stringYour Browserbase project ID
--proxiesbooleanfalseEnable Browserbase proxies for the session
--contextId <contextId>stringSpecify a Browserbase Context ID to use
--persistbooleantrueWhether to persist the Browserbase context
--port <port>number3000Port to listen on for HTTP/SSE transport
--host <host>string’localhost’Host to bind server to (use 0.0.0.0 for all interfaces)
--cookies <json>JSON arrayJSON array of cookies to inject into the browser (must be structured like the Playwright Cookies)
--browserWidth <width>number1024Browser viewport width
--browserHeight <height>number768Browser viewport height

Usage Notes

  • Currently, these flags can only be used with the local server: npx @browserbasehq/mcp or if you clone the repo and build it yourself.
  • When specifying --host, use 0.0.0.0 to make the server accessible from other machines
  • Setting --persist to false means the context will be read only. More info here.

Troubleshooting

If you encounter issues with your configuration:

  1. Verify your API key and project ID are correct
  2. Ensure the port you’re trying to use isn’t already in use
  3. Check that your JSON syntax is valid when using the --cookies flag
  4. Reload your MCP client after making configuration changes

For more information, visit the Browserbase documentation.