F

Fetch MCP Server

Fetches web content and converts it to LLM-friendly formats. Retrieves web pages, API responses, and online documentation, converting HTML to clean markdown for efficient token usage and better comprehension.

MCPAnthropicapiv1.0.0MIT
0 views0 copies

MCP Server Configuration

{ "mcpServers": { "fetch": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-fetch"] } } }

With Custom User Agent

{ "mcpServers": { "fetch": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-fetch"], "env": { "USER_AGENT": "Claude-Code-Fetch/1.0" } } } }

Available Tools

ToolDescription
fetchFetch a URL and return content in LLM-friendly format

Tool Parameters

{ "url": "string β€” The URL to fetch", "max_length": "integer (optional) β€” Maximum content length in characters", "start_index": "integer (optional) β€” Start reading from this character position", "raw": "boolean (optional) β€” Return raw content without markdown conversion" }

Example Usage

# Fetch a documentation page (auto-converts HTML to markdown)
fetch: { url: "https://docs.example.com/api/auth" }

# Fetch API response (JSON)
fetch: { url: "https://api.example.com/status", raw: true }

# Fetch with length limit (for large pages)
fetch: { url: "https://example.com/long-article", max_length: 5000 }

# Paginated reading of long content
fetch: { url: "https://example.com/docs", max_length: 5000, start_index: 0 }
fetch: { url: "https://example.com/docs", max_length: 5000, start_index: 5000 }

Setup

  1. Add the configuration to .claude/settings.json
  2. No API keys required
  3. Requires network access for fetching URLs

Use Cases

  • Documentation lookup β€” Fetch library docs, API references, changelogs
  • API responses β€” Check endpoint responses, verify API behavior
  • Content extraction β€” Pull text from web pages for analysis
  • Research β€” Read online articles, blog posts, release notes

Security Notes

  • Respects robots.txt by default
  • Follows redirects (up to a reasonable limit)
  • Does not execute JavaScript β€” only fetches static content
  • Be mindful of rate limiting on target sites
  • Do not use to fetch pages requiring authentication (no cookie/session support)
  • Content is processed locally β€” not stored or forwarded to third parties
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates