Back to MCP Catalog

Fetch Web Content MCP Server

Developer ToolsTypeScript
A flexible HTTP fetching service that retrieves web content in various formats
Available Tools

fetch_html

Fetches a website and returns the content as HTML

urlheaders

fetch_json

Fetches a JSON file from a URL and returns the parsed JSON content

urlheaders

fetch_txt

Fetches a website and returns the content as plain text with HTML tags, scripts, and styles removed

urlheaders

fetch_markdown

Fetches a website and returns the content converted to Markdown format

urlheaders

Fetch Web Content is a versatile tool that enables you to retrieve and transform web content from any URL. It supports multiple output formats including HTML, plain text, JSON, and Markdown, making it ideal for data extraction and content processing workflows. With support for custom headers and flexible formatting options, this tool simplifies the process of integrating external web content into your applications. Whether you need raw HTML for parsing, clean text for analysis, or formatted Markdown for display, Fetch Web Content provides a streamlined interface for all your web content needs.

Overview

Fetch Web Content provides a simple yet powerful way to retrieve content from websites and web APIs in various formats. This tool is particularly useful for data extraction, content aggregation, and integrating external web content into your applications.

Installation

To install and use the Fetch Web Content server:

  1. Add the following configuration to your application:
{
  "mcpServers": {
    "fetch": {
      "command": "node",
      "args": [
        "/path/to/fetch-mcp/dist/index.js"
      ]
    }
  }
}

Replace /path/to/fetch-mcp/dist/index.js with the absolute path to the server's index.js file after building the project.

Setup from Source

If you prefer to build the server from source:

  1. Clone the repository:

    git clone https://github.com/zcaceres/fetch-mcp.git
    
  2. Install dependencies:

    npm install
    
  3. Build the server:

    npm run build
    
  4. Start the server:

    npm start
    

Usage

The Fetch Web Content server provides four main tools for retrieving web content in different formats:

  • fetch_html: Retrieves the raw HTML content of a webpage
  • fetch_txt: Extracts plain text content from a webpage (removes HTML tags, scripts, and styles)
  • fetch_json: Fetches and parses JSON data from a URL
  • fetch_markdown: Converts webpage content to Markdown format

Each tool accepts a required url parameter and an optional headers parameter for customizing the HTTP request.

Features

  • Multiple Output Formats: Choose between HTML, plain text, JSON, or Markdown based on your needs
  • Custom Headers: Add authentication tokens, user agents, or other HTTP headers to your requests
  • Modern Fetch API: Uses the latest web standards for HTTP requests
  • HTML Parsing: Leverages JSDOM for robust HTML processing
  • Markdown Conversion: Transforms HTML content into clean, readable Markdown

Development

For development purposes:

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

Related MCPs

Apple Shortcuts
Developer ToolsJavaScript

Control Apple Shortcuts automations from AI assistants

Clojars Dependency Lookup
Developer ToolsJavaScript

Fetch dependency information from Clojars, the Clojure community's artifact repository

Simple Timeserver
Developer ToolsPython

Provides Claude with current time and timezone information

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.