# Fetch — MCP Server

> Fetch any URL and hand the model clean markdown instead of HTML.

**Source:** https://mcpplaygroundonline.com/mcp-servers/fetch  
**Transport:** stdio  
**Requires auth:** No

---

## What it does

The fetch server retrieves a single URL and simplifies the result before the model ever sees it, converting HTML into markdown so a page costs a fraction of the tokens raw markup would. Long pages are handled with a start_index cursor and a max_length cap: the model reads a chunk, and if the response was truncated it calls again from where it stopped, which lets it work through a long article without blowing the context window. A raw flag returns unconverted content when you actually need the markup. By default the server honours the target site robots.txt for model-initiated requests and identifies itself with an MCP user agent; both behaviours are configurable, and the server distinguishes requests the model made on its own from ones a user explicitly asked for.

## Tools exposed

- fetch — retrieve a URL and return its content as markdown
- url — the target address, the only required argument
- max_length — cap the characters returned so a long page cannot flood context
- start_index — resume from a character offset to page through long documents
- raw — skip the markdown conversion and return the content as served

## Example queries you can run

- "Read this changelog URL and tell me what changed in the last two releases."
- "Fetch this RFC and summarise the sections that concern authentication."
- "Open this blog post and pull out every code block."
- "Read this long documentation page in chunks and list the configuration options."

## Details

- **Recommended model:** google/gemini-3.8-flash — Fetching is a cheap, high-volume operation over long pages. Gemini Flash reads a full article for a fraction of the cost of a frontier model.
- **Transport:** stdio
- **Authentication:** Not required — No credentials. The server fetches public URLs; it has no way to authenticate to a site that needs a login.
- **Official source:** [Fetch MCP Server — official reference implementation](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch)

## Connecting to Fetch

### Client configuration

**uvx (recommended)**

uvx builds a temporary environment and runs the published package — nothing to install first.

```
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch"]
    }
  }
}
```

**Ignore robots.txt (use deliberately)**

Only for sites you own or have permission to crawl. The default is to honour robots.txt on model-initiated requests.

```
{
  "mcpServers": {
    "fetch": {
      "command": "uvx",
      "args": ["mcp-server-fetch", "--ignore-robots-txt"]
    }
  }
}
```

## Frequently asked questions

### What is the fetch MCP server?

It is an official reference server from the Model Context Protocol project, published on PyPI as mcp-server-fetch. It retrieves a single URL and converts it to markdown so a model can read the content without wading through HTML.

### How does it handle pages longer than the context window?

It truncates at max_length and tells the model where it stopped. The model then calls fetch again with a start_index at that offset, so it can page through a long document in sequence rather than failing on it.

### Does it respect robots.txt?

Yes, by default, for requests the model initiates on its own. The --ignore-robots-txt flag disables that check. The server also treats a URL the user explicitly asked for differently from one the model chose itself.

### Can it fetch pages that need JavaScript?

No. It is a plain HTTP fetch with HTML-to-markdown conversion, so a client-rendered app returns an empty shell. Use a browser-driving server like Playwright, or a rendering service like Firecrawl, when the content only exists after JavaScript runs.

### Is fetching a URL into a model safe?

The content is untrusted by definition. A page can contain text crafted to read as an instruction to your agent. Keep fetch away from tools that can write or spend, and inspect the tool traffic in MCP Agent Studio before trusting it in an autonomous loop.

---

_Test this server across 40+ models on MCP Playground: https://mcpplaygroundonline.com/mcp-servers/fetch — free, no install._
