The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need. This server provides cloud browser automation capabilities using Browse
Add this skill
npx mdskills install browserbase/mcp-server-browserbaseComprehensive cloud browser automation with excellent documentation and flexible deployment options
1# Browserbase MCP Server23[](https://smithery.ai/server/@browserbasehq/mcp-browserbase)4567[The Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.89This server provides cloud browser automation capabilities using [Browserbase](https://www.browserbase.com/) and [Stagehand](https://github.com/browserbase/stagehand). It enables LLMs to interact with web pages, take screenshots, extract information, and perform automated actions with atomic precision.1011## What's New in Stagehand v31213Powered by [Stagehand v3.0](https://github.com/browserbase/stagehand), this MCP server now includes:1415- **20-40% Faster Performance**: Speed improvements across all core operations (`act`, `extract`, `observe`) through automatic caching16- **Enhanced Extraction**: Targeted extraction and observation across iframes and shadow roots17- **Improved Schemas**: Streamlined extract schemas for more intuitive data extraction18- **Advanced Selector Support**: CSS selector support with improved element targeting19- **Multi-Browser Support**: Compatible with Playwright, Puppeteer, and Patchright20- **New Primitives**: Built-in `page`, `locator`, `frameLocator`, and `deepLocator` for simplified automation21- **Experimental Features**: Enable cutting-edge capabilities with the `--experimental` flag2223For more details, visit the [Stagehand v3 documentation](https://docs.stagehand.dev/).2425## Features2627| Feature | Description |28| ------------------ | ----------------------------------------------------------- |29| Browser Automation | Control and orchestrate cloud browsers via Browserbase |30| Data Extraction | Extract structured data from any webpage |31| Web Interaction | Navigate, click, and fill forms with ease |32| Screenshots | Capture full-page and element screenshots |33| Model Flexibility | Supports multiple models (OpenAI, Claude, Gemini, and more) |34| Vision Support | Use annotated screenshots for complex DOMs |35| Session Management | Create, manage, and close browser sessions |36| High Performance | 20-40% faster operations with automatic caching (v3) |37| Advanced Selectors | Enhanced CSS selector support for precise element targeting |3839## How to Setup4041### Quickstarts:4243#### Add to Cursor4445Copy and Paste this link in your Browser:4647```text48cursor://anysphere.cursor-deeplink/mcp/install?name=browserbase&config=eyJjb21tYW5kIjoibnB4IEBicm93c2VyYmFzZWhxL21jcCIsImVudiI6eyJCUk9XU0VSQkFTRV9BUElfS0VZIjoiIiwiQlJPV1NFUkJBU0VfUFJPSkVDVF9JRCI6IiIsIkdFTUlOSV9BUElfS0VZIjoiIn1949```5051We currently support 2 transports for our MCP server, STDIO and SHTTP. We recommend you use SHTTP with our remote hosted url to take advantage of the server at full capacity.5253## SHTTP:5455To use the Browserbase MCP Server through our remote hosted URL, add the following to your configuration.5657Go to [smithery.ai](https://smithery.ai/server/@browserbasehq/mcp-browserbase) and enter your API keys and configuration to get a remote hosted URL.58When using our remote hosted server, we provide the LLM costs for Gemini, the [best performing model](https://www.stagehand.dev/evals) in [Stagehand](https://www.stagehand.dev).59606162If your client supports SHTTP:6364```json65{66 "mcpServers": {67 "browserbase": {68 "type": "http",69 "url": "your-smithery-url.com"70 }71 }72}73```7475If your client doesn't support SHTTP:7677```json78{79 "mcpServers": {80 "browserbase": {81 "command": "npx",82 "args": ["mcp-remote", "your-smithery-url.com"]83 }84 }85}86```8788## STDIO:8990You can either use our Server hosted on NPM or run it completely locally by cloning this repo.9192> **❗️ Important:** If you want to use a different model you have to add --modelName to the args and provide that respective key as an arg. More info below.9394### To run on NPM (Recommended)9596Go into your MCP Config JSON and add the Browserbase Server:9798```json99{100 "mcpServers": {101 "browserbase": {102 "command": "npx",103 "args": ["@browserbasehq/mcp-server-browserbase"],104 "env": {105 "BROWSERBASE_API_KEY": "",106 "BROWSERBASE_PROJECT_ID": "",107 "GEMINI_API_KEY": ""108 }109 }110 }111}112```113114That's it! Reload your MCP client and Claude will be able to use Browserbase.115116### To run 100% local:117118#### Option 1: Direct installation119120```bash121# Clone the Repo122git clone https://github.com/browserbase/mcp-server-browserbase.git123cd mcp-server-browserbase124125# Install the dependencies and build the project126npm install && npm run build127```128129#### Option 2: Docker130131```bash132# Clone the Repo133git clone https://github.com/browserbase/mcp-server-browserbase.git134cd mcp-server-browserbase135136# Build the Docker image137docker build -t mcp-browserbase .138```139140Then in your MCP Config JSON run the server. To run locally we can use STDIO or self-host SHTTP.141142### STDIO:143144#### Using Direct Installation145146To your MCP Config JSON file add the following:147148```json149{150 "mcpServers": {151 "browserbase": {152 "command": "node",153 "args": ["/path/to/mcp-server-browserbase/cli.js"],154 "env": {155 "BROWSERBASE_API_KEY": "",156 "BROWSERBASE_PROJECT_ID": "",157 "GEMINI_API_KEY": ""158 }159 }160 }161}162```163164#### Using Docker165166To your MCP Config JSON file add the following:167168```json169{170 "mcpServers": {171 "browserbase": {172 "command": "docker",173 "args": [174 "run",175 "--rm",176 "-i",177 "-e",178 "BROWSERBASE_API_KEY",179 "-e",180 "BROWSERBASE_PROJECT_ID",181 "-e",182 "GEMINI_API_KEY",183 "mcp-browserbase"184 ],185 "env": {186 "BROWSERBASE_API_KEY": "",187 "BROWSERBASE_PROJECT_ID": "",188 "GEMINI_API_KEY": ""189 }190 }191 }192}193```194195Then reload your MCP client and you should be good to go!196197## Configuration198199The Browserbase MCP server accepts the following command-line flags:200201| Flag | Description |202| -------------------------- | --------------------------------------------------------------------------- |203| `--proxies` | Enable Browserbase proxies for the session |204| `--advancedStealth` | Enable Browserbase Advanced Stealth (Only for Scale Plan Users) |205| `--keepAlive` | Enable Browserbase Keep Alive Session |206| `--contextId <contextId>` | Specify a Browserbase Context ID to use |207| `--persist` | Whether to persist the Browserbase context (default: true) |208| `--port <port>` | Port to listen on for HTTP/SHTTP transport |209| `--host <host>` | Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces) |210| `--browserWidth <width>` | Browser viewport width (default: 1024) |211| `--browserHeight <height>` | Browser viewport height (default: 768) |212| `--modelName <model>` | The model to use for Stagehand (default: gemini-2.0-flash) |213| `--modelApiKey <key>` | API key for the custom model provider (required when using custom models) |214| `--experimental` | Enable experimental features (default: false) |215216These flags can be passed directly to the CLI or configured in your MCP configuration file.217218### NOTE:219220Currently, these flags can only be used with the local server (npx @browserbasehq/mcp-server-browserbase or Docker).221222### Using Configuration Flags with Docker223224When using Docker, you can pass configuration flags as additional arguments after the image name. Here's an example with the `--proxies` flag:225226```json227{228 "mcpServers": {229 "browserbase": {230 "command": "docker",231 "args": [232 "run",233 "--rm",234 "-i",235 "-e",236 "BROWSERBASE_API_KEY",237 "-e",238 "BROWSERBASE_PROJECT_ID",239 "-e",240 "GEMINI_API_KEY",241 "mcp-browserbase",242 "--proxies"243 ],244 "env": {245 "BROWSERBASE_API_KEY": "",246 "BROWSERBASE_PROJECT_ID": "",247 "GEMINI_API_KEY": ""248 }249 }250 }251}252```253254You can also run the Docker container directly from the command line:255256```bash257docker run --rm -i \258 -e BROWSERBASE_API_KEY=your_api_key \259 -e BROWSERBASE_PROJECT_ID=your_project_id \260 -e GEMINI_API_KEY=your_gemini_key \261 mcp-browserbase --proxies262```263264## Configuration Examples265266### Proxies267268Here are our docs on [Proxies](https://docs.browserbase.com/features/proxies).269270To use proxies, set the --proxies flag in your MCP Config:271272```json273{274 "mcpServers": {275 "browserbase": {276 "command": "npx",277 "args": ["@browserbasehq/mcp-server-browserbase", "--proxies"],278 "env": {279 "BROWSERBASE_API_KEY": "",280 "BROWSERBASE_PROJECT_ID": "",281 "GEMINI_API_KEY": ""282 }283 }284 }285}286```287288### Advanced Stealth289290Here are our docs on [Advanced Stealth](https://docs.browserbase.com/features/stealth-mode#advanced-stealth-mode).291292To use advanced stealth, set the --advancedStealth flag in your MCP Config:293294```json295{296 "mcpServers": {297 "browserbase": {298 "command": "npx",299 "args": ["@browserbasehq/mcp-server-browserbase", "--advancedStealth"],300 "env": {301 "BROWSERBASE_API_KEY": "",302 "BROWSERBASE_PROJECT_ID": "",303 "GEMINI_API_KEY": ""304 }305 }306 }307}308```309310### Contexts311312Here are our docs on [Contexts](https://docs.browserbase.com/features/contexts)313314To use contexts, set the --contextId flag in your MCP Config:315316```json317{318 "mcpServers": {319 "browserbase": {320 "command": "npx",321 "args": [322 "@browserbasehq/mcp-server-browserbase",323 "--contextId",324 "<YOUR_CONTEXT_ID>"325 ],326 "env": {327 "BROWSERBASE_API_KEY": "",328 "BROWSERBASE_PROJECT_ID": "",329 "GEMINI_API_KEY": ""330 }331 }332 }333}334```335336### Browser Viewport Sizing337338The default viewport sizing for a browser session is 1024 x 768. You can adjust the Browser viewport sizing with browserWidth and browserHeight flags.339340Here's how to use it for custom browser sizing. We recommend to stick with 16:9 aspect ratios (ie: 1920 x 1080, 1280 x 720, 1024 x 768)341342```json343{344 "mcpServers": {345 "browserbase": {346 "command": "npx",347 "args": [348 "@browserbasehq/mcp-server-browserbase",349 "--browserHeight 1080",350 "--browserWidth 1920"351 ],352 "env": {353 "BROWSERBASE_API_KEY": "",354 "BROWSERBASE_PROJECT_ID": "",355 "GEMINI_API_KEY": ""356 }357 }358 }359}360```361362### Experimental Features363364Stagehand v3 includes experimental features that can be enabled with the `--experimental` flag. These features provide cutting-edge capabilities that are actively being developed and refined.365366To enable experimental features:367368```json369{370 "mcpServers": {371 "browserbase": {372 "command": "npx",373 "args": ["@browserbasehq/mcp-server-browserbase", "--experimental"],374 "env": {375 "BROWSERBASE_API_KEY": "",376 "BROWSERBASE_PROJECT_ID": "",377 "GEMINI_API_KEY": ""378 }379 }380 }381}382```383384_Note: Experimental features may change or be removed in future releases. Use them at your own discretion._385386### Model Configuration387388Stagehand defaults to using Google's Gemini 2.0 Flash model, but you can configure it to use other models like GPT-4o, Claude, or other providers.389390**Important**: When using any custom model (non-default), you must provide your own API key for that model provider using the `--modelApiKey` flag.391392Here's how to configure different models:393394```json395{396 "mcpServers": {397 "browserbase": {398 "command": "npx",399 "args": [400 "@browserbasehq/mcp-server-browserbase",401 "--modelName",402 "anthropic/claude-sonnet-4.5",403 "--modelApiKey",404 "your-anthropic-api-key"405 ],406 "env": {407 "BROWSERBASE_API_KEY": "",408 "BROWSERBASE_PROJECT_ID": ""409 }410 }411 }412}413```414415_Note: The model must be supported in Stagehand. Check out the docs [here](https://docs.stagehand.dev/examples/custom_llms#supported-llms). When using any custom model, you must provide your own API key for that provider._416417### Resources418419The server provides access to screenshot resources:4204211. **Screenshots** (`screenshot://<screenshot-name>`)422 - PNG images of captured screenshots423424## Key Features425426- **AI-Powered Automation**: Natural language commands for web interactions427- **Multi-Model Support**: Works with OpenAI, Claude, Gemini, and more428- **Screenshot Capture**: Full-page and element-specific screenshots429- **Data Extraction**: Intelligent content extraction from web pages430- **Proxy Support**: Enterprise-grade proxy capabilities431- **Stealth Mode**: Advanced anti-detection features432- **Context Persistence**: Maintain authentication and state across sessions433434For more information about the Model Context Protocol, visit:435436- [MCP Documentation](https://modelcontextprotocol.io/docs)437- [MCP Specification](https://spec.modelcontextprotocol.io/)438439For the official MCP Docs:440441- [Browserbase MCP](https://docs.browserbase.com/integrations/mcp/introduction)442443## License444445Licensed under the Apache 2.0 License.446447Copyright 2025 Browserbase, Inc.448
Full transparency — inspect the skill content before installing.