WS

weijiafu14/stagehand-mcp-local

Browser automation

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

7 stars 5 forks 품질 69 트렌드 15Apache-2.0

MCP server for AI browser automation using Stagehand - supports LOCAL mode without Browserbase cloud

개요

Run Stagehand browser automation locally without cloud services. A fork of the official @browserbasehq/mcp-server-browserbase with LOCAL mode support. The official Browserbase MCP server , requiring a paid Browserbase subscription. However, Stagehand itself fully supports local browser execution. - - Test browser automation without cloud costs - - Run on your own servers - - No external cloud dependency - - Automated testing without cloud API limits All original Browserbase MCP server options are supported: Once connected, your AI assistant can use these tools: In LOCAL mode, screenshots are automatically captured after each action for debugging and visualization: Parse the screenshot path programmatically: Playwright will download Chromium automatically.

README

원문 README의 일부입니다. 원문 보기.

Stagehand MCP Server - Local Mode

Run Stagehand browser automation locally without cloud services. A fork of the official @browserbasehq/mcp-server-browserbase with LOCAL mode support.

Why This Fork?

The official Browserbase MCP server only supports cloud mode, requiring a paid Browserbase subscription. However, Stagehand itself fully supports local browser execution.

This fork unlocks that capability:

Feature Official Version This Fork
Browser execution Browserbase Cloud only Local Headless Chrome
Required credentials BROWSERBASE_API_KEY + PROJECT_ID Only LLM API key
Cost Browserbase subscription Free (bring your own LLM key)
Network requirement Internet required Works offline/intranet
Auto screenshots ❌ ✅ After each action

Use Cases

  • Local development - Test browser automation without cloud costs
  • Self-hosted AI agents - Run on your own servers
  • Air-gapped environments - No external cloud dependency
  • CI/CD pipelines - Automated testing without cloud API limits

Quick Start

npx stagehand-mcp-local

Add to Claude Code

claude mcp add stagehand-local \
  -e STAGEHAND_ENV=LOCAL \
  -e OPENAI_API_KEY=your_key \
  -- npx stagehand-mcp-local

Add to Cursor / VS Code

Add to your MCP configuration:

{
  "mcpServers": {
    "stagehand-local": {
      "command": "npx",
      "args": ["stagehand-mcp-local"],
      "env": {
        "STAGEHAND_ENV": "LOCAL",
        "OPENAI_API_KEY": "your_openai_key"
      }
    }
  }
}

Installation

npm (Global)

npm install -g stagehand-mcp-local

From Source

git clone https://github.com/weijiafu14/stagehand-mcp-local.git
cd stagehand-mcp-local
pnpm install
pnpm build

Configuration

Environment Variables

Variable Description Default Required
STAGEHAND_ENV Set to LOCAL for local mode BROWSERBASE Yes
OPENAI_API_KEY OpenAI API key - One of these
GEMINI_API_KEY Google Gemini API key - is required
ANTHROPIC_API_KEY Anthropic API key - for Stagehand
HEADLESS Run browser headless true No
SCREENSHOT_ENABLED Enable auto screenshots true No
SCREENSHOT_DIR Screenshot save directory /tmp/stagehand-screenshots No

CLI Options

All original Browserbase MCP server options are supported:

npx stagehand-mcp-local --browserWidth 1920 --browserHeight 1080 --experimental
GitHub에서 전체 README 보기

설치

npx stagehand-mcp-local
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "stagehand-local": { "command": "npx", "args": ["stagehand-mcp-local"], "env": { "STAGEHAND_ENV": "LOCAL", "OPENAI_API_KEY": "your_openai_key" } } } }