What is Stagehand MCP Server?
Stagehand MCP Server acts as a bridge between AI applications and real-world web automation tasks. By exposing web browser controls as MCP tools, it allows large language models to navigate websites, perform tasks, and collect data programmatically. It leverages Browserbase for remote headless browsing and directly integrates with Claude Desktop, making sophisticated browser automation accessible to LLM-based workflows.
How to Configure
- Clone the Stagehand MCP Server repository from its official source.
- In the project directory, install dependencies using:
npm install npm run build
- Update your Claude Desktop configuration to register the Stagehand MCP Server:
{ "mcpServers": { "stagehand": { "command": "node", "args": ["path/to/mcp-server-browserbase/stagehand/dist/index.js"], "env": { "BROWSERBASE_API_KEY": "<YOUR_BROWSERBASE_API_KEY>", "BROWSERBASE_PROJECT_ID": "<YOUR_BROWSERBASE_PROJECT_ID>", "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>" } } } }
- Run the server with:
node dist/index.js
- Restart Claude Desktop to load the new MCP configuration. The Stagehand tools will then appear as available MCP tools.
How to Use
- Launch Claude Desktop with the configured MCP Server.
- Access Stagehand tools from the available MCP tool menu (look for the hammer icon).
- Use tools like site navigation, action automation, and data extraction by selecting the relevant tool, entering required parameters (e.g., URLs, actions, instructions), and running the function.
- Review resources such as console logs or screenshots through their respective resource endpoints when needed.
- For visual demo, refer to available documentation or demonstration videos showing Claude interacting with the web via the Stagehand MCP Server.
Key Features
- Standardized web automation tools easily accessible within Claude Desktop via MCP.
- Secure integration with Browserbase for remote, headless browser sessions.
- Executable toolset: navigate to websites, perform actions, extract structured data.
- Resource endpoints provide browser console logs and on-demand screenshots for full traceability.
- Supports custom credentials and environmental isolation for sensitive tasks and secure operations.
Use Cases
- Automated data collection from web pages for up-to-date insights.
- End-to-end workflow automation, such as logging into sites, navigating dashboards, and downloading reports.
- Rapid prototyping of browser-based agentic workflows powered by LLMs.
- Monitoring and scraping public-facing web content with real-time extraction through LLM-directed automation.
- Gathering screenshots and diagnostic logs for compliance or reporting.
FAQ
Q1: Do I need to expose my local files or database to use Stagehand MCP Server?
No, the Stagehand MCP Server only interacts with web resources and provides access to browser sessions, screenshots, and logs. Your local files and databases remain isolated unless explicitly integrated via other MCP servers.
Q2: What do I need from Browserbase?
You will need a Browserbase API Key and Project ID. These credentials are required to instantiate secure, remote browser sessions.
Q3: How do I know if the Stagehand MCP Server is running correctly?
After launching the server and restarting Claude Desktop, you should see the Stagehand tools appear as callable MCP tools. Additionally, check the command-line output of the server for connection confirmation or errors.
Q4: Can I use Stagehand MCP Server with other LLM hosts besides Claude Desktop?
Currently, the main official integration is with Claude Desktop, but any host supporting the MCP protocol and tools could potentially leverage Stagehand MCP Server.
Q5: Is it possible to capture screenshots or access browser logs programmatically?
Yes, both screenshots and browser console logs are exposed as resources which can be accessed through their unique resource identifiers, making it easy to retrieve evidence or debug outcomes programmatically.