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

playwright-browser-mcp

v1.0.0

Published

A lightweight wrapper around [`@playwright/mcp`](https://github.com/nicholasgriffintn/playwright-mcp) that automatically starts a Chrome instance and connects it to a Playwright MCP server via the Chrome DevTools Protocol (CDP).

Readme

playwright-browser-mcp

A lightweight wrapper around @playwright/mcp that automatically starts a Chrome instance and connects it to a Playwright MCP server via the Chrome DevTools Protocol (CDP).

What it does

  1. Launches Chrome using simple-browser
  2. Auto-detects an available CDP port (starting from 9222)
  3. Starts the @playwright/mcp server connected to that browser

This gives MCP clients (like Claude Code) full browser automation capabilities — clicking, typing, navigating, taking screenshots, and more — without manual browser setup.

Prerequisites

  • Node.js and npm
  • lsof (standard on macOS/Linux)

Quick start

With npx (no install)

npx --yes playwright-browser-mcp@latest

Installation

Claude Code

claude mcp add playwright -- npx --yes playwright-browser-mcp@latest

Or add to your project's .mcp.json:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["--yes", "playwright-browser-mcp@latest"]
    }
  }
}

Cursor

Go to Cursor Settings > MCP > Add new global MCP server and paste:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["--yes", "playwright-browser-mcp@latest"]
    }
  }
}

Codex CLI

codex mcp add playwright -- npx --yes playwright-browser-mcp@latest

Gemini CLI

gemini mcp add playwright npx --yes playwright-browser-mcp@latest

Or add to ~/.gemini/settings.json (user-level) or .gemini/settings.json (project-level):

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["--yes", "playwright-browser-mcp@latest"]
    }
  }
}

CLI flags

| Flag | Default | Description | |------|---------|-------------| | --port <N> | Auto-detected from 9222 | Chrome CDP debugging port | | --output-dir <path> | .playwright-mcp/output | Directory for screenshots and artifacts | | --cdp-endpoint <url> | http://localhost:<port> | CDP endpoint URL (overrides port) |

All other arguments are passed through to @playwright/mcp.

Examples

# Use a specific port
./main.sh --port 9333

# Custom output directory
./main.sh --output-dir ./screenshots

# Connect to an existing Chrome instance
./main.sh --cdp-endpoint http://localhost:9222

How it works

  • On first run, the wrapper finds an available port starting from 9222 and saves it to .playwright-mcp/port.txt for reuse across runs.
  • Chrome is started via simple-browser (fetched automatically via npx).
  • The @playwright/mcp server is then launched with --cdp-endpoint pointing at the running Chrome instance.

Port persistence

The chosen port is persisted to .playwright-mcp/port.txt. Delete this file to force re-detection:

rm .playwright-mcp/port.txt

License

MIT