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

mcp-fetch-server

v1.1.2

Published

MCP server and CLI for fetching web content as HTML, Markdown, plain text, JSON, or YouTube transcripts

Readme

Fetch MCP Server

fetch mcp logo

npm version

An MCP server for fetching web content in multiple formats — HTML, JSON, plain text, Markdown, readable article content, and YouTube transcripts.

Tools

All tools accept the following common parameters:

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | url | string | Yes | URL to fetch | | headers | object | No | Custom headers to include in the request | | max_length | number | No | Maximum characters to return (default: 5000) | | start_index | number | No | Start from this character index (default: 0) | | proxy | string | No | Proxy URL (e.g. http://proxy:8080) |

  • fetch_html — Fetch a website and return its raw HTML content.

  • fetch_markdown — Fetch a website and return its content converted to Markdown.

  • fetch_txt — Fetch a website and return plain text with HTML tags, scripts, and styles removed.

  • fetch_json — Fetch a URL and return the JSON response.

  • fetch_readable — Fetch a website and extract the main article content using Mozilla Readability, returned as Markdown. Strips navigation, ads, and boilerplate. Ideal for articles and blog posts.

  • fetch_youtube_transcript — Fetch a YouTube video's captions/transcript. Uses yt-dlp if available, otherwise extracts directly from the page. Accepts an additional lang parameter (default: "en") to select the caption language.

Installation

As an MCP server

Add to your MCP client configuration:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["mcp-fetch-server"]
    }
  }
}

As a CLI

npx mcp-fetch <command> <url> [flags]

Or install globally:

npm install -g mcp-fetch-server
mcp-fetch <command> <url> [flags]

CLI Usage

mcp-fetch <command> <url> [flags]

Commands

| Command | Description | |---------|-------------| | html | Fetch a URL and return raw HTML | | markdown | Fetch a URL and return Markdown | | readable | Fetch a URL and return article content as Markdown (via Readability) | | txt | Fetch a URL and return plain text | | json | Fetch a URL and return JSON | | youtube | Fetch a YouTube video transcript |

Flags

| Flag | Description | |------|-------------| | --max-length <N> | Maximum characters to return | | --start-index <N> | Start from this character index | | --proxy <URL> | Proxy URL | | --lang <code> | Language code for YouTube transcripts (default: en) | | --help | Show help message | | --version | Show version |

Examples

# Fetch a page as markdown
mcp-fetch markdown https://example.com

# Extract article content without boilerplate
mcp-fetch readable https://example.com/blog/post

# Get a YouTube transcript in Spanish
mcp-fetch youtube https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang es

# Fetch with a length limit
mcp-fetch html https://example.com --max-length 10000

# Fetch through a proxy
mcp-fetch json https://api.example.com/data --proxy http://proxy:8080

Environment Variables

| Variable | Description | |----------|-------------| | DEFAULT_LIMIT | Default character limit for responses (default: 5000, set to 0 for no limit) |

Example with a custom limit:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["mcp-fetch-server"],
      "env": {
        "DEFAULT_LIMIT": "50000"
      }
    }
  }
}

Features

  • Fetch web content as HTML, JSON, plain text, or Markdown
  • Extract article content with Mozilla Readability (strips ads, nav, boilerplate)
  • Extract YouTube video transcripts (via yt-dlp or direct extraction)
  • Proxy support for requests behind firewalls
  • Pagination with max_length and start_index
  • Custom request headers
  • SSRF protection (blocks private/localhost addresses)

Development

bun install
bun run dev     # start with watch mode
bun test        # run tests
bun run build   # build for production

License

This project is licensed under the MIT License.