mcp-server-browserbase is a free, open source browsers & extensions project written in TypeScript and released under Apache-2.0. It has 3,411 GitHub stars, 368 forks and 52 open issues, and was last pushed 2 months ago. On this registry it ranks #77 of 133 tracked projects in Browsers & Extensions, with 5 head-to-head comparisons available.

What is mcp-server-browserbase?

mcp-server-browserbase is an archived Apache-2.0 TypeScript reference implementation of a Model Context Protocol server that lets LLM applications drive a cloud browser through Browserbase and Stagehand.

What it is

The Model Context Protocol is an open protocol that connects LLM applications with external data sources and tools. This project implements that protocol as a server, exposing Browserbase and Stagehand browser automation to any MCP-capable client, whether that client is an AI-powered IDE, a chat interface, or a custom AI workflow. It lives in the Productivity & Utilities / Browsers & Extensions category of the registry and is written in TypeScript.

The concrete thing it replaces is the hosted Browserbase MCP server. This repository is the self-hostable equivalent, exposing the same six tools with the same functionality as https://mcp.browserbase.com/mcp. Where the hosted option runs the server on Browserbase infrastructure, this one can be run on the operator's own machine or container, via the npm package or a local clone. The README is explicit that it was originally published as a reference implementation, is now archived and no longer maintained, and should not be read as representative of Browserbase's current production services.

Key capabilities

  • Exposes six tools that match the hosted Browserbase MCP server: start, end, navigate, act, observe, and extract.
  • Takes structured input per tool: navigate accepts { url: string }, act accepts { action: string }, observe accepts { instruction: string }, and extract accepts an optional { instruction?: string }.
  • Supports two transports, STDIO and SHTTP; the README recommends SHTTP with the hosted server, and describes STDIO for self-hosted use.
  • Runs as the npm package @browserbasehq/mcp through npx, which is the recommended self-hosted path.
  • Builds as a Docker image named mcp-browserbase with docker build -t mcp-browserbase ., or runs directly from a clone through cli.js.
  • Reads BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, and GEMINI_API_KEY from the environment, and accepts --modelName to substitute a different model with its own key.
  • Leans on Stagehand and Browserbase for the underlying cloud browser automation rather than bundling a local browser engine.

Who uses it and how

  • Teams wiring browser automation into an MCP-capable chat interface, AI-powered IDE, or custom AI workflow, which the README names as the intended audience for the protocol.
  • Operators who want the hosted Browserbase MCP server's tool set but need the server to run on infrastructure they control.
  • Developers who want a fully local setup, either by building the mcp-browserbase Docker image or by running cli.js from a clone with a node command.
  • Anyone wanting a fast trial, who can add the npx @browserbasehq/mcp entry to an MCP config JSON and reload the client without cloning anything.
  • Users of clients that do not support SHTTP, who reach the hosted endpoint through npx mcp-remote https://mcp.browserbase.com/mcp.

Getting started

For a self-hosted STDIO setup, add npx @browserbasehq/mcp to the MCP config JSON with BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID, and GEMINI_API_KEY in the env block. Alternatively, point an SHTTP-capable client at https://mcp.browserbase.com/mcp, which the README calls the easiest route.

How it compares

Among the tools named in the facts, Playwright and Puppeteer are browser automation libraries that a developer drives directly, whereas this project wraps browser control behind MCP tools that an LLM invokes by instruction. Stagehand sits underneath as the automation layer, and the Browserbase hosted MCP server is the direct counterpart, differing only in who operates the server and who pays for the Gemini model calls. Its licence is Apache-2.0 and the code is fully self-hostable, so data and credentials stay with the operator instead of flowing through a hosted endpoint.

When to use it — and when not to

A self-hoster must supply a Browserbase API key and project ID plus a Gemini key, or another model's key passed with --modelName, and must run the server process themselves over STDIO or SHTTP. It should not be chosen as a production dependency: the repository is archived and no longer maintained, and the README states it is preserved for historical purposes only. The 52 open issues are unlikely to be resolved, so anyone needing current Browserbase behavior should use the hosted server or the maintained Stagehand project instead.

project readme (upstream, from github) — read inline

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:

Tool Description Input
start Create or reuse a Browserbase session (none)
end Close the current Browserbase session (none)
navigate Navigate to a URL { url: string }
act Perform an action on the page { action: string }
observe Observe actionable elements on the page { instruction: string }
extract Extract 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:

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

If your client doesn't support SHTTP:

{
  "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:

{
  "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
git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase
npm install && npm run build
Option 2: Docker
git clone https://github.com/browserbase/mcp-server-browserbase.git
cd mcp-server-browserbase
docker build -t mcp-browserbase .

Then in your MCP Config JSON run the server:

Using Direct Installation
{
  "mcpServers": {
    "browserbase": {
      "command": "node",
      "args": ["/path/to/mcp-server-browserbase/cli.js"],
      "env": {
        "BROWSERBASE_API_KEY": "",
        "BROWSERBASE_PROJECT_ID": "",
        "GEMINI_API_KEY": ""
      }
    }
  }
}
Using Docker
{
  "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:

Flag Description
--proxies Enable Browserbase proxies for the session
--verified Enable Browserbase Verified Identity (Only for Scale Plan Users)
--advancedStealth Deprecated alias for --verified
--keepAlive Enable Browserbase Keep Alive Session
--contextId Specify a Browserbase Context ID to use
--persist Whether to persist the Browserbase context (default: true)
--port Port to listen on for HTTP/SHTTP transport
--host Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces)
--browserWidth Browser viewport width (default: 1024)
--browserHeight Browser viewport height (default: 768)
--modelName The model to use for Stagehand (default: google/gemini-2.5-flash-lite)
--modelApiKey API key for the custom model provider (required when using custom models)
--experimental Enable 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.

{
  "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.

Frequently asked questions

Is mcp-server-browserbase free to use?

mcp-server-browserbase is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does mcp-server-browserbase do?

Allow LLMs to control a browser with Browserbase and Stagehand

What is mcp-server-browserbase written in?

mcp-server-browserbase is primarily written in TypeScript. Its source is publicly available at https://github.com/browserbase/mcp-server-browserbase, and it has 3,411 GitHub stars.