Fetch MCP Server

raw JSON →
1.1.2 verified Sat Apr 25 auth: no javascript

MCP server and CLI for fetching web content as HTML, Markdown, plain text, JSON, or YouTube transcripts. Current stable version 1.1.2, released regularly on npm. Key differentiators: multiple output formats, Mozilla Readability integration for article extraction, YouTube transcript support via yt-dlp or direct page extraction, and proxy support. Minimal configuration, designed for MCP ecosystem but also usable as standalone CLI. Requires Node.js >=18.

error npx mcp-fetch-server: command not found
cause Node.js version is below 18 or npm not installed.
fix
Install Node.js >=18 and ensure npm is up to date. Run: node --version && npm --version
error Error: Cannot find module 'mcp-fetch-server'
cause Attempting to import the package programmatically (require('mcp-fetch-server')) instead of using CLI/MCP server.
fix
Do not try to import this package in code. Use npx mcp-fetch-server to run it as an MCP server, or use CLI commands directly.
error Failed to fetch YouTube transcript: no captions found
cause Video does not have captions in the requested language, or yt-dlp is missing and direct extraction failed.
fix
Try a different language code (--lang). Install yt-dlp globally for better extraction: pip install yt-dlp
error Error: read ECONNRESET
cause Network issues, proxy misconfiguration, or target server blocking the request.
fix
Check network connectivity. If using a proxy, verify proxy URL. Try a different URL. Consider adding custom headers to simulate a browser User-Agent.
gotcha The package does not export any programmatic API; it is designed to be used via command line or as an MCP server. Attempting to require() or import it in Node.js will result in an error.
fix Use npx mcp-fetch-server to run as MCP server, or use CLI commands. If you need a fetch function programmatically, use libraries like undici or node-fetch directly.
gotcha YouTube transcript extraction may fail if yt-dlp is not installed and the direct page extraction method encounters issues (e.g., non-standard player, captions not accessible). The tool falls back silently but may return empty output.
fix Install yt-dlp globally (pip install yt-dlp) for more reliable transcript fetching.
gotcha fetch_readable uses Mozilla Readability which may not work well on non-article pages (e.g., homepage, video pages). It may return incomplete content or empty string.
fix Use fetch_html or fetch_markdown for non-article pages; fetch_readable is designed for blog posts and articles.
gotcha Default max_length is 5000 characters, which may truncate content unexpectedly for large pages. Setting DEFAULT_LIMIT=0 can return full content but may cause memory issues for very large pages.
fix Set max_length parameter appropriately per request, or configure DEFAULT_LIMIT environment variable to a higher value or 0 for no limit (with caution).
deprecated The package may change its tool names or parameters in future releases as the MCP specification evolves. Check changelog when upgrading.
fix Keep up-to-date with the MCP specification and package changelog on GitHub: https://github.com/zcaceres/fetch-mcp
npm install mcp-fetch-server
yarn add mcp-fetch-server
pnpm add mcp-fetch-server

Shows how to add the MCP server to client config and run CLI commands for markdown and YouTube transcript.

// Add to your Claude Desktop or MCP client config:
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["mcp-fetch-server"]
    }
  }
}

// Or use as CLI:
npx mcp-fetch markdown https://example.com --max-length 10000
npx mcp-fetch youtube https://www.youtube.com/watch?v=dQw4w9WgXcQ --lang es