Mcp Server Browserbase

io.github.browserbase由 GitHub 账号 browserbase 发布v2.1.1更新于 Oct 24, 2026

MCP server for AI web browser automation using Browserbase and Stagehand

概览

AI 生成的概览

一个可自托管的 MCP 服务器,让助手通过 Browserbase 和 Stagehand 操控云端浏览器,进行导航、操作、观察和提取数据。

可以做什么
启动或结束 Browserbase 浏览器会话,并在可用时复用已有会话。将会话导航到指定网址。按自然语言指令在页面上执行操作。观察页面上可操作的要素,以便规划下一步。从页面提取数据,可选地由指令引导。
适用场景
适合希望助手在托管的云端浏览器中浏览并操作真实网页的场景,例如收集信息或执行可重复的网页操作。该仓库已归档,新项目建议改用厂商的托管服务器。
运行要求
以 stdio 方式在本地运行,通常通过 npx 使用 npm 包、克隆仓库后运行,或使用 Docker;npm 方式需要 Node.js。需要 Browserbase API 密钥和项目 ID,以及默认 Stagehand 模型所需的 Gemini API 密钥;使用自定义模型还需该提供商的密钥。需要访问 Browserbase 和模型提供商的网络。
安装前请注意
需要机密 BROWSERBASE_API_KEY 和 GEMINI_API_KEY,若配置自定义模型还需其密钥,请勿放入共享配置。助手可对真实网页执行操作,可能提交表单、点击按钮或改变远端状态。页面内容和指令会发送给 Browserbase 和模型提供商。该项目已归档且不再维护。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Server Browserbase,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Browserbase MCP Server

Archived

This repository is archived and no longer maintained.

It was originally published as a reference implementation and is retained for historical purposes. It should not be interpreted as representative of Browserbase's current production services or implementation.

[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, extract information, and perform automated actions.

This is a self-hostable version of the Browserbase hosted MCP server with the same tools and functionality. We recommend using the hosted version for the easiest setup.

Tools

This server exposes 6 tools that match the hosted Browserbase MCP server:

ToolDescriptionInput
startCreate or reuse a Browserbase session(none)
endClose the current Browserbase session(none)
navigateNavigate to a URL{ url: string }
actPerform an action on the page{ action: string }
observeObserve actionable elements on the page{ instruction: string }
extractExtract data from the page{ instruction?: string }

How to Setup

We currently support 2 transports for our MCP server, STDIO and SHTTP. We recommend you use SHTTP with our hosted MCP server to take advantage of the server at full capacity.

SHTTP (Hosted MCP):

Use the Browserbase hosted MCP server at https://mcp.browserbase.com/mcp. This is the easiest way to get started -- we host the server and provide the LLM costs for Gemini, the best performing model in Stagehand.

For full setup instructions, see the Browserbase MCP documentation.

If your client supports SHTTP:

json
{  "mcpServers": {    "browserbase": {      "type": "http",      "url": "https://mcp.browserbase.com/mcp"    }  }}

If your client doesn't support SHTTP:

json
{  "mcpServers": {    "browserbase": {      "command": "npx",      "args": ["mcp-remote", "https://mcp.browserbase.com/mcp"]    }  }}

STDIO (Self-Hosted):

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

Note: 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 via NPM (Recommended)

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

json
{  "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 you're ready to go.

To run 100% local:

Option 1: Direct installation
bash
git clone https://github.com/browserbase/mcp-server-browserbase.gitcd mcp-server-browserbasenpm install && npm run build
Option 2: Docker
bash
git clone https://github.com/browserbase/mcp-server-browserbase.gitcd mcp-server-browserbasedocker build -t mcp-browserbase .

Then in your MCP Config JSON run the server:

Using Direct Installation
json
{  "mcpServers": {    "browserbase": {      "command": "node",      "args": ["/path/to/mcp-server-browserbase/cli.js"],      "env": {        "BROWSERBASE_API_KEY": "",        "BROWSERBASE_PROJECT_ID": "",        "GEMINI_API_KEY": ""      }    }  }}
Using Docker
json
{  "mcpServers": {    "browserbase": {      "command": "docker",      "args": [        "run",        "--rm",        "-i",        "-e",        "BROWSERBASE_API_KEY",        "-e",        "BROWSERBASE_PROJECT_ID",        "-e",        "GEMINI_API_KEY",        "mcp-browserbase"      ],      "env": {        "BROWSERBASE_API_KEY": "",        "BROWSERBASE_PROJECT_ID": "",        "GEMINI_API_KEY": ""      }    }  }}

Configuration

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

FlagDescription
--proxiesEnable Browserbase proxies for the session
--verifiedEnable Browserbase Verified Identity (Only for Scale Plan Users)
--advancedStealthDeprecated alias for --verified
--keepAliveEnable Browserbase Keep Alive Session
--contextId <contextId>Specify a Browserbase Context ID to use
--persistWhether 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)
--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.5-flash-lite)
--modelApiKey <key>API key for the custom model provider (required when using custom models)
--experimentalEnable experimental features (default: false)

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

Note: These flags can only be used with the self-hosted server (npx @browserbasehq/mcp or Docker).

Model Configuration

Stagehand defaults to using Google's Gemini 2.5 Flash Lite 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.

json
{  "mcpServers": {    "browserbase": {      "command": "npx",      "args": [        "@browserbasehq/mcp",        "--modelName",        "anthropic/claude-sonnet-4.5",        "--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.

Links

License

Licensed under the Apache 2.0 License.

Copyright 2025 Browserbase, Inc.

来源:README.md,提交 3e6f534

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v2.1.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分