文档获取 MCP 服务器
一个模型上下文协议 (MCP) 服务器,用于获取具有递归探索功能的 Web 内容。该服务器使 LLM 能够自主探索网页和文档,以了解特定主题。
概述
Docs Fetch MCP 服务器为 LLM 提供了一种简单但功能强大的方法来检索和探索 Web 内容。它支持:
从任何网页获取干净、可读的内容
递归探索链接页面直至指定深度
同域链接遍历以收集全面信息
智能过滤导航链接,聚焦内容丰富的页面
当用户希望 LLM 通过浏览文档或网络内容来了解特定主题时,此工具特别有用。
特征
内容提取:从网页中干净地提取主要内容,消除导航、广告和不相关元素等干扰
链接分析:识别并提取页面中的链接,评估其相关性
递归探索:跟踪指向同一域内相关内容的链接,直至指定深度
并行处理:通过并发请求和适当的错误处理有效地抓取内容
强大的错误处理:优雅地处理网络问题、超时和畸形页面
双策略方法:首先使用快速 axios 请求,然后使用 puppeteer 作为更复杂页面的后备
超时预防:实施全局超时处理,确保在 MCP 时间限制内可靠运行
部分结果:即使某些页面无法完全加载,仍返回可用内容
用法
服务器公开一个 MCP 工具:
fetch_doc_content
获取网页内容,并能够探索指定深度的链接页面。
参数:
url
(字符串,必需):要获取的网页的 URLdepth
(数字,可选,默认值:1):目录/链接探索的最大深度(1-5)
返回:
安装
克隆此存储库:
安装依赖项:
构建项目:
在 Claude 客户端中配置您的 MCP 设置:
依赖项
@modelcontextprotocol/sdk
:MCP 服务器 SDKpuppeteer
:用于网页交互的无头浏览器axios
:用于发出请求的 HTTP 客户端
发展
要在开发模式下运行服务器:
执照
麻省理工学院
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.
Tools
使 LLM 能够通过获取页面并递归跟踪指定深度的链接来自主检索和探索 Web 内容,这对于从文档中学习主题特别有用。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityThis server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.Last updated -169,593MIT License
- AsecurityAlicenseAqualityEnables retrieval and processing of web page content for LLMs by converting HTML to markdown, with support for content truncation and pagination.Last updated -12MIT License
- -securityAlicense-qualityEnhances 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 -249MIT License
- -securityAlicense-qualityEnables 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 -1MIT License