Fetch MCP Server

by zcaceres

15 stars
Not rated
GitHub

About

Provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.

Details

Author
zcaceres
Repository
zcaceres/fetch-mcp
GitHub stars
15
License
MIT License
Categories
Web Scraping, Developer Tools

- 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 and DNS rebinding)
- Response size limits to prevent memory exhaustion

Setting up with Highlight

Follow these steps to add this server as a custom Highlight plugin:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Fetch MCP Server
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 mcp-fetch-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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

| Variable | Description |
|----------|-------------|
| DEFAULT_LIMIT | Default character limit for responses (default: 5000, set to 0 for no limit) |
| MAX_RESPONSE_BYTES | Maximum response body size in bytes (default: 10485760 / 10 MB) |

Example with a custom limit:

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

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.

fetch_youtube_transcript

Fetch a YouTube video's captions/transcript. Accepts an additional lang parameter to select the caption language.

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.

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "mcp-fetch-server"
    ],
    "command": "cmd"
}

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.

<a href="https://glama.ai/mcp/servers/nu09wf23ao">
Fetch Server MCP server
</a>

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

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.