Skip to main content
Stagehand is an open-source SDK for browser agents, backed by Browserbase—the complete platform to run agents that use the web like humans. The integration ships a ready-made MCP server that exposes three tools—run, snapshot, and screenshot—directly to your Deep Agent, with no custom tool definitions required.
Stagehand ships this integration from its own repository. Clone the repo and run the examples from packages/integrations/deepagents.

Tools

Setup

Prerequisites

  • Python 3.11–3.13
  • uv
  • A model-provider API key (e.g. OPENAI_API_KEY)
  • Local Chrome, or a Browserbase API key for a managed remote browser

Clone and install

Environment variables

Use with a Deep Agent

The integration’s MCP server (stagehand-deepagents-mcp) is launched over stdio by MultiServerMCPClient. Use load_mcp_tools to get the tools and pass them directly to create_deep_agent — no manual tool definitions needed:
Keep one persistent ClientSession for the duration of your agent run. Stateless tool loading (e.g. MultiServerMCPClient.get_tools()) starts a new stdio process per call and loses the browser and snapshot IDs.

Server configuration

The MCP server and the agent run in separate Python environments. Stagehand requires websockets>=16.1.1 while the current LangGraph SDK requires websockets<16 — the stdio transport isolates these dependency sets.

Integration source + examples

MCP server, managed tools, and runnable agent examples.

Browserbase provider page

Full Browserbase provider overview and setup.