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

@devadminhu/patchright-mcp

v0.2.0

Published

MCP server for real-time browser automation and debugging via Patchright (Playwright stealth fork). 69 tools: stealth, network intercept, multi-tab, raw CDP, session storage.

Readme

@devadminhu/patchright-mcp

Powerful MCP server for real-time browser automation and debugging via Patchright (Playwright stealth fork).

Built on Patchright and exposing 69 tools via Model Context Protocol — from basic click/screenshot to route interception, raw Chrome DevTools Protocol, multi-tab orchestration, fingerprint spoofing, and token-cheap WebSocket/HTTP capture to disk.


Highlights

  • Native stealth — Patchright bypasses bot detection by default (webdriver=false, plugins, fingerprint)
  • Automatic capture — every HTTP request/response, WS frame and console log written to JSONL per session
  • Token-cheap — query tools (tail_ws, query_network, list_endpoints, ws_summary) return only what matters
  • Batch executionfill_form and batch_actions reduce N round-trips to 1
  • Raw CDP — any Chrome DevTools Protocol command (Network.*, Page.*, Runtime.*, Emulation.*, Fetch.*)
  • Session forge — cookies, localStorage, sessionStorage, headers, UA, geo, timezone, device emulation
  • Multi-tab — multiple tabs with own IDs, switch/close/list

Installation

npx -y @devadminhu/patchright-mcp

Or global:

npm i -g @devadminhu/patchright-mcp

Register in your MCP client

Add to your MCP config (.mcp.json or equivalent):

{
  "mcpServers": {
    "patchright-mcp": {
      "command": "npx",
      "args": ["-y", "@devadminhu/patchright-mcp"]
    }
  }
}

Tools will appear as mcp__patchright-mcp__*.


Quickstart

1. Launch Chrome

launch_browser sessionId="x" headless=false

Cloudflare / anti-bot bypass (passes JS challenge even in headless):

launch_browser
  sessionId="x"
  headless=true
  cfBypass=true
  userDataDir="/path/to/profile"

cfBypass=true applies:

  • channel="chrome" (real installed Chrome, not Chromium)
  • Anti-detect args (--disable-blink-features=AutomationControlled, etc)
  • ignoreDefaultArgs=["--enable-automation"]
  • Real Chrome 147 UA (no "Headless")
  • Auto stealth_inject (webdriver=undefined, plugins, hardware)

userDataDir + lockProfile (default true) persists cf_clearance across runs with fcntl-style lock to prevent two instances corrupting LevelDB.

Or connect to an already-running Chrome via CDP:

google-chrome --remote-debugging-port=9222 &
ws_connect_local sessionId="x"

2. Stealth + navigation

stealth_inject sessionId="x"
navigate sessionId="x" url="https://example.com"

3. Investigate

ws_summary sessionId="x"                    # WS URL summary + counts
tail_ws sessionId="x" limit=20 evt=send     # last 20 sent WS messages
list_endpoints sessionId="x"                # unique HTTP hosts/paths
query_network sessionId="x" urlPattern="api/login" limit=5
session_storage_info sessionId="x"          # captured file sizes
export_session sessionId="x"                # full dump as JSON

Tools (69)

Connection & Session

  • start_debug_session — create session (with or without wsEndpoint)
  • ws_connect_local — connect to local Chrome on port 9222
  • launch_browser — launch Chrome (headful/headless, viewport, userDataDir)
  • list_sessions — list active sessions
  • get_session_info — detailed session info
  • close_session — close and cleanup

Navigation

  • navigate — go to URL (customizable waitUntil)
  • reload, go_back, go_forward
  • wait_for_navigation — wait for load to complete
  • wait_for_response — wait for response matching pattern

DOM Interaction

  • click_element, hover, type_text, set_input
  • press_key (Enter, Escape, Ctrl+a, etc)
  • scroll_to, select_option, drag_drop
  • upload_file, download_file
  • fill_form — batch fill multiple fields in one call
  • batch_actions — action sequence (fill/click/wait/eval/press/select/hover/screenshot)

Inspection

  • inspect_dom — HTML, styles, rect, attributes
  • query_all — all matching elements
  • find_by_text — search by visible text
  • get_html, get_text, get_page_state
  • wait_for_element, evaluate_script

Network

  • intercept_route — abort/continue/fulfill (mock response, modify headers/body)
  • remove_route, block_resources
  • debug_network, get_full_network, get_response_body

Token-cheap query (all captured to disk)

  • list_endpoints — unique hosts/paths/methods with count
  • query_network — filters (urlPattern, method, status, phase) + pagination
  • tail_ws — last N WS messages with filters
  • ws_summary — counts per URL (create/send/recv/close)
  • session_storage_info, clear_session_storage, export_session

Cookies & Storage

  • get_cookies, set_cookies, clear_cookies
  • get_storage, set_storage, save_storage_state

Stealth & Spoof

  • stealth_inject — webdriver=false, plugins, hardware masking
  • set_user_agent, set_geolocation, set_timezone
  • set_extra_headers, emulate_device

Multi-Tab

  • new_tab, list_tabs, switch_tab, close_tab

Output

  • capture_screenshot, save_pdf
  • start_video, stop_video

Power Mode

  • cdp_command — raw Chrome DevTools Protocol command

Debug

  • debug_console, get_performance_metrics, exec_accessibility_audit

Session storage

Everything is automatically written to /tmp/mcp-patchright/<sessionId>/:

network.jsonl    # all HTTP requests + responses
ws.jsonl         # all WebSocket frames (create/send/recv/close)
console.jsonl    # all console logs

Use query tools to search without dumping everything into context. Or export_session to get a single JSON file ready for external analysis.


Notes

  • PDF (save_pdf) only works in headless mode (Chromium limitation)
  • Raw CDP (cdp_command) is dev mode — no validation, any CDP method accepted

License

MIT — devadminhu