MCP Server
Browserbase MCP Configuration
Configure your Browserbase MCP server with these command-line options
Available Flags
The Browserbase MCP server accepts the following command-line flags:
Flag | Type | Default | Description |
---|---|---|---|
--browserbaseApiKey <key> | string | Your Browserbase API key for authentication | |
--browserbaseProjectId <id> | string | Your Browserbase project ID | |
--proxies | boolean | false | Enable Browserbase proxies for the session |
--contextId <contextId> | string | Specify a Browserbase Context ID to use | |
--persist | boolean | true | Whether to persist the Browserbase context |
--port <port> | number | 3000 | Port 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 array | JSON array of cookies to inject into the browser (must be structured like the Playwright Cookies) | |
--browserWidth <width> | number | 1024 | Browser viewport width |
--browserHeight <height> | number | 768 | Browser 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
, use0.0.0.0
to make the server accessible from other machines - Setting
--persist
tofalse
means the context will be read only. More info here.
Troubleshooting
If you encounter issues with your configuration:
- Verify your API key and project ID are correct
- Ensure the port you’re trying to use isn’t already in use
- Check that your JSON syntax is valid when using the
--cookies
flag - Reload your MCP client after making configuration changes
For more information, visit the Browserbase documentation.