# Fetch MCP (`mcp-fetch-server` v2.0.0) > Fetch the public web in agent-ready formats. Lightweight, agent-friendly MCP server (`mcp-fetch-server`, supporting `stdio` and `2025-11-25` Streamable HTTP) and local CLI (`mcp-fetch`) for HTML, Markdown, Mozilla Readability articles, plain text, JSON, and YouTube transcripts—with custom headers, HTTP/SOCKS proxies, pagination, and built-in SSRF protection. Supports Node.js `>= 22` LTS and Bun. - Site: https://fetch.zach.dev - Source: https://github.com/zcaceres/fetch-mcp - Package: https://www.npmjs.com/package/mcp-fetch-server - Author: https://zach.dev | X: https://x.com/zachcaceres | GitHub: https://github.com/zcaceres - Requirements & Invariants: https://github.com/zcaceres/fetch-mcp/blob/main/REQUIREMENTS.md - README: https://github.com/zcaceres/fetch-mcp/blob/main/README.md ## Quickstart ### MCP Server (`stdio`) ```json { "mcpServers": { "fetch": { "command": "npx", "args": ["mcp-fetch-server"] } } } ``` ### MCP Server (Streamable HTTP — `2025-11-25`) ```bash npx mcp-fetch-server --http --host 127.0.0.1 --port 3000 ``` - Endpoint: `POST /mcp` (stateless per-request handling; defaults to `127.0.0.1:3000`). - Flags: `--http` (enable Streamable HTTP), `--host ` (default `127.0.0.1`, requires `--http`), `--port ` (`1`–`65535`, default `3000`, requires `--http`). - Guards: Validates `Host` and `Origin` against the bound address (`403` on mismatch to prevent localhost DNS rebinding). Unknown paths (including legacy `/sse`) return `404`; non-`POST` methods return `405`. ### Local CLI (`mcp-fetch`) ```bash npx -p mcp-fetch-server mcp-fetch [flags] # Or install globally: npm install -g mcp-fetch-server mcp-fetch readable https://example.com/blog/post mcp-fetch transcript 'https://www.youtube.com/watch?v=jNQXAC9IVRw' --lang en ``` ## MCP Tools All tools conform to MCP `2025-11-25` (Anthropic, Google Gemini, OpenAI compatible), carry read-only annotations (`readOnlyHint: true`, `destructiveHint: false`, `idempotentHint: true`, `openWorldHint: true`), and enforce `additionalProperties: false`. - `fetch_html`: Fetch a public URL and return its unmodified UTF-8 HTML content. - `fetch_markdown`: Fetch a public URL, strip `