McpDocServerBLOCK
一个基于MCP协议的开发文档服务器,专为各类开发框架文档设计
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
English Documentation
一个基于MCP协议的开发文档服务器,专为各类开发框架文档设计。提供文档多线程爬取、本地文档加载、关键词搜索和文档详情获取功能。
核心功能演示
1. 文档爬取演示
从配置到执行`npm run crawl`的完整文档爬取过程
2. MCP服务器调用演示
在Cursor中查询API并获取准确文档结果的过程
解决Cursor幻觉问题
在使用Cursor进行各类框架开发时,经常会遇到AI对框架API不够精确的理解,导致的"幻觉"问题:
- 准确性问题:AI可能推荐不存在或已过时的框架API和组件
- 版本混淆:混合不同版本的API文档,导致代码无法正常运行
- 参数错误:对方法参数的理解不准确,特别是针对框架特有功能
- 兼容性误判:无法准确判断某个API在不同环境或平台中的兼容性
本MCP服务器通过提供精确的文档检索能力,有效解决上述问题:
- 实时精准查询:直接从官方文档源获取最新准确的API信息
- 上下文关联:将相关API和组件文档关联展示,提供完整参考
- 参数精确匹配:提供完整的方法签名和参数列表,消除参数错误
- 跨平台兼容标记:明确标识API在不同平台的兼容性
- 示例代码:提供官方示例代码,确保用法正确
通过集成此MCP服务器,可以显著提高Cursor在各类框架开发过程中的准确性和效率,避免"幻觉"带来的开发障碍。
功能特点
- 支持从本地 JSON 文件加载框架文档数据
- 提供强大的文档搜索功能
- 提供文档详情查询
- 自动识别可用文档源
- 支持特定文档源的定向查询
- 支持爬取外部文档,自动转换为本地可用格式
- 支持重新加载文档(通过搜索"reload"触发)
目录结构
/ ├── server.js # 服务器入口文件 ├── docs/ # 文档数据目录 │ ├── taro-docs.json # Taro框架文档 │ └── taroify-docs.json # Taroify组件库文档 ├── scripts/ # 脚本目录 │ └── crawl.js # 文档爬取脚本 ├── tests/ # 测试目录 │ └── mcp.test.js # MCP测试脚本 ├── config/ # 配置文件目录 │ └── doc-sources.js # 文档源配置 └── package.json # 项目配置
安装和运行
如果你本地已经安装了 Chrome 浏览器,并且希望 puppeteer 使用你已有的版本,可以设置 PUPPETEERSKIPDOWNLOAD 环境变量:
macOS/Linux:
export PUPPETEER_SKIP_DOWNLOAD=true npm install
Windows (命令提示符):
set PUPPETEER_SKIP_DOWNLOAD=true npm install
Windows (PowerShell):
$env:PUPPETEER_SKIP_DOWNLOAD = $true npm install
- 爬取文档数据
爬虫用于获取框架文档,是使用服务器前的重要步骤。您需要先创建爬虫配置文件,然后运行爬虫脚本。
创建爬虫配置
在 config 目录中创建 doc-sources.js 文件,参照以下格式:
// config/doc-sources.js
// 文档源配置
export const docSources = [
{
// 文档源名称 - 会用作搜索时的source参数
name: "taro",
// 文档网站基础URL
url: "https://docs.taro.zone/docs",
// 包含模式 - 指定要爬取的URL路径(空数组表示所有页面2d935d0fae5dOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add doc-crawler -- npx -y [email protected]
{
"mcpServers": {
"doc-crawler": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (3)
3 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
docs_get_doc_detail | read | |
docs_list_docs | read | |
docs_search_docs | read |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
const parseFn = new Function(objStr);
@modelcontextprotocol/sdk, express, puppeteer, cors, dotenv, zod, @jest/globals, jest
Gates applied: no_behavioural_pass.
2d935d0fae5dfull audit observations/trust-audit/mcp-server/ruan11223344__mcpdocserver.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 2d935d0fae5d | BLOCK | D | 69 | first audit |
Questions
What is the McpDocServer MCP server?
一个基于MCP协议的开发文档服务器,专为各类开发框架文档设计
What tools does McpDocServer expose?
3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is McpDocServer safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What credentials does McpDocServer need?
No credential environment variables were found in its source, so it appears to need none.
How does McpDocServer run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as doc-crawler at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (2d935d0fae5d), read on 2026-10-08. The repository is watched and re-audited when it changes.