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 🙏

© 2026 – Pkg Stats / Ryan Hefner

pptr-mcp

v0.2.5

Published

MCP server for browser automation via Puppeteer

Readme

pptr-mcp

MCP server for browser automation via Puppeteer. Unlike other browser MCPs that expose fixed tools (navigate, click, screenshot), this server executes arbitrary JavaScript code with direct access to the Puppeteer Browser instance.

Key Difference

Most browser MCP servers provide a limited set of predefined actions. This approach requires multiple round-trips for complex workflows and can't handle edge cases.

pptr-mcp takes a different approach: it exposes a single execute tool that runs your JavaScript code in a Node.js VM with a browser global. You write Puppeteer code directly, getting full API access in one call.

Traditional MCP (5 round-trips)         pptr-mcp (1 round-trip)
================================        ================================

  Agent           Server                  Agent           Server
    |                |                      |                |
    |-- navigate --->|                      |-- execute ---->|
    |<-- ok ---------|                      |                |
    |                |                      |   +------------------------+
    |-- waitFor ---->|                      |   | const page = await     |
    |<-- ok ---------|                      |   |   browser.newPage();   |
    |                |                      |   | await page.goto(url);  |
    |-- click ------>|                      |   | await page.click(s);   |
    |<-- ok ---------|                      |   | await page.type(i, t); |
    |                |                      |   | return await           |
    |-- type ------->|                      |   |   page.screenshot();   |
    |<-- ok ---------|                      |   +------------------------+
    |                |                      |                |
    |-- screenshot ->|                      |<-- result -----|
    |<-- image ------|                      |                |
    |                |                      |                |

Requirements

  • Node.js >= 20

Installation

npm install -g pptr-mcp

MCP Configuration

Add to your MCP client config (e.g., Claude Desktop):

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["pptr-mcp"]
    }
  }
}

With CLI options:

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["pptr-mcp", "--no-headless", "--viewport=1080p"]
    }
  }
}

With custom Chrome flags (after --):

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": [
        "pptr-mcp",
        "--viewport=1280x720",
        "--",
        "--proxy-server=http://proxy:8080"
      ]
    }
  }
}

CLI Options

| Option | Description | | ------------------ | -------------------------------------------- | | --no-headless | Run with visible browser window | | --viewport=VALUE | Set viewport size (e.g., 1920x1080 or 1080p) | | --help, -h | Show help | | -- [args] | Pass remaining args to Chrome |

Unknown options before -- are also passed to Chrome.

Claude Code Plugin

Install as a Claude Code plugin:

/plugin marketplace add iatsiuk/pptr-mcp
/plugin install pptr-mcp@pptr-mcp

Environment Variables

| Variable | Description | | --------------------------- | ---------------------------------------- | | CHROME_PATH | Path to Chrome executable | | PUPPETEER_EXECUTABLE_PATH | Alternative to CHROME_PATH | | PUPPETEER_CACHE_DIR | Browser download cache directory | | PPTR_MCP_TIMEOUT | Execution timeout in ms (default: 30000) |

Tool: execute

Executes JavaScript code with access to Puppeteer browser.

Parameters

| Name | Type | Default | Description | | ------------ | ------- | -------- | ---------------------------------- | | code | string | required | JavaScript code to execute | | persistent | boolean | true | Reuse browser session across calls |

Recipes

Disable headless mode

Show browser window during execution:

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["pptr-mcp", "--no-headless"]
    }
  }
}

Custom Chrome profile directory

Use your own Chrome profile with saved logins and cookies:

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["pptr-mcp", "--", "--user-data-dir=/path/to/profile"]
    }
  }
}

Use system Chrome instead of downloaded

By default, pptr-mcp downloads Chrome for Testing - a version optimized and tested for the bundled Puppeteer. To use your system Chrome instead:

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["pptr-mcp"],
      "env": {
        "CHROME_PATH": "/path/to/chrome"
      }
    }
  }
}

Security

This server is designed for trusted local development with LLM assistants (Claude Code, Cursor, etc.). The executing code comes from the LLM at your request.

What this means

  • Not a sandbox: The Node.js VM isolates code for convenience, not security. It is not designed to run untrusted code.
  • Full browser control: Executed code can navigate to any URL, read page content, take screenshots, and interact with web applications.
  • Chrome runs without sandbox: --no-sandbox flag is used for Docker/container compatibility.
  • Persistent sessions: With persistent: true (default), cookies and browser state are preserved across calls. Use persistent: false for isolation.

Not designed for

  • Multi-tenant or shared server deployments
  • Executing untrusted code from external sources
  • Building web services that accept arbitrary user input

License

WTFPL