Configure your browser automation with command-line flags, environment variables, and advanced options
npx @browserbasehq/mcp
with flags or local development setup).Flag | Description |
---|---|
--proxies | Enable Browserbase proxies for the session |
--advancedStealth | Enable Browserbase Advanced Stealth (Scale Plan only) |
--contextId <contextId> | Specify a Browserbase Context ID to use |
--persist [boolean] | Whether to persist the Browserbase context (default: true) |
--port <port> | Port to listen on for HTTP/SHTTP transport |
--host <host> | Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces) |
--cookies [json] | JSON array of cookies to inject into the browser |
--browserWidth <width> | Browser viewport width (default: 1024) |
--browserHeight <height> | Browser viewport height (default: 768) |
--modelName <model> | The model to use for Stagehand (default: gemini-2.0-flash) |
--modelApiKey <key> | API key for the custom model provider (required when using custom models) |
--modelApiKey
flag.google/gemini-2.0-flash
(default)google/gemini-1.5-pro
google/gemini-1.5-flash
openai/gpt-4o
openai/gpt-4o-mini
openai/o1-mini
openai/o1-preview
openai/o3-mini
anthropic/claude-3-5-sonnet-latest
anthropic/claude-3-7-sonnet-latest
Performance - How can I optimize browser automation performance?
Security - What security measures should I implement?
Development - What are the recommended development practices?
Production - How should I configure for production environments?