Labsco
zcaceres logo

Fetch

โ˜… 793

from zcaceres

Fetch web content as HTML, JSON, plain text, or Markdown.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

Fetch MCP Server

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.

Environment Variables

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:

Copy & paste โ€” that's it
{
 "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

Copy & paste โ€” that's it
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.