Fetch MCP Server

Fetches web pages and returns them as HTML, Markdown, plain text, JSON, article text or YouTube transcripts

By Zach Caceres (individual) JavaScript Local · stdio Browser automationMedia

70 popularity score ★ 836 ↓ 5.9k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add fetch -- npx -y mcp-fetch-server
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-fetch-server"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-fetch-server"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "fetch": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-fetch-server"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.fetch]
command = "npx"
args = ["-y", "mcp-fetch-server"]
Gemini CLITerminal
gemini mcp add --scope user fetch npx -- -y mcp-fetch-server

Settings 2

DEFAULT_LIMIT Optional: Default number of characters returned per call (5000; 0 for no limit).
MAX_RESPONSE_BYTES Optional: Largest response body accepted, in bytes (default 10485760, 10 MB).

What it does

Fetch MCP Server gives an assistant six tools for fetching one URL at a time. Each tool returns the response in a different form: the raw HTML, a Markdown conversion, plain text with scripts and styles removed, parsed JSON, the main article body only (extracted with Mozilla Readability and returned as Markdown), or the captions of a YouTube video.

Every tool takes the same basic arguments: the URL, optional request headers, and max_length and start_index for reading long pages in pieces. Output is cut at 5,000 characters by default. The DEFAULT_LIMIT setting changes that, and 0 removes the cut. Response bodies over 10 MB are refused unless MAX_RESPONSE_BYTES is raised. The transcript tool takes a lang argument ("en" by default). It uses yt-dlp when that is installed and otherwise reads the captions straight from the video page.

The same npm package also installs a command-line tool, mcp-fetch, with matching subcommands (html, markdown, readable, txt, json, youtube), so you can fetch pages from a terminal without an MCP client.

The source (src/Fetcher.ts) shows two things the README leaves out. First, every request is sent with a desktop Chrome User-Agent string unless you pass your own header. Second, the proxy argument is handed to fetch as a Bun-only option: the code says Node.js silently ignores it, and the npx launch runs under Node.

What it needs

RuntimeNode.js 18+

Node.js 18 or later (package.json engines), with npx to launch it. No account or API key. Network access to the sites you fetch. yt-dlp is optional; the transcript tool uses it when it is on the PATH.

Limits

Fetches only http and https URLs. Refuses localhost and private IP addresses, including hostnames that resolve to a private IP and redirects that end on one, so it cannot reach intranet or local services. Output is cut at 5,000 characters by default (DEFAULT_LIMIT) and bodies over 10 MB are rejected (MAX_RESPONSE_BYTES). It does not run JavaScript, so pages that build their content in the browser may come back mostly empty. The proxy argument the README lists has no effect under Node.js: the source notes it is a Bun-only fetch option. A response with an HTTP error status returns an error, not the page body.

Who it suits

It suits anyone who wants an assistant to read public web pages, API responses or YouTube captions on their own machine, with no key and no account. Because it fetches pages without rendering them, it is lightweight, but sites that load their content with JavaScript need a browser-driving server instead. It blocks private addresses, so it is no use for fetching internal dashboards or local dev servers. If you need to go through a proxy, run it under Bun or pick another server, because the proxy option is ignored under Node.

Tools 6

fetch_html
Returns a page's raw HTML.
fetch_markdown
Returns a page converted to Markdown.
fetch_txt
Returns a page's visible text, with tags, scripts and styles removed.
fetch_json
Fetches a URL and returns its JSON body.
fetch_readable
Extracts a page's main article with Readability and returns it as Markdown.
fetch_youtube_transcript
Returns a YouTube video's captions in the chosen language (en by default).

Similar servers