Browserbase MCP Server

Browserbase MCP Server

Enables cloud browser automation through Browserbase and Stagehand, allowing LLMs to interact with web pages, take screenshots, extract data, and perform automated actions with support for proxies, stealth mode, and parallel sessions.

Category
访问服务器

README

Browserbase MCP Server

smithery badge

cover

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 Browserbase and Stagehand. It enables LLMs to interact with web pages, take screenshots, extract information, and perform automated actions with atomic precision.

Features

Feature Description
Browser Automation Control and orchestrate cloud browsers via Browserbase
Data Extraction Extract structured data from any webpage
Web Interaction Navigate, click, and fill forms with ease
Screenshots Capture full-page and element screenshots
Model Flexibility Supports multiple models (OpenAI, Claude, Gemini, and more)
Vision Support Use annotated screenshots for complex DOMs
Session Management Create, manage, and close browser sessions
Multi-Session Run multiple browser sessions in parallel

How to Setup

Quickstarts:

Add to Cursor

Copy and Paste this link in your Browser:

cursor://anysphere.cursor-deeplink/mcp/install?name=browserbase&config=eyJjb21tYW5kIjoibnB4IEBicm93c2VyYmFzZWhxL21jcCIsImVudiI6eyJCUk9XU0VSQkFTRV9BUElfS0VZIjoiIiwiQlJPV1NFUkJBU0VfUFJPSkVDVF9JRCI6IiIsIkdFTUlOSV9BUElfS0VZIjoiIn19

We 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.

SHTTP:

To use the Browserbase MCP Server through our remote hosted URL, add the following to your configuration.

Go to smithery.ai and enter your API keys and configuration to get a remote hosted URL. When using our remote hosted server, we provide the LLM costs for Gemini, the best performing model in Stagehand.

Smithery Image

If your client supports SHTTP:

{
  "mcpServers": {
    "browserbase": {
      "url": "your-smithery-url.com"
    }
  }
}

If your client doesn't support SHTTP:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["mcp-remote", "your-smithery-url.com"]
    }
  }
}

STDIO:

You can either use our Server hosted on NPM or run it completely locally by cloning this repo.

❗️ 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.

To run on NPM (Recommended)

Go into your MCP Config JSON and add the Browserbase Server:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

That's it! Reload your MCP client and Claude will be able to use Browserbase.

To run 100% local:

# Clone the Repo
git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase

# Install the dependencies and build the project
pnpm install && pnpm build

Then in your MCP Config JSON run the server. To run locally we can use STDIO or self-host SHTTP.

STDIO:

To your MCP Config JSON file add the following:

{
  "mcpServers": {
    "browserbase": {
      "command": "node",
      "args": ["/path/to/mcp-server-browserbase/cli.js"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Then reload your MCP client and you should be good to go!

Configuration

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

Flag Description
--proxies Enable Browserbase proxies for the session
--advancedStealth Enable Browserbase Advanced Stealth (Only for Scale Plan Users)
--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: google/gemini-2.0-flash)
--modelApiKey <key> API key for the custom model provider (required when using custom models)

These flags can be passed directly to the CLI or configured in your MCP configuration file.

NOTE:

Currently, these flags can only be used with the local server (npx @browserbasehq/mcp).

Configuration Examples

Proxies

Here are our docs on Proxies.

To use proxies, set the --proxies flag in your MCP Config:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp", "--proxies"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Advanced Stealth

Here are our docs on Advanced Stealth.

To use advanced stealth, set the --advancedStealth flag in your MCP Config:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp", "--advancedStealth"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Contexts

Here are our docs on Contexts

To use contexts, set the --contextId flag in your MCP Config:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": ["@browserbasehq/mcp", "--contextId", "<YOUR_CONTEXT_ID>"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Browser Viewport Sizing

The default viewport sizing for a browser session is 1024 x 768. You can adjust the Browser viewport sizing with browserWidth and browserHeight flags.

Here'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)

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": [
        "@browserbasehq/mcp",
        "--browserHeight 1080",
        "--browserWidth 1920"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}

Model Configuration

Stagehand 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.

Important: When using any custom model (non-default), you must provide your own API key for that model provider using the --modelApiKey flag.

Here's how to configure different models:

{
  "mcpServers": {
    "browserbase": {
      "command": "npx",
      "args": [
        "@browserbasehq/mcp",
        "--modelName",
        "anthropic/claude-3-5-sonnet-latest",
        "--modelApiKey",
        "your-anthropic-api-key"
      ],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": ""
      }
    }
  }
}

Note: The model must be supported in Stagehand. Check out the docs here. When using any custom model, you must provide your own API key for that provider.

Resources

The server provides access to screenshot resources:

  1. Screenshots (screenshot://<screenshot-name>)
    • PNG images of captured screenshots

Key Features

  • AI-Powered Automation: Natural language commands for web interactions
  • Multi-Model Support: Works with OpenAI, Claude, Gemini, and more
  • Advanced Session Management: Single and multi-session support for parallel browser automation
  • Screenshot Capture: Full-page and element-specific screenshots
  • Data Extraction: Intelligent content extraction from web pages
  • Proxy Support: Enterprise-grade proxy capabilities
  • Stealth Mode: Advanced anti-detection features
  • Context Persistence: Maintain authentication and state across sessions
  • Parallel Workflows: Run multiple browser sessions simultaneously for complex automation tasks

For more information about the Model Context Protocol, visit:

For the official MCP Docs:

License

Licensed under the Apache 2.0 License.

Copyright 2025 Browserbase, Inc.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选