JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q68275F
  • License MIT

MCP server that exposes Stagehand browser automation capabilities

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 build

Usage

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 testing

Tools

The server provides 5 core automation tools:

  1. navigate - Navigate to URLs
  2. act - Perform actions using natural language (click, type, etc.)
  3. extract - Extract structured data from pages
  4. observe - Get information about actionable elements
  5. screenshot - Capture page screenshots

License

MIT