What it is
Fetch MCP Server is a Model Context Protocol server that lets LLMs retrieve and process content from web pages. It converts HTML to markdown for easier consumption. It exposes a fetch tool and a fetch prompt, and truncates responses, letting models read long pages in chunks through the start_index argument.
Who it's for
- Developers who want to give an MCP-capable LLM client (such as Claude.app or VS Code) the ability to read web pages
- Users who need long web pages read in chunks until the relevant information is found
Requirements
Requirements
- MCP Python SDK 1.x (
mcp>=1.29.0,<2); SDK 2.0 is not yet supported uv(usinguvx, recommended), or pip, or Docker to run the server- Optional: Node.js, which makes the server use a different, more robust HTML simplifier
Setup
Run with uvx (recommended)
With uv, no specific installation is needed; uvx runs mcp-server-fetch directly. Add this to your Claude settings.
json{ "mcpServers": { "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] } } }Install with pip
Alternatively, install mcp-server-fetch via pip.
bashpip install mcp-server-fetchRun the pip-installed server as a script
After installing with pip, run it as a module.
bashpython -m mcp_server_fetchConfigure with Docker
Add this to your Claude settings to run the server via Docker.
json{ "mcpServers": { "fetch": { "command": "docker", "args": ["run", "-i", "--rm", "mcp/fetch"] } } }Configure for VS Code (uvx)
Add this JSON block to your User Settings (JSON) file, or to
.vscode/mcp.jsonin your workspace to share it with others. Themcpkey is needed when using themcp.jsonfile.json{ "mcp": { "servers": { "fetch": { "command": "uvx", "args": ["mcp-server-fetch"] } } } }
Examples
Windows configuration with PYTHONIOENCODING
json{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}What it does: Setting PYTHONIOENCODING addresses character encoding issues that can cause the server to time out on Windows.
Debug with the MCP inspector
bashnpx @modelcontextprotocol/inspector uvx mcp-server-fetchWhat it does: Runs the MCP inspector against a uvx installation of the server to debug it.
Fetch tool arguments
Promptfetch(url=<URL>, max_length=5000, start_index=0, raw=false)Expected output: Shows the documented arguments of the fetch tool with their defaults. Only url is required. Raise start_index to read a truncated page in later chunks, or set raw to true to skip markdown conversion.
Pros & cons
Pros
- Pro:Converts HTML to markdown, making web content easier for LLMs to consume
- Pro:The
start_indexargument lets models read a truncated page in chunks - Pro:Can run via uvx, pip or Docker and is configurable for Claude.app and VS Code
- Pro:Customizable robots.txt behavior, user-agent and proxy via arguments
Cons
- Con:Can access local/internal IP addresses, which the README flags as a security risk that may expose sensitive data
- Con:Requires MCP Python SDK 1.x; the port to SDK 2.0 is still in progress
- Con:Responses are truncated (default max_length is 5000 characters), so longer pages need multiple calls
Images
