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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kevinwatt/playwright-fetch-mcp

v1.0.8

Published

A tool for fetching content from e-commerce websites using Playwright

Readme

Playwright Fetch MCP Server

This MCP server provides functionality to fetch web content in various formats, including JSON, plain text, and Markdown.

Installation

Prerequisites

Before using this tool, you need to install Playwright and its browser dependencies:

Windows

npm install -g playwright
npx playwright install chromium

macOS

npm install -g playwright
npx playwright install chromium

Linux

npm install -g playwright
npx playwright install chromium

Installation Methods

Via npm

npm install @kevinwatt/playwright-fetch-mcp

From source code

git clone https://github.com/kevinwatt/playwright-fetch-mcp.git
cd playwright-fetch-mcp
npm install
npm run build

Components

Tools

  • fetch_json

    • Fetches JSON content from a URL
    • Input:
      • url (string, required): The URL of the JSON resource to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the parsed JSON content
  • fetch_txt

    • Fetches a website and returns plain text content (HTML tags removed)
    • Input:
      • url (string, required): The URL of the website to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the plain text content of the webpage with HTML tags, scripts, and styles removed
  • fetch_markdown

    • Fetches a website and converts its content to Markdown format
    • Input:
      • url (string, required): The URL of the website to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the webpage content converted to Markdown format

Resources

This server does not provide any persistent resources. It is designed to fetch and transform web content on demand.

Quick Start

  1. Clone this repository
  2. Install dependencies: npm install
  3. Build the server: npm run build

Usage

Run the server directly:

npm start

This will start the Fetch MCP server in stdio mode.

Integration with Desktop Applications

To integrate this server with a desktop application, add the following to your server configuration:

Using local installation

{
  "mcpServers": {
    "playwright-fetch": {
      "command": "node",
      "args": [
        "/path/to/your/dist/index.js"
      ],
      "enabled": true
    }
  }
}

Using npx (recommended)

{
  "mcpServers": {
    "playwright-fetch": {
      "command": "npx",
      "args": [
        "-y",
        "@kevinwatt/playwright-fetch-mcp"
      ],
      "enabled": true
    }
  }
}

Features

  • Uses Playwright to fetch web content, supporting modern websites and dynamic content
  • Supports custom headers in requests
  • Provides content in multiple formats: JSON, plain text, and Markdown
  • Uses JSDOM to parse HTML and extract text
  • Uses TurndownService to convert HTML to Markdown
  • Supports redirects, with a maximum of 3 redirect levels
  • Implements retry mechanism, with up to 2 retries
  • Automatically installs Chromium browser on package installation

Development

  • Run npm run dev to start the TypeScript compiler in watch mode
  • Use npm test to run the test suite

License

This project is licensed under the MIT License.