# Fetch MCP Server [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/YawLabs/fetch-mcp  
**GitHub Stars:** 2  
**npm Downloads (last month):** 5178  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/fetch-mcp-server

## Description
HTTP fetch MCP server: SSRF protection, HTML-to-markdown, reader mode, metadata extraction

## Tools
Capabilities this server exposes over MCP:

- **http_get** — Perform an HTTP GET. Returns status, headers, and body. Automatically parses JSON when the server responds with application/json. Follows redirects (each hop re-validated against SSRF rules). Refuses URLs that resolve to private/loopback/link-local addresses unless the operator enabled FETCH_MCP_ALLOW_PRIVATE_HOSTS and the call sets allow_private_hosts.
- **http_post** — Perform an HTTP POST. Body can be given as a raw string (body) or as a JSON value (body_json — auto-sets content-type to application/json). NOT idempotent: calling twice submits twice.
- **http_put** — Perform an HTTP PUT. Use for full-resource replacement. Idempotent: the same PUT applied twice leaves the resource in the same state.
- **http_patch** — Perform an HTTP PATCH. Use for partial updates. Spec-wise NOT guaranteed idempotent — depends on the server's patch semantics.
- **http_delete** — Perform an HTTP DELETE. Idempotent (per spec): a repeated DELETE on an already-deleted resource typically returns 404/410.
- **http_head** — Perform an HTTP HEAD. Returns status + headers with no body. Useful for checking a resource exists, getting its size (Content-Length), or polling for changes cheaply.
- **http_options** — Perform an HTTP OPTIONS. Returns the server's supported methods and CORS policy for a resource. Helpful for API discovery.
- **fetch_html_to_markdown** — GET a URL, decode the HTML, and convert to clean markdown (headings, lists, links, code fences). Scripts, styles, iframes, nav, footer, and aside elements are stripped. Intended for feeding web pages into an LLM cheaply -- markdown is usually 3-8x smaller than raw HTML. Follows redirects, respects size/timeout limits, and blocks private-host requests by default.
- **fetch_html_to_text** — GET a URL, decode the HTML, and return plain text with block-level structure preserved as newlines. Scripts, styles, and comments stripped; HTML entities decoded. Lighter than markdown when you only need the reading content.
- **fetch_robots** — Fetch and parse the robots.txt for a given origin, then tell the caller whether a target URL is crawlable by a given user-agent. Follows the Google-style longest-match rule with Allow-wins-on-tie. Returns the raw robots.txt, parsed groups, sitemap references, and the allow/deny verdict with the matching rule.
- **fetch_sitemap** — Fetch a sitemap.xml (or sitemap-index) and return the contained URLs with their lastmod / changefreq / priority. Follows sitemap-index chaining up to max_depth levels. Gzipped .xml.gz payloads are auto-decompressed. A single sitemap document over 16 MiB once decoded is refused (a 50,000-URL sitemap is ~11 MiB). Partial failures (one child sitemap 500s while others work) are returned under 'warnings' without aborting the whole request. SSRF-protected by default.
- **fetch_meta** — GET a URL and extract its head metadata: title, description, canonical, language, robots directive, Open Graph / Twitter Card / article: properties, icon links, RSS/Atom feed links, and any JSON-LD (schema.org) blocks. Keys that appear more than once (e.g. multiple og:image tags) are additionally returned via ogAll/twitterAll/articleAll arrays. Lists are capped: at most 100 icons, feeds, JSON-LD blocks and values per *All key, and 1000 keys per og/twitter/article; a JSON-LD block nested deeper than 64 levels is dropped. When anything is cut, `truncated` names the collections affected. Ideal for previewing a page before fully reading it.
- **fetch_links** — Extract every outbound link from an HTML page, resolved to absolute URLs. Each entry includes href, anchor text, optional rel/title, and an internal/external classification (bare-domain and www. treated as the same host). Only http and https links are returned: anchors (#) and every other scheme (javascript:, mailto:, tel:, data:, file:, ...) are skipped. Respects <base href>.
- **fetch_feed** — Fetch and parse an RSS 2.0 or Atom 1.0 feed. Returns feed-level metadata (title, description, link, updated) plus a list of entries (title, link, id, published, updated, author, summary, content, contentType, categories). Auto-detects RSS vs Atom.
- **fetch_reader** — GET a URL, locate the main article body (prefers <article>, <main>, itemprop=articleBody, or known CMS class names; falls back to <body>), strip navigation/footer/aside chrome, and convert to clean markdown. Returns { title, byline, markdown, wordCount }. Optimized for feeding long-form articles into an LLM without header/footer/sidebar noise.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "fetch-mcp-server": {
    "command": "npx",
    "args": ["-y","@yawlabs/fetch-mcp@latest"],
    "env": {
      "FETCH_MCP_ALLOW_PRIVATE_HOSTS": ""
    }
  }
}
```

**Requires environment variables:** `FETCH_MCP_ALLOW_PRIVATE_HOSTS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Fetch MCP Server does

Fetch MCP Server exposes web retrieval and extraction operations through a stdio-based Model Context Protocol interface. It can make GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS requests, returning response status, headers, content, redirect information, and either decoded text, parsed JSON, or base64 data.

For web content, it converts HTML to markdown or plain text, isolates article content in reader mode, and extracts page metadata. It also handles outbound-link discovery, robots.txt evaluation, sitemap parsing, and RSS or Atom feed parsing. These capabilities make it suitable for agents that need to inspect public web resources without implementing separate HTTP and HTML-processing logic.

## How it works

The package runs as an MCP server over stdio and can be started with `npx -y @yawlabs/fetch-mcp@latest`, installed globally with npm, or launched through the `fetch-mcp` command. MCP clients provide tool arguments such as an absolute URL, request headers, timeout, retry count, redirect limit, and response-size limit.

HTTP request tools accept basic authentication and bearer-token options. POST, PUT, PATCH, and DELETE also accept either a raw string body or a structured JSON value; the JSON form sets the content type automatically. Responses can be truncated at a configured byte limit, and retries are available for selected transient statuses including 408, 425, 429, and 5xx responses.

HTML extraction removes scripts and other non-content elements before producing markdown or text. Reader mode selects likely article containers such as `article`, `main`, or common CMS content classes, then returns the title, optional byline, word count, and markdown.

## Setup and configuration

Running on Node.js requires version 22.19 or newer. A basic MCP configuration uses the `fetch` server name, `npx` as the command, and `-y @yawlabs/fetch-mcp@latest` as its arguments. The package can also be added with `mcph add fetch`.

Private, loopback, link-local, and other non-public destinations are blocked by default. To permit an individual request to use private hosts, the server operator must set `FETCH_MCP_ALLOW_PRIVATE_HOSTS` to `1`, `true`, `yes`, or `on`, and the tool call must also set `allow_private_hosts` to true. This setting is intended for environments where internal-network access is deliberate.

## Tools and capabilities

- `http_get`, `http_post`, `http_put`, `http_patch`, `http_delete`, `http_head`, and `http_options` make controlled HTTP requests.
- `fetch_html_to_markdown` creates compact markdown with headings, lists, links, and fenced code blocks.
- `fetch_html_to_text` returns readable text while preserving block-level line breaks.
- `fetch_reader` extracts the main article and returns title, byline, word count, and markdown.
- `fetch_meta` reads titles, descriptions, canonical URLs, language, robots directives, Open Graph, Twitter Card, article properties, icons, feeds, and JSON-LD.
- `fetch_links` resolves HTTP and HTTPS links to absolute URLs and marks them internal or external.
- `fetch_robots` evaluates crawlability using parsed robots.txt rules.
- `fetch_sitemap` supports sitemap indexes, gzip-compressed XML, URL metadata, and partial-failure warnings.
- `fetch_feed` parses RSS 2.0 and Atom 1.0 feeds into feed metadata and entries.

## Limitations and notes

Redirect destinations are rechecked for allowed schemes and public addressing, and sensitive authorization headers are removed when redirects cross origins. Large responses and metadata collections are capped, so extraction results may indicate truncation. PATCH idempotency depends on the target API, while POST requests can submit again if repeated. Private-host access should be enabled only where the agent is allowed to reach internal services.

_Full upstream README: https://allmcps.com/mcp/fetch-mcp-server/readme_

