Package Exports
- stagehand-mcp
- stagehand-mcp/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stagehand-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Stagehand MCP Server
An MCP (Model Context Protocol) server that exposes Stagehand browser automation capabilities to Claude and other MCP clients.
Features
- Browser Automation: Navigate, click, type, and interact with web pages using natural language
- Data Extraction: Extract structured information from any webpage
- Screenshots: Capture page screenshots as base64 or save to files
- Local Browser: Uses your local Chrome/Chromium installation
- AI-Powered: Leverages OpenAI models for intelligent web interactions
Installation
npm install
npm run buildUsage
MCP Configuration
Add to your MCP client configuration:
{
"mcpServers": {
"stagehand": {
"command": "node",
"args": ["/path/to/stagehand-mcp/dist/index.js"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}Command Line Options
--modelName- Override the default model (default: "openai/gpt-4o-mini")--modelApiKey- Override the API key (default: OPENAI_API_KEY env var)--executablePath- Override browser executable path--headless- Run in headless mode
Development
npm run dev # Watch mode for development
npm run inspector # Launch MCP Inspector for testingTools
The server provides 5 core automation tools:
- navigate - Navigate to URLs
- act - Perform actions using natural language (click, type, etc.)
- extract - Extract structured data from pages
- observe - Get information about actionable elements
- screenshot - Capture page screenshots
License
MIT