fetch_html_to_markdown
Fetch a URL, decode HTML, and convert it to clean markdown for LLM use. Strips scripts, styles, nav, and footer while preserving headings, lists, links, and code.
Instructions
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to fetch | |
| max_bytes | No | Max response size in bytes (default 5MiB) | |
| timeout_ms | No | Timeout in ms for the request, covering DNS, every redirect hop and the body (default 10000) | |
| user_agent | No | User-Agent override | |
| max_redirects | No | Max redirect hops (default 5) | |
| allow_private_hosts | No | Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way. |