MCP server for AI browser automation. Alpha software - expect bugs and rough edges.
This is a fork of @browserbasehq/mcp-server-browserbase by Browserbase, Inc., licensed under Apache 2.0.
-
Default to LOCAL - Uses local Playwright by default instead of requiring Browserbase cloud. Pass
cloud: trueto session create for cloud execution. -
Hybrid mode agent - Agent tool uses hybrid mode (DOM + coordinate-based actions) with
google/gemini-3-flash-previewinstead of CUA mode. -
Vercel header injection - Automatically injects
x-vercel-protection-bypassheader whenVERCEL_AUTOMATION_BYPASS_SECRETenv var is set. -
Renamed tools - All tools renamed from
browserbase_*tostagehand_*.
| Tool | Description |
|---|---|
stagehand_session_create |
Create browser session. cloud?: boolean to use Browserbase (default: local) |
stagehand_session_close |
Close the current session |
stagehand_navigate |
Navigate to a URL |
stagehand_act |
Perform an action on the page (natural language) |
stagehand_extract |
Extract structured data from the page |
stagehand_observe |
Observe and find actionable elements |
stagehand_screenshot |
Capture a screenshot |
stagehand_get_url |
Get current page URL |
stagehand_agent |
Autonomous multi-step execution (hybrid mode) |
GEMINI_API_KEY=... # for Stagehand AI features (act, extract, observe, agent)
BROWSERBASE_API_KEY=... # only needed for cloud: true
BROWSERBASE_PROJECT_ID=... # only needed for cloud: true
NGROK_AUTHTOKEN=... # only needed for cloud: true with localhost URLs
VERCEL_AUTOMATION_BYPASS_SECRET=... # optional, for Vercel preview deployments
When using cloud mode (cloud: true), the browser runs on Browserbase's infrastructure and can't directly access your localhost. If you navigate to a localhost URL, the server automatically creates an ngrok tunnel to expose your local service to the cloud browser.
- Requires
NGROK_AUTHTOKENenvironment variable - Tunnels are session-scoped and cleaned up automatically
- Each tunnel gets randomly generated basic auth credentials for security
- Only triggered when navigating to localhost URLs in cloud mode
Basic (Stagehand tools only):
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["@popoverai/browser-automation"]
}
}
}With Playwright federation (adds low-level browser control tools):
{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["@popoverai/browser-automation", "--enable-playwright"]
}
}
}The --enable-playwright flag spawns a Playwright MCP subprocess and federates its tools (click, fill, type, etc.) alongside the Stagehand AI tools.
Apache-2.0 (same as original)