Get the FREE Ultimate OpenClaw Setup Guide →

fetch

A flexible HTTP fetching Model Context Protocol server.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zcaceres-fetch-mcp npx mcp-fetch-server \
  --env DEFAULT_LIMIT="50000"

How to use

This MCP server provides utilities to fetch and transform web content in multiple formats. It exposes tools to retrieve HTML, JSON, plain text, or Markdown from a given URL: fetch_html returns raw HTML, fetch_json fetches and parses JSON, fetch_txt returns plain text with HTML elements removed, and fetch_markdown converts the page content into Markdown. Each tool accepts common options such as url, optional headers, a max_length limit (default 5000, adjustable via DEFAULT_LIMIT), and a start_index for chunked retrieval. The server is designed to run on demand without persisting resources, making it suitable for integration with desktop apps or other MCP clients. To use it via the MCP configuration, point your app to the fetch server entry (see example in the installation section) and pass the appropriate tool command and parameters to fetch content in the desired format.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Basic familiarity with running npm-based servers

Steps:

  1. Clone the repository or install the MCP server package:
git clone <repository-url>
cd <repository-directory>
  1. Install dependencies:
npm install
  1. Build the server (if applicable):
npm run build
  1. Start the server locally to verify it runs:
npm start
  1. Integrate with your MCP client by using the provided mcp_config example (see below).

Additional notes

Notes:

  • The server supports a DEFAULT_LIMIT environment variable to control the default maximum fetch size. Set it via the mcp config to tailor limits for your environment.
  • No persistent resources are created by this server; content is fetched on demand and transformed in real time.
  • Dependencies mentioned in README (JSDOM for HTML parsing and TurndownService for Markdown conversion) are used internally; ensure your environment allows those packages to run.
  • If you encounter network or CORS-related issues while fetching, you may adjust the headers option per request.
  • When embedding in a desktop app configuration, you can override DEFAULT_LIMIT per the example to suit your app’s performance needs.

Related MCP Servers

Sponsor this space

Reach thousands of developers