
mcp-rtfm
将您不存在或难以阅读的文档转化为智能的、可搜索的知识库,在“基本问题”被提出之前就实际回答它们。
Tools
analyze_existing_docs
Analyze existing documentation files with enhanced content analysis and metadata generation
analyze_project_with_metadata
Analyze project structure, create initial documentation files, and enhance with metadata/context
analyze_project
Analyze project structure and create initial documentation files
read_doc
Read a documentation file (required before updating)
update_doc
Update a specific documentation file using diff-based changes
get_doc_content
Get the current content of a documentation file
get_project_info
Get information about the project structure and files
search_docs
Search across documentation files with highlighted results
update_metadata
Update metadata for a documentation file
get_related_docs
Find related documentation files based on metadata
customize_template
Create or update a custom documentation template
README
MCP-RTFM
他们总是说 "RTFM!",但如果根本没有 FM 可以 R 呢?🤔 隆重推出 MCP-RTFM:一个 MCP 服务器,它可以帮助你创建那个每个人都让你去读的 F*ing Manual! 通过使用高级内容分析、元数据生成和智能搜索功能,它将你不存在或难以阅读的文档转换为一个互联的知识库,从而在“基本问题”被提出之前就实际回答了这些问题。
剧情反转:现在,与其只是告诉人们去 RTFM,不如实际给他们一个值得 R 的 FM! 因为对“read the f*ing manual”的最佳回应是拥有一个真正值得阅读的手册。 📚✨
📚 目录
🚀 快速开始
# 安装依赖
npm install
# 构建服务器
npm run build
# 添加到你的 MCP 设置并开始使用
await use_mcp_tool({
server: "mcp-rtfm",
tool: "analyze_project_with_metadata", // 增强的初始化
args: { projectPath: "/path/to/project" }
});
// 这将会:
// 1. 创建文档结构
// 2. 使用 unified/remark 分析内容
// 3. 生成智能元数据
// 4. 使用 minisearch 构建搜索索引
// 5. 添加结构化的 front matter
// 6. 让你的文档真正可读!
✨ 特性
文档管理工具
analyze_existing_docs
- 使用内容分析和元数据分析和增强现有文档analyze_project_with_metadata
- 使用增强的内容分析和元数据生成初始化文档结构analyze_project
- 文档结构的基本初始化read_doc
- 读取文档文件(更新前需要)update_doc
- 使用基于差异的更改更新文档get_doc_content
- 获取文档文件的当前内容get_project_info
- 获取项目结构和文档状态search_docs
- 搜索文档文件,并突出显示结果update_metadata
- 更新文档元数据get_related_docs
- 根据元数据和内容链接查找相关文档customize_template
- 创建或更新文档模板
默认文档文件
服务器自动创建和管理这些核心文档文件:
techStack.md
- 工具、库和配置的详细清单codebaseDetails.md
- 代码结构和逻辑的底层解释workflowDetails.md
- 关键流程的逐步工作流integrationGuides.md
- 外部系统连接的说明errorHandling.md
- 故障排除策略和实践handoff_notes.md
- 关键主题和后续步骤的摘要
文档模板
不同文档类型的内置模板:
- 标准文档模板
- API 文档模板
- 工作流文档模板
可以使用 customize_template
工具创建自定义模板。
📝 示例工作流
1. 分析现有文档
// 使用高级分析增强现有文档
await use_mcp_tool({
server: "mcp-rtfm",
tool: "analyze_existing_docs",
args: { projectPath: "/path/to/project" }
});
// 这将会:
// - 查找 .handoff_docs 中的所有 markdown 文件
// - 使用 unified/remark 分析内容结构
// - 生成智能元数据
// - 构建搜索索引
// - 如果不存在,则添加 front matter
// - 建立文档关系
// - 保留现有内容
// 结果包括:
// - 所有文档的增强元数据
// - 搜索索引填充
// - 内容关系映射
// - Git 上下文(如果可用)
2. 增强的项目文档设置
// 使用高级内容分析初始化文档
await use_mcp_tool({
server: "mcp-rtfm",
tool: "analyze_project_with_metadata",
args: { projectPath: "/path/to/project" }
});
// 结果包括:
// - 初始化的文档文件
// - 从内容分析生成的元数据
// - 建立的文档关系
// - 填充的搜索索引
// - 添加的结构化 front matter
// - Git 仓库上下文
// 获取增强的项目信息
const projectInfo = await use_mcp_tool({
server: "mcp-rtfm",
tool: "get_project_info",
args: { projectPath: "/path/to/project" }
});
// 使用智能结果搜索文档
const searchResults = await use_mcp_tool({
server: "mcp-rtfm",
tool: "search_docs",
args: {
projectPath: "/path/to/project",
query: "authentication"
}
});
// 结果包括:
// - 加权匹配(标题匹配优先)
// - 模糊搜索结果
// - 完整的内容上下文
// - 相关文档建议
3. 使用内容链接更新文档
// 首先读取文档
await use_mcp_tool({
server: "mcp-rtfm",
tool: "read_doc",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md"
}
});
// 使用链接到其他文档的内容进行更新
await use_mcp_tool({
server: "mcp-rtfm",
tool: "update_doc",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md",
searchContent: "[Why this domain is critical to the project]",
replaceContent: "The tech stack documentation provides essential context for development. See [[workflowDetails]] for implementation steps.",
continueToNext: true // 自动移动到下一个文档
}
});
4. 管理文档元数据
// 更新元数据以获得更好的组织
await use_mcp_tool({
server: "mcp-rtfm",
tool: "update_metadata",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md",
metadata: {
title: "Technology Stack Overview",
category: "architecture",
tags: ["infrastructure", "dependencies", "configuration"]
}
}
});
// 查找相关文档
const related = await use_mcp_tool({
server: "mcp-rtfm",
tool: "get_related_docs",
args: {
projectPath: "/path/to/project",
docFile: "techStack.md"
}
});
5. 使用上下文搜索文档
// 搜索并突出显示结果
const results = await use_mcp_tool({
server: "mcp-rtfm",
tool: "search_docs",
args: {
projectPath: "/path/to/project",
query: "authentication"
}
});
// 结果包括:
// - 文件名
// - 行号
// - 突出显示的匹配项
// - 匹配项周围的上下文
6. 创建自定义模板
// 为架构决策创建一个自定义模板
await use_mcp_tool({
server: "mcp-rtfm",
tool: "customize_template",
args: {
templateName: "architecture-decision",
content: `# {title}
## Context
[Background and context for the decision]
## Decision
[The architecture decision made]
## Consequences
[Impact and trade-offs of the decision]
## Related Decisions
[Links to related architecture decisions]`,
metadata: {
category: "architecture",
tags: ["decision-record", "design"]
}
}
});
🔧 安装
VSCode (Roo Cline)
添加到设置文件: 添加到设置文件:
- Windows:
%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json
- MacOS:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
- Linux:
~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
{
"mcpServers": {
"mcp-rtfm": {
"command": "node",
"args": ["<path-to-mcp-rtfm>/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
Claude Desktop
添加到配置文件:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-rtfm": {
"command": "node",
"args": ["<path-to-mcp-rtfm>/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
🎯 高级特性
内容链接
使用 [[document-name]]
语法创建文档之间的链接。 服务器会自动跟踪这些关系,并在查找相关文档时包含它们。
元数据驱动的组织
文档使用以下方式组织:
- 类别(例如,“architecture”、“api”、“workflow”)
- 用于灵活分组的标签
- 基于共享元数据的自动关系发现
- 内容链接分析
增强的内容分析
服务器使用高级库来更好地管理文档:
-
unified/remark 用于 Markdown 处理:
- 基于 AST 的内容分析
- 准确的标题结构检测
- 代码块和链接提取
- 正确的 Markdown 解析和操作
-
minisearch 用于强大的搜索功能:
- 跨所有文档的快速模糊搜索
- 字段加权搜索(标题具有更高的优先级)
- 完整的内容和元数据索引
- 使用 TTL 管理的高效缓存
- 实时搜索索引更新
智能元数据生成
- 自动内容分析以进行分类
- 基于内容模式的智能标签生成
- 文档中的结构化 front matter
- 基于 AST 的标题和章节检测
- 代码片段识别和标记
- 上下文感知的搜索结果呈现
模板系统
- 常见文档类型的内置模板
- 具有元数据默认值的自定义模板支持
- 模板继承和覆盖功能
- 用于一致格式的占位符系统
🛠️ 开发
# 安装依赖
npm install
# 构建服务器
npm run build
# 使用自动重建进行开发
npm run watch
🐛 调试
由于 MCP 服务器通过 stdio 进行通信,因此调试可能具有挑战性。 使用 MCP Inspector:
npm run inspector
Inspector 将提供一个 URL 以访问浏览器中的调试工具。
📄 许可证
MIT © Model Context Protocol
推荐服务器

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mult-fetch-mcp-server
一个多功能的、符合 MCP 规范的网页内容抓取工具,支持多种模式(浏览器/Node)、格式(HTML/JSON/Markdown/文本)和智能代理检测,并提供双语界面(英语/中文)。
AIO-MCP Server
🚀 集成了 AI 搜索、RAG 和多服务(GitLab/Jira/Confluence/YouTube)的一体化 MCP 服务器,旨在增强 AI 驱动的开发工作流程。来自 Folk。
Knowledge Graph Memory Server
为 Claude 实现持久性记忆,使用本地知识图谱,允许 AI 记住用户的信息,并可在自定义位置存储,跨对话保持记忆。
Hyperbrowser
欢迎来到 Hyperbrowser,人工智能的互联网。Hyperbrowser 是下一代平台,旨在增强人工智能代理的能力,并实现轻松、可扩展的浏览器自动化。它专为人工智能开发者打造,消除了本地基础设施和性能瓶颈带来的麻烦,让您能够:
Exa MCP Server
一个模型上下文协议服务器,它使像 Claude 这样的人工智能助手能够以安全和受控的方式,使用 Exa AI 搜索 API 执行实时网络搜索。
BigQuery MCP Server
这是一个服务器,可以让你的大型语言模型(LLM,比如Claude)直接与你的BigQuery数据对话!可以把它想象成一个友好的翻译器,它位于你的AI助手和数据库之间,确保它们可以安全高效地进行交流。
mcp-perplexity
Perplexity API 的 MCP 服务器。