Fetch MCP Server is one of the servers in the Model Context Protocol reference server collection, intended to provide LLMs with web content fetching capabilities: retrieving URL content from the internet and converting HTML to Markdown for easy consumption by models.
Main capabilities: provides a fetch tool that fetches URLs from the internet and extracts content as Markdown. Parameters include: url (string, required, the URL to fetch), max_length (integer, optional, maximum number of characters to return, default 5000), start_index (integer, optional, start extracting content from this character index, default 0), raw (boolean, optional, fetch raw content without Markdown conversion, default false), timeout_ms (integer, optional, HTTP request timeout for this call, ranging from 100 to 600000 milliseconds, defaults to the server timeout, or 30000 if not configured). Via start_index, web pages can be read in chunks, allowing the model to read section by section until it finds the needed information. Tool annotations are readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true.
Content negotiation: tools and prompts preferentially request Markdown, with the request header Accept: text/markdown, text/html;q=0.9, /;q=0.8. Sites that support content negotiation return Markdown directly; text/markdown responses are returned as-is, without simplification and without an accompanying raw content prompt; sites that ignore this request header still return HTML, which is then simplified to Markdown. Raw fetches keep the default Accept: /.
Security and limitations: this server can access local/internal IP addresses, which may pose security risks; use it with caution and avoid exposing sensitive data. By default it refuses to fetch private, loopback, link-local, and other non-public addresses, including cloud metadata endpoints such as 169.254.169.254, and performs the same check for each redirect hop. The --allow-private-ips parameter can disable this protection. The server only connects to addresses that have been checked, preventing DNS rebinding; proxied requests are an exception, where the proxy resolves the hostname and establishesEstablish connection. The server reads at most 5 MiB (5,242,880 bytes) of the response body, requests and decodes only gzip and deflate, and rejects other content encodings; pages whose Content-Length exceeds the limit are rejected before the body is read, and streamed pages that exceed the limit are rejected when the limit is exceeded.
robots.txt: By default, requests from the model (via tools) respect the website's robots.txt, while user-initiated requests (via prompts) do not. Every redirect hop fetched by the tool is checked against the target host's robots.txt. If the robots.txt request fails to connect, or returns 401, 403, or 5xx, the tool refuses to fetch; other 4xx are treated as no rules. This can be disabled with --ignore-robots-txt.
Custom configuration: --allowed-hosts can restrict fetching to specified hosts; entries can be exact hostnames, *. plus a domain (matching subdomains at any depth but not the domain itself), or IP addresses; wildcards apply only to domains. The allowlist and private address protection are two independent checks, and a request must pass both. --user-agent=YourUserAgent can customize the User-Agent. The timeout defaults to 30 seconds (30000 milliseconds), constraining connection and each read separately, not the entire download; it can be set at three levels, with the most specific taking precedence.
Protocol and runtime environment: The server supports two eras of Model Context Protocol simultaneously via stdio, with no configuration required: 2026-07-28 clients (discovered via server/discover, no session) and 2025-11-25 clients (initialize handshake), determined by the client's first request. Requires Python 3.11.5 or newer; uvx automatically obtains a suitable interpreter, while with pip it must be installed into an environment with 3.11.5 or newer. Node.js is optional; this makes the fetch server use a more robust HTML simplifier, whose JavaScript dependencies are installed via npm on first use, contacting the npm registry.
Usage: uv is recommended, with no specific installation required; run mcp-server-fetch directly with uvx; mcp-server-fetch can also be installed via pip, and after installation run as a scriptrun. It can be configured in Claude.app's settings, or in VS Code: for quick installation, use the one-click install button; for manual installation, add the JSON block to VS Code's User Settings (JSON) file, or add it to the workspace's .vscode/mcp.json file to share the configuration (when using mcp.json, the mcp key is required).
Use cases: let an LLM read web page content and convert it to Markdown, read long web pages in chunks to find information, and provide web scraping capabilities to models in MCP clients such as Claude.app or VS Code. Limitations include: private/internal addresses are inaccessible by default (requires --allow-private-ips), response body limit 5 MiB, only gzip and deflate content encodings supported, robots.txt respected by default, and Python 3.11.5 or newer required.