npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@browserbasehq/mcp-stagehand

v0.5.1

Published

MCP server for AI web browser automation using Stagehand

Downloads

84

Readme

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.