Cover image
Try Now
2025-03-22

MCP Server pour récupérer le contenu de la page Web avec une capacité d'exploration récursive

3 years

Works with Finder

1

Github Watches

1

Github Forks

4

Github Stars

Docs Fetch MCP Server

A Model Context Protocol (MCP) server for fetching web content with recursive exploration capabilities. This server enables LLMs to autonomously explore web pages and documentation to learn about specific topics.

Overview

The Docs Fetch MCP Server provides a simple but powerful way for LLMs to retrieve and explore web content. It enables:

  • Fetching clean, readable content from any web page
  • Recursive exploration of linked pages up to a specified depth
  • Same-domain link traversal to gather comprehensive information
  • Smart filtering of navigation links to focus on content-rich pages

This tool is particularly useful when users want an LLM to learn about a specific topic by exploring documentation or web content.

Features

  • Content Extraction: Cleanly extracts the main content from web pages, removing distractions like navigation, ads, and irrelevant elements
  • Link Analysis: Identifies and extracts links from the page, assessing their relevance
  • Recursive Exploration: Follows links to related content within the same domain, up to a specified depth
  • Parallel Processing: Efficiently crawls content with concurrent requests and proper error handling
  • Robust Error Handling: Gracefully handles network issues, timeouts, and malformed pages
  • Dual-Strategy Approach: Uses fast axios requests first with puppeteer as a fallback for more complex pages
  • Timeout Prevention: Implements global timeout handling to ensure reliable operation within MCP time limits
  • Partial Results: Returns available content even when some pages fail to load completely

Usage

The server exposes a single MCP tool:

fetch_doc_content

Fetches web page content with the ability to explore linked pages up to a specified depth.

Parameters:

  • url (string, required): URL of the web page to fetch
  • depth (number, optional, default: 1): Maximum depth of directory/link exploration (1-5)

Returns:

{
  "rootUrl": "https://example.com/docs",
  "explorationDepth": 2,
  "pagesExplored": 5,
  "content": [
    {
      "url": "https://example.com/docs",
      "title": "Documentation",
      "content": "Main page content...",
      "links": [
        {
          "url": "https://example.com/docs/topic1",
          "text": "Topic 1"
        },
        ...
      ]
    },
    ...
  ]
}

Installation

  1. Clone this repository:
git clone https://github.com/wolfyy970/docs-fetch-mcp.git
cd docs-fetch-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Configure your MCP settings in your Claude Client:
{
  "mcpServers": {
    "docs-fetch": {
      "command": "node",
      "args": [
        "/path/to/docs-fetch-mcp/build/index.js"
      ],
      "env": {
        "MCP_TRANSPORT": "pipe"
      }
    }
  }
}

Dependencies

  • @modelcontextprotocol/sdk: MCP server SDK
  • puppeteer: Headless browser for web page interaction
  • axios: HTTP client for making requests

Development

To run the server in development mode:

npm run dev

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • momi
  • Provides initial medical assessments and advice.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • huahuayu
  • Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.

  • deemkeen
  • Contrôlez votre MBOT2 avec un combo d'alimentation: MQTT + MCP + LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocole de connecteur de message) 服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 , 支持员工信息查询和消息发送等功能。

  • pontusab
  • La communauté du curseur et de la planche à voile, recherchez des règles et des MCP

    Reviews

    5 (1)
    Avatar
    user_86JGqMAR
    2025-04-16

    I've been using docs-fetch-mcp by wolfyy970, and it's an impressive tool! The efficiency and ease with which it fetches and organizes documents have significantly boosted my productivity. Highly recommend for anyone needing a reliable document-fetching solution. Check it out on GitHub!