Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@browserbasehq/mcp-stagehand

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@browserbasehq/mcp-stagehand

MCP server for AI web browser automation using Stagehand

  • 0.5.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Stagehand MCP Server

cover

A Model Context Protocol (MCP) server that provides AI-powered web automation capabilities using Stagehand. This server enables LLMs to interact with web pages, perform actions, extract data, and observe possible actions in a real browser environment.

Get Started

  1. Run npm install to install the necessary dependencies, then run npm run build to get dist/index.js.

  2. Set up your Claude Desktop configuration to use the 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>",
      }
    }
  }
}
  1. Restart your Claude Desktop app and you should see the tools available clicking the 🔨 icon.

  2. Start using the tools! Below is a demo video of Claude doing a Google search for OpenAI using stagehand MCP server and Browserbase for a remote headless browser.

Tools

Stagehand commands

  • stagehand_navigate

    • Navigate to any URL in the browser
    • Input:
      • url (string): The URL to navigate to
  • stagehand_act

    • Perform an action on the web page
    • Inputs:
      • action (string): The action to perform (e.g., "click the login button")
      • variables (object, optional): Variables used in the action template
  • stagehand_extract

    • Extract data from the web page based on an instruction and schema
    • Inputs:
      • instruction (string): Instruction for extraction (e.g., "extract the price of the item")
      • schema (object): JSON schema for the extracted data
  • stagehand_observe

    • Observe actions that can be performed on the web page
    • Input:
      • instruction (string, optional): Instruction for observation

Resources

The server provides access to two types of resources:

  1. Console Logs (console://logs)

    • Browser console output in text format
    • Includes all console messages from the browser
  2. Screenshots (screenshot://<name>)

    • PNG images of captured screenshots
    • Accessible via the screenshot name specified during capture

Key Features

  • AI-powered web automation
  • Perform actions on web pages
  • Extract structured data from web pages
  • Observe possible actions on web pages
  • Simple and extensible API
  • Model-agnostic support for various LLM providers

License

Licensed under the MIT License.

Copyright 2024 Browserbase, Inc.

FAQs

Package last updated on 12 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc