mcpField
F
Fetch MCP Server

Fetch MCP Server

Local
github.com/zcaceresBrowser Automation835Updated 33w ago

About Fetch MCP Server

Fetch MCP Server is an MCP server that retrieves web content as HTML, JSON, plain text, Markdown, readable article text, or YouTube transcripts. It suits users who want AI assistants to read pages or video captions, and includes SSRF protection.

Key features

  1. 01Multi-format web fetching (HTML, JSON, text, Markdown)
  2. 02Article extraction with Mozilla Readability
  3. 03YouTube transcript retrieval via yt-dlp or direct parsing
  4. 04Pagination with max_length and start_index
  5. 05Custom request headers and proxy support
  6. 06Built-in SSRF protection and response size limits

Use cases

  1. 01Letting an AI assistant read articles without navigation or ads
  2. 02Retrieving captions in a chosen language from YouTube videos
  3. 03Accessing pages behind a firewall through a proxy

MCP support

This project is an MCP server that exposes tools such as fetch_html, fetch_markdown, fetch_txt, fetch_json, fetch_readable and fetch_youtube_transcript to MCP clients. It can also be run as a command line tool through npx.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"fetch-mcp-zcaceres": {
"command": "npx",
"args": [
"-y",
"mcp-fetch"
]
}
}
}
Run commandnpx -y mcp-fetch

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-fetch

Tools

5

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
urlstringYesThe URL to fetch from
methodenumNoThe HTTP method to use. Defaults to GETGET | POST | PUT | DELETE | PATCH | HEAD | OPTIONS
headersobjectNoHTTP headers to include in the request as key-value pairs
bodystringNoThe request body. Can be a string, JSON, or form data
modeenumNoThe mode for the request (cors, no-cors, or same-origin)cors | no-cors | same-origin
credentialsenumNoWhether to include credentials with the requestomit | same-origin | include
cacheenumNoThe cache mode for the requestdefault | no-store | reload | no-cache | force-cache | only-if-cached
redirectenumNoHow to handle redirects. Defaults to followfollow | error | manual
referrerstringNoThe referrer to send with the request
referrerPolicyenumNoThe referrer policy for the requestno-referrer | no-referrer-when-downgrade | origin | origin-when-cross-origin | same-origin | strict-origin | strict-origin-when-cross-origin | unsafe-url
signalanyNoAn AbortSignal to abort the request
timeoutnumberNoRequest timeout in milliseconds
followRedirectsbooleanNoWhether to follow redirects. Defaults to true

Details

From the project 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.

Fetch Server MCP server

Tools

All tools accept the following common parameters:

ParameterTypeRequiredDescription
urlstringYesURL to fetch
headersobjectNoCustom headers to include in the request
max_lengthnumberNoMaximum characters to return (default: 5000)
start_indexnumberNoStart from this character index (default: 0)
proxystringNoProxy 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
CommandDescription
htmlFetch a URL and return raw HTML
markdownFetch a URL and return Markdown
readableFetch a URL and return article content as Markdown (via Readability)
txtFetch a URL and return plain text
jsonFetch a URL and return JSON
youtubeFetch a YouTube video transcript
Flags
FlagDescription
--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)
--helpShow help message
--versionShow 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

VariableDescription
DEFAULT_LIMITDefault character limit for responses (default: 5000, set to 0 for no limit)
MAX_RESPONSE_BYTESMaximum 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"
      }
    }
  }
}

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

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.