MCP Library updated 11 min read

Fetch MCP Server: Web Content Retrieval for AI

Enable AI to fetch and read web content. Learn how to retrieve documentation, articles, and API responses using the Fetch MCP Server.

RP

Rajesh Praharaj

Aug 5, 2025 · Updated Dec 27, 2025

Fetch MCP Server: Web Content Retrieval for AI

TL;DR - Fetch MCP Quick Start

Give AI the ability to read the web - Fetch URLs and process content.

🆕 2025: Fetch MCP now uses Streamable HTTP transport (JSON-RPC 2.0). Part of the Agentic AI Foundation ecosystem. For an introduction to MCP, see the MCP Introduction guide.

Quick Setup:

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

What you can do:

  • 🌐 Fetch: Retrieve any URL content
  • 📄 Convert: HTML to markdown automatically
  • 📚 Documentation: Read technical docs
  • 🔗 APIs: Make HTTP requests
  • 📰 Content: Read articles and pages

Example conversation:

You: Fetch the Astro docs homepage and summarize what Astro is

Claude: I'll fetch the documentation...

        **Astro Overview** (from docs.astro.build)
        
        Astro is a web framework for building content-focused 
        websites. Key features:
        - Zero JavaScript by default
        - Component Islands architecture
        - Supports React, Vue, Svelte, etc.
        - Built-in optimizations
        ...

💡 Simple and fast - For static content. Use Playwright for dynamic sites.

🤖 Universal: Works with Claude, ChatGPT, GitHub Copilot, Gemini, and all MCP-compatible AI tools.


When to Use Fetch vs Playwright

Understanding when to use each:

Use Fetch MCP When…Use Playwright MCP When…
Reading static pagesSite requires JavaScript
Fetching documentationNeed to fill forms
Making API callsNeed to click buttons
Getting JSON responsesNeed screenshots
Simple HTTP requestsInteractive automation
Fast, lightweightFull browser needed

Decision Flowchart

Need to read web content?


Does it require JavaScript?

    ┌────┴────┐
    ▼         ▼
   No        Yes
    │         │
    ▼         ▼
Fetch MCP   Playwright MCP

Installation & Configuration

Prerequisites

  • Node.js v18+ (check with node --version)
  • MCP-compatible client (Claude Desktop, ChatGPT, Cursor, Copilot, Gemini, etc.)

Basic Setup

Add to claude_desktop_config.json:

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

With Custom User-Agent

Some sites require a specific user agent:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"],
      "env": {
        "USER_AGENT": "Mozilla/5.0 (compatible; MyCrawler/1.0)"
      }
    }
  }
}

Verify Installation

Restart your AI client and test:

You: Fetch example.com and show me what's there

Claude: Fetched example.com:

        # Example Domain
        
        This domain is for use in illustrative examples 
        in documents. You may use this domain in literature 
        without prior coordination or asking for permission.
        
        [More information...](https://www.iana.org/domains/example)

Available Tools

Primary Tool

ToolDescriptionExample Prompt
fetchRetrieve URL content”Fetch the React docs homepage”

Request Options

OptionDescriptionUse Case
urlTarget URLRequired
headersCustom HTTP headersAPI auth, user-agent
timeoutRequest timeout (ms)Slow sites

Response Format

Fetch MCP automatically:

  • Converts HTML to markdown
  • Preserves JSON as-is
  • Handles plain text
  • Extracts main content when possible

Practical Workflows

Workflow 1: Documentation Research

Read and summarize technical docs. For more on working with AI assistants for research, see the AI Search Engines guide.

You: Fetch the Next.js App Router documentation and explain 
     how routing works

Claude: Fetching Next.js App Router docs...

        **Next.js App Router - Routing**
        
        The App Router uses a file-system based router:
        
        **Key Concepts:**
        
        1. **Folder Structure = Routes**
           - `app/page.tsx` → `/`
           - `app/about/page.tsx` → `/about`
           - `app/blog/[slug]/page.tsx` → `/blog/:slug`
        
        2. **Special Files:**
           - `page.tsx` - Route UI
           - `layout.tsx` - Shared layout
           - `loading.tsx` - Loading UI
           - `error.tsx` - Error boundary
        
        3. **Route Groups:**
           - `(folder)` - Group without affecting URL
           
        4. **Dynamic Routes:**
           - `[param]` - Dynamic segment
           - `[...slug]` - Catch-all
           - `[[...slug]]` - Optional catch-all

Workflow 2: API Documentation

Fetch and understand APIs:

You: Fetch the GitHub REST API docs for creating issues 
     and show me the endpoint details

Claude: Fetching GitHub API documentation...

        **Create an Issue - GitHub REST API**
        
        **Endpoint:**

POST /repos/:owner/:repo/issues


**Parameters:**
| Name | Type | Required | Description |
|------|------|----------|-------------|
| title | string | Yes | Issue title |
| body | string | No | Issue content |
| labels | array | No | Label names |
| assignees | array | No | User logins |
| milestone | integer | No | Milestone number |

**Example Request:**
```json
{
  "title": "Found a bug",
  "body": "Description here",
  "labels": ["bug"],
  "assignees": ["octocat"]
}

Response: 201 Created with issue object


### Workflow 3: Competitive Research

Gather information from websites:

```text
You: Fetch the pricing pages from these tools and compare them:
     - notion.so/pricing
     - airtable.com/pricing
     - coda.io/pricing

Claude: Fetching pricing pages...

        **Pricing Comparison**
        
        | Feature | Notion | Airtable | Coda |
        |---------|--------|----------|------|
        | Free tier | ✅ | ✅ | ✅ |
        | Personal Pro | $10/mo | $20/mo | $10/mo |
        | Team | $18/user/mo | $20/user/mo | $30/user/mo |
        | Storage | Unlimited | 5GB (Pro) | Unlimited |
        
        **Key Differences:**
        - Notion: Best for docs and wikis
        - Airtable: Best for structured data
        - Coda: Best for mixed documents + data

Workflow 4: News and Content Aggregation

Read articles and summarize. For more productivity tips, see the AI for Everyday Productivity guide.

You: Fetch the Hacker News front page and summarize the 
     top 5 stories

Claude: Fetching Hacker News...

        **Top 5 Stories on Hacker News**
        
        1. **"PostgreSQL 17 Released"** (342 points)
           New features: JSON improvements, performance gains
           
        2. **"Why SQLite Is Great for Edge Computing"** (287 pts)
           Discussion on using SQLite in serverless environments
           
        3. **"Building a Compiler in Rust"** (256 points)
           Tutorial series on compiler construction
           
        4. **"The Hidden Costs of Cloud Computing"** (234 pts)
           Analysis of true cloud infrastructure costs
           
        5. **"Show HN: AI Code Review Tool"** (201 points)
           Open-source tool for automated PR reviews

Workflow 5: Local Development

Fetch from local services:

You: Fetch http://localhost:3000/api/health and check 
     if my service is running

Claude: Fetching local API...

        **Health Check Response:**
        
        ```json
        {
          "status": "healthy",
          "version": "2.1.0",
          "uptime": "2 days, 3 hours",
          "database": "connected",
          "cache": "connected"
        }

✅ All systems operational!


---

## Example Prompts

### Documentation

```text
# Official docs
"Fetch the React Hooks documentation"
"Get the Python requests library tutorial"
"Read the Docker Compose file reference"

# API references
"Fetch the Stripe API docs for creating payments"
"Get the OpenAI API rate limits page"
"Read the AWS S3 API reference"

# Tutorials
"Fetch a TypeScript generics tutorial"
"Get the Tailwind CSS installation guide"
"Read the PostgreSQL indexing best practices"

Web Content

# Articles
"Fetch this blog post and summarize it"
"Read the Medium article at this URL"
"Get the content from this tech blog"

# Company pages
"Fetch the about page from company.com"
"Read the careers page for TechCorp"
"Get the product features from startup.io"

# Comparisons
"Fetch pricing from these 3 competitors"
"Read the feature comparison at URL"
"Get release notes from these projects"

APIs and Services

# API endpoints
"Fetch http://localhost:3000/api/users"
"Get the JSON from this public API"
"Read the response from my test endpoint"

# Status pages
"Fetch the GitHub status page"
"Check the AWS service health"
"Read the Cloudflare system status"

# Data feeds
"Fetch the latest posts from this RSS feed"
"Get the JSON data from this endpoint"
"Read the XML sitemap from this site"

Working with Different Content Types

HTML (Converted to Markdown)

You: Fetch https://example.com/about

Claude: **About Us**
        
        We are a company that...
        
        [Content converted from HTML to markdown]

JSON (Preserved)

You: Fetch https://api.example.com/data

Claude: ```json
        {
          "users": 1234,
          "status": "active",
          "data": [...]
        }

### Plain Text

```text
You: Fetch a robots.txt file

Claude: ```
        User-agent: *
        Disallow: /private/
        Allow: /public/
        Sitemap: https://example.com/sitemap.xml

---

## Advanced Configuration

### Custom Headers for API Access

For APIs requiring authentication:

```text
You: Fetch this API with the bearer token xyz123

Claude: I'll fetch with authorization header...

        [Makes request with Authorization: Bearer xyz123]

Handling Timeouts

For slow sites:

You: Fetch this page with a 30-second timeout

Claude: Fetching with extended timeout...

Multiple URLs

Batch fetching:

You: Fetch these three pages and compare them:
     1. docs.react.dev
     2. vuejs.org
     3. svelte.dev

Claude: Fetching documentation sites...

        **Framework Comparison:**
        
        | Aspect | React | Vue | Svelte |
        |--------|-------|-----|--------|
        | Paradigm | Component | Component | Compiler |
        | Learning Curve | Medium | Lower | Lower |
        | Size | Larger | Medium | Smallest |
        ...

Combining with Other MCPs

Fetch + Filesystem

Save fetched content. For more on file organization, see the AI-Powered Workflows guide.

You: Fetch the API documentation and save it as a markdown file

Claude: [Uses Fetch to get documentation]
        [Uses Filesystem to save file]
        
        Saved API documentation to:
        /docs/external-api-reference.md
        
        - 2,340 words
        - Includes 15 endpoint descriptions
        - Formatted as markdown

Fetch + Memory

Remember useful resources:

You: Fetch this documentation and remember the key concepts

Claude: [Uses Fetch to read docs]
        [Uses Memory to store concepts]
        
        Fetched and memorized:
        - Authentication patterns
        - Rate limiting rules
        - Error code meanings
        
        I'll remember these for future reference!

Fetch + Slack

Share findings with team:

You: Fetch the latest changelog and post a summary to #dev

Claude: [Uses Fetch to read changelog]
        [Uses Slack to post summary]
        
        Posted to #dev:
        
        📢 **Latest Release Notes**
        - Feature: New dashboard widgets
        - Fix: Memory leak in worker process
        - Improvement: 30% faster API responses

Troubleshooting

Issue: “Unable to fetch URL”

Symptoms: Request fails

Solutions:

CauseSolution
URL unreachableCheck URL is correct and site is up
HTTPS requiredUse https:// not http://
Firewall blockingCheck network/proxy settings
Site blocking botsMay need different user-agent

Issue: “Timeout”

Symptoms: Request takes too long

Solutions:

  • Increase timeout setting
  • Check if site is slow
  • Try alternative URL/mirror
  • Site may be blocking

Issue: “Content not readable”

Symptoms: Returns garbled or empty content

Solutions:

CauseSolution
JavaScript-renderedUse Playwright MCP instead
Login requiredCan’t fetch without auth
Anti-bot protectionMay need headers/cookies
Binary contentFetch returns text only

Best Practices

Respectful Fetching

✅ Do❌ Don’t
Check robots.txtIgnore site policies
Add delays between requestsRapid-fire requests
Cache repeated fetchesFetch same URL repeatedly
Use for legitimate purposesScrape personal data

Efficient Usage

PracticeWhy
Be specific”Fetch the pricing page” not “fetch the whole site”
Cache locallySave content if you’ll reference it again
Use appropriate toolPlaywright for dynamic content
Check freshnessSites change - refetch if needed

For more on responsible AI tool usage, see the Understanding AI Safety, Ethics, and Limitations guide.


ServerComplements Fetch By…
Playwright MCPJavaScript-heavy sites
Firecrawl MCPDeep crawling
Filesystem MCPSaving fetched content
Memory MCPRemembering key info

Summary

The Fetch MCP Server enables simple web content retrieval:

  • HTTP requests to any URL
  • Auto-conversion from HTML to markdown
  • JSON support for APIs
  • Fast and lightweight - no browser needed
  • Great for docs - perfect for technical documentation
  • Universal support - Claude, ChatGPT, Copilot, Gemini

2025 Updates:

  • Streamable HTTP transport (JSON-RPC 2.0)
  • Part of Agentic AI Foundation (Linux Foundation)
  • Works with all major AI platforms
  • Enhanced security via OAuth 2.0

Best use cases:

  • Reading documentation
  • Fetching API responses
  • Gathering web content
  • Competitive research
  • Checking local services

When to use Playwright instead:

  • JavaScript-rendered content
  • Interactive automation
  • Form submission
  • Screenshot capture

Next: Learn about Firecrawl MCP Server → for deep website crawling.


Questions about Fetch MCP? Check the source code on GitHub or the MCP specification.

Was this page helpful?

Let us know if you found what you were looking for.