Fetch MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add fetch-mcp -- node "<FULL_PATH_TO_FETCH_MCP>/dist/index.js"

Replace <FULL_PATH_TO_FETCH_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Fetch and convert web content into HTML, JSON, plain text, and Markdown.

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.

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
    • 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
    • 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
    • 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
    • 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.

Usage with Desktop App

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

{
  "mcpServers": {
    "fetch": {
      "command": "node",
      "args": [
        "{ABSOLUTE PATH TO FILE HERE}/dist/index.js"
      ]
    }
  }
}

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.

Tools (4)

fetch_htmlFetch a website and return the content as HTML
fetch_jsonFetch a JSON file from a URL
fetch_txtFetch a website and return the content as plain text
fetch_markdownFetch a website and return the content as Markdown

Configuration

claude_desktop_config.json
{"mcpServers": {"fetch": {"command": "node", "args": ["{ABSOLUTE PATH TO FILE HERE}/dist/index.js"]}}}

Try it

Fetch the content of https://example.com and convert it to Markdown for me.
Get the raw HTML from https://news.ycombinator.com.
Fetch the JSON data from this API endpoint: https://api.example.com/data.
Retrieve the text content from https://wikipedia.org/wiki/Main_Page without any HTML tags.

Frequently Asked Questions

What are the key features of Fetch MCP Server?

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.

What can I use Fetch MCP Server for?

Converting complex web pages into clean Markdown for LLM analysis.. Extracting raw text from websites to summarize articles or blog posts.. Retrieving JSON data from public APIs directly into the chat interface.. Scraping specific HTML elements or structures for data processing tasks..

How do I install Fetch MCP Server?

Install Fetch MCP Server by running: npm install && npm run build

What MCP clients work with Fetch MCP Server?

Fetch MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Fetch MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare