What Fetch MCP actually is
Fetch MCP is the official Model Context Protocol reference server for retrieving a URL and converting the page to markdown. It is for developers who already have Claude Desktop, VS Code, or another MCP client and need a current public page inside the chat. It is not a browser-automation stack, not a search engine, and not a generic scraping framework.
AgentSkillsHub already has a catalog record at /skills/fetch/. That page is a skill profile. This guide exists because search queries such as fetch mcp and fetch mcp server need the install contract: the live package name, the client JSON, the first safe test, and the network warning from the official README.
How to choose the right Fetch MCP setup
The decision has four parts: package, runner, client JSON, and first URL. The package should stay mcp-server-fetch. The runner is usually uvx. The client decides whether the outer key is mcpServers or mcp.servers. The first URL should be a public page you already trust.
Reject the npm package name
If a directory, plugin page, or AI answer shows npx -y @modelcontextprotocol/server-fetch, stop. That scoped npm package was not published when this page was reviewed.
Install or launch with uvx
The official first path is uvx mcp-server-fetch. You do not need a separate global install when uv is available.
Add the client JSON
Claude Desktop uses mcpServers. VS Code mcp.json wraps the same command under mcp.servers. Keep the package name mcp-server-fetch in both cases.
Run one public-page smoke test
Restart the client, confirm the fetch tool is visible, then fetch a public documentation URL. Do not start with localhost, 127.0.0.1, cloud metadata hosts, or admin panels.
Recommended uvx launch
uvx mcp-server-fetch
Official recommended path. No separate global install is required when uv is available.
Claude Desktop config
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}Use this when the desktop client can launch uvx directly.
VS Code mcp.json
{
"mcp": {
"servers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
}
}The mcp key is required in a workspace mcp.json file. User settings omit that wrapper.
Windows encoding fix
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"],
"env": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}Add this env block when a Windows client times out after launch.
Docker alternative
{
"mcpServers": {
"fetch": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/fetch"]
}
}
}Use the official mcp/fetch image when you want a container boundary around outbound requests.
Pip fallback
pip install mcp-server-fetch && python -m mcp_server_fetch
Use this when uvx is unavailable but Python 3.10+ and pip are managed on the machine.
Inspector smoke test
npx @modelcontextprotocol/inspector uvx mcp-server-fetch
Use the official inspector when the desktop client starts but the fetch tool never appears.
Optional proxy
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": [
"mcp-server-fetch",
"--proxy-url=http://127.0.0.1:7890"
]
}
}
}Add --proxy-url only when your network requires it. This is not a default production setting.
What the fetch tool can return
The official tool list is small on purpose. Fetch MCP is a retrieval helper, not a full browser. After install, the client should expose one fetch tool and an optional fetch prompt. Official docs also note that installing Node.js can switch the server to a more robust HTML simplifier.
url
Required. The page the server should retrieve.
max_length
Optional. Default 5000 characters. Keep this small until you know the page is safe and useful.
start_index
Optional. Continue a long page from a later character offset instead of asking for the whole document.
raw
Optional. Returns raw content without markdown conversion. Use only when HTML structure itself is the evidence.
Fetch vs Git vs Filesystem vs Memory
These official reference-server queries sit next to each other in search data, but the jobs are different. Keep the install pages separate and link them instead of collapsing every package into one generic MCP article.
| Server | Use | Best when | Main risk |
|---|---|---|---|
| Fetch | Pull a URL and convert HTML to markdown | The assistant needs current public docs, changelogs, or pricing pages | Can reach local and internal IP addresses |
| Git | Inspect status, diffs, logs, and commits | The job is repository review, not web retrieval | Write tools can stage and commit |
| Filesystem | Read or edit files inside allowed directories | The content already lives on disk | Broad folder roots expose unrelated files |
| Memory | Store entities and observations across chats | You need durable facts, not a live webpage | Stale or sensitive memories steer later answers |
Worked examples
Read current official docs
After the client restarts, ask it to fetch the official Fetch server README and summarize the install command, tool arguments, and caution note. This confirms both the network path and that the assistant is reading the live source instead of an old npm snippet.
Compare two public changelogs
Fetch two public release pages, then ask for a table of version, date, and breaking change. Keep max_length modest and use start_index if the first chunk cuts off the version history.
Team pilot with a proxy
Corporate networks often need --proxy-url. Document the proxy, keep robots.txt on, and write down the rollback: remove the fetch server from the client JSON and restart.
Common errors and fixes
The client cannot start Fetch MCP.
Likely cause: The config still uses the unpublished npm package, or uvx is not on the app PATH.
Fix: Replace the command with uvx mcp-server-fetch. If the desktop app cannot see uvx, use the full uvx path or the pip/Docker fallback.
Windows clients time out after launch.
Likely cause: Python output encoding is not UTF-8.
Fix: Add PYTHONIOENCODING=utf-8 to the server env block, save, and fully restart the client.
The tool returns a truncated page.
Likely cause: The default max_length is 5000 characters.
Fix: Use start_index to read the next chunk, or raise max_length only after you confirm the URL is the intended public page.
The fetch looks blocked or incomplete.
Likely cause: robots.txt blocked a model-initiated request, or a proxy is required.
Fix: Check the site robots rules first. Add --proxy-url only when your network requires it. Do not disable robots.txt by default.