Skip to main content
Glama

Docs Fetch MCP Server

by wolfyy970

文档获取 MCP 服务器

一个模型上下文协议 (MCP) 服务器,用于获取具有递归探索功能的 Web 内容。该服务器使 LLM 能够自主探索网页和文档,以了解特定主题。

概述

Docs Fetch MCP 服务器为 LLM 提供了一种简单但功能强大的方法来检索和探索 Web 内容。它支持:

  • 从任何网页获取干净、可读的内容

  • 递归探索链接页面直至指定深度

  • 同域链接遍历以收集全面信息

  • 智能过滤导航链接,聚焦内容丰富的页面

当用户希望 LLM 通过浏览文档或网络内容来了解特定主题时,此工具特别有用。

特征

  • 内容提取:从网页中干净地提取主要内容,消除导航、广告和不相关元素等干扰

  • 链接分析:识别并提取页面中的链接,评估其相关性

  • 递归探索:跟踪指向同一域内相关内容的链接,直至指定深度

  • 并行处理:通过并发请求和适当的错误处理有效地抓取内容

  • 强大的错误处理:优雅地处理网络问题、超时和畸形页面

  • 双策略方法:首先使用快速 axios 请求,然后使用 puppeteer 作为更复杂页面的后备

  • 超时预防:实施全局超时处理,确保在 MCP 时间限制内可靠运行

  • 部分结果:即使某些页面无法完全加载,仍返回可用内容

用法

服务器公开一个 MCP 工具:

fetch_doc_content

获取网页内容,并能够探索指定深度的链接页面。

参数:

  • url (字符串,必需):要获取的网页的 URL

  • depth (数字,可选,默认值:1):目录/链接探索的最大深度(1-5)

返回:

{ "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" }, ... ] }, ... ] }

安装

  1. 克隆此存储库:

git clone https://github.com/wolfyy970/docs-fetch-mcp.git cd docs-fetch-mcp
  1. 安装依赖项:

npm install
  1. 构建项目:

npm run build
  1. 在 Claude 客户端中配置您的 MCP 设置:

{ "mcpServers": { "docs-fetch": { "command": "node", "args": [ "/path/to/docs-fetch-mcp/build/index.js" ], "env": { "MCP_TRANSPORT": "pipe" } } } }

依赖项

  • @modelcontextprotocol/sdk :MCP 服务器 SDK

  • puppeteer :用于网页交互的无头浏览器

  • axios :用于发出请求的 HTTP 客户端

发展

要在开发模式下运行服务器:

npm run dev

执照

麻省理工学院

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

使 LLM 能够通过获取页面并递归跟踪指定深度的链接来自主检索和探索 Web 内容,这对于从文档中学习主题特别有用。

  1. 概述
    1. 特征
      1. 用法
        1. fetch_doc_content
      2. 安装
        1. 依赖项
          1. 发展
            1. 执照

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.
                Last updated -
                1
                69,593
                MIT License
                • Linux
                • Apple
              • A
                security
                A
                license
                A
                quality
                Enables retrieval and processing of web page content for LLMs by converting HTML to markdown, with support for content truncation and pagination.
                Last updated -
                1
                2
                MIT License
              • -
                security
                A
                license
                -
                quality
                Enhances LLM applications with deep autonomous web research capabilities, delivering higher quality information than standard search tools by exploring and validating numerous trusted sources.
                Last updated -
                249
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                Enables web browsing capabilities for locally served LLMs through URL text fetching, link extraction, and web search using Brave and DuckDuckGo engines. Designed to enhance LLMs with real-time web access through the MCP protocol.
                Last updated -
                1
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/wolfyy970/docs-fetch-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server