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-mcp-server-custom

v1.0.8

Published

Model Context Protocol servers for Playwright

Readme

playwright-mcp-server-custom

A Model Context Protocol (MCP) server that brings Playwright browser automation to LLMs, agents, and automation frameworks.
Interact with real browsers, inject cookies/localStorage, take screenshots, generate code, scrape web pages, and more—all via a unified tool interface.


🚀 Features

  • Full Playwright Automation: Chromium, Firefox, and WebKit support.
  • Session Injection: Set cookies and localStorage before navigation (simulate logged-in or pre-configured sessions).
  • Web Interaction: Click, fill, select, hover, upload files, drag, and more.
  • Navigation & Tabs: Open URLs, switch tabs, go back/forward, set user agent, headless mode, etc.
  • Screenshots & Output: Capture screenshots, save as PDF, extract visible text/HTML.
  • API Testing: Perform HTTP GET/POST/PUT/PATCH/DELETE requests.
  • Console & JS: Retrieve browser console logs, execute JavaScript.
  • Code Generation: Record and generate Playwright test scripts.
  • Resource Access: Download screenshots, logs, and more.

📦 Installation

npm install -g playwright-mcp-server-custom

Or use with npx:

npx playwright-mcp-server-custom

🖥️ Usage

Start the MCP server:

playwright-mcp-server

or

npx playwright-mcp-server-custom

The server will listen for MCP tool requests via stdio (for integration with LLM agents, automation clients, or your own scripts).


🛠️ Example Tool Calls

1. Set Session Data (Cookies & localStorage)

{
  "cookies": [
    {
      "domain": ".example.com",
      "name": "sessionid",
      "value": "abc123",
      "path": "/",
      "expirationDate": 9999999999,
      "httpOnly": true,
      "secure": true,
      "sameSite": "Lax"
    }
  ],
  "origins": [
    {
      "origin": "https://example.com",
      "localStorage": [
        { "name": "user", "value": "{\"id\":1,\"name\":\"Alice\"}" }
      ]
    }
  ]
}

Tool name: playwright_set_session_data


2. Navigate to a Website

{
  "url": "https://www.hubtel.com"
}

Tool name: playwright_navigate


3. Take a Screenshot

{
  "name": "homepage",
  "fullPage": true
}

Tool name: playwright_screenshot


🧩 Supported Tools

  • playwright_set_session_data — Set cookies and localStorage before navigation
  • playwright_navigate — Open a URL
  • playwright_click, playwright_fill, playwright_select, playwright_hover, playwright_upload_file, playwright_drag, playwright_press_key
  • playwright_screenshot, playwright_save_as_pdf
  • playwright_get, playwright_post, playwright_put, playwright_patch, playwright_delete
  • playwright_console_logs, playwright_evaluate
  • playwright_start_codegen_session, playwright_end_codegen_session, etc.
  • ...and more!

See the Supported Tools documentation for full details.


🧪 Testing

This project uses Jest for testing.
Run all tests:

npm test

With coverage:

npm run test:coverage

🤝 Contributing

  • Fork the repo and create a feature branch.
  • Add new tools by implementing the ToolHandler interface and registering your tool in src/tools.ts and src/toolHandler.ts.
  • Keep tool names short (for compatibility with LLM clients).
  • Submit a pull request!

📄 License

MIT License
Copyright (c) 2025 DevMorph


💡 Credits

Originally inspired by ExecuteAutomation's Playwright MCP Server.
Maintained by DevMorph.


Happy automating!