Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Fetches web content and returns it in HTML, JSON, plain text, or Markdown format.

README.md

Fetch MCP Server

!fetch mcp logo

This MCP server provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.

Available on NPM

<a href="https://glama.ai/mcp/servers/nu09wf23ao"> <img width="380" height="200" src="https://glama.ai/mcp/servers/nu09wf23ao/badge" alt="Fetch Server MCP server" /> </a>

Components

Tools

  • fetch_html
  • Fetch a website and return the content as HTML
  • Input:
  • url (string, required): URL of the website to fetch
  • headers (object, optional): Custom headers to include in the request
  • max_length (number, optional): Maximum length to fetch (default 5000, can change via environment variable)
  • start_index (number, optional): Used together with max_length to retrieve contents piece by piece, 0 by default
  • Returns the raw HTML content of the webpage
  • fetch_json
  • Fetch a JSON file from a URL
  • Input:
  • url (string, required): URL of the JSON to fetch
  • headers (object, optional): Custom headers to include in the request
  • max_length (number, optional): Maximum length to fetch (default 5000, can change via environment variable)
  • start_index (number, optional): Used together with max_length to retrieve contents piece by piece, 0 by default
  • Returns the parsed JSON content
  • fetch_txt
  • Fetch a website and return the content as plain text (no HTML)
  • Input:
  • url (string, required): URL of the website to fetch
  • headers (object, optional): Custom headers to include in the request
  • max_length (number, optional): Maximum length to fetch (default 5000, can change via environment variable)
  • start_index (number, optional): Used together with max_length to retrieve contents piece by piece, 0 by default
  • Returns the text content of the webpage with HTML tags, scripts, and styles removed
  • fetch_markdown
  • Fetch a website and return the content as Markdown
  • Input:
  • url (string, required): URL of the website to fetch
  • headers (object, optional): Custom headers to include in the request
  • max_length (number, optional): Maximum length to fetch (default 5000, can change via environment variable)
  • start_index (number, optional): Used together with max_length to retrieve contents piece by piece, 0 by default
  • Returns the content of the webpage converted to Markdown format

Resources

This server does not provide any persistent resources. It's designed to fetch and transform web content on demand.

Getting started

  1. Clone the repository
  2. Install dependencies: npm install
  3. Build the server: npm run build

Usage

To use the server, you can run it directly:

npm start

This will start the Fetch MCP Server running on stdio.

Environment variables

  • DEFAULT_LIMIT - sets the default size limit for the fetch (0 = no limit)

Usage with Desktop App

To integrate this server with a desktop app, add the following to your app's server configuration:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": [
        "mcp-fetch-server"
      ], 
      "env": {
        "DEFAULT_LIMIT": "50000" // optionally change default limit
      }
    }
  }
}

Features

  • Fetches web content using modern fetch API
  • Supports custom headers for requests
  • Provides content in multiple formats: HTML, JSON, plain text, and Markdown
  • Uses JSDOM for HTML parsing and text extraction
  • Uses TurndownService for HTML to Markdown conversion

Development

  • Run npm run dev to start the TypeScript compiler in watch mode
  • Use npm test to run the test suite

License

This project is licensed under the MIT License.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Browser & Scraping servers.