Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

An MCP server to flexibly fetch JSON, text, and HTML data

README.md

Fetch MCP Server

!fetch mcp logo

![npm version](https://www.npmjs.com/package/mcp-fetch-server)

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"> <img width="380" height="200" src="https://glama.ai/mcp/servers/nu09wf23ao/badge" alt="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

# 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

| 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"
      }
    }
  }
}

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.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Browser & Scraping servers.