AI Skill Hub 推荐使用:RTFM代码检索层 是一款优质的MCP工具。AI 综合评分 7.8 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
为AI编码代理提供的开源检索层工具,能索引代码、文档、法律和研究资料。支持Claude集成,帮助开发者构建智能代码搜索和上下文工程能力,适合AI应用开发者和代理系统构建者。
RTFM代码检索层 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
为AI编码代理提供的开源检索层工具,能索引代码、文档、法律和研究资料。支持Claude集成,帮助开发者构建智能代码搜索和上下文工程能力,适合AI应用开发者和代理系统构建者。
RTFM代码检索层 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/roomi-fields/rtfm
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"rtfm-----": {
"command": "npx",
"args": ["-y", "rtfm"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 RTFM代码检索层 执行以下任务... Claude: [自动调用 RTFM代码检索层 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"rtfm_____": {
"command": "npx",
"args": ["-y", "rtfm"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
11 tasks, 3 repos of varying size, 4 conditions (A = standard prompt with file paths; B = discovery, no paths; C = RTFM FTS; D = RTFM hybrid), 3 runs each.
| Repo | Size | Where RTFM helps |
|---|---|---|
| metaflow | 620 files | Everyone resolves — RTFM adds no measurable gain |
| astropy | 1,119 files | All conditions 25–30 % F2P pass; none fully resolve |
| mlflow | 8,255 files | All conditions 0–5 % F2P pass; none fully resolve |
On a single smaller-scope run (test_stub_generator on metaflow), RTFM cut agent time by −37 % vs the no-paths baseline. On the larger repos, the tasks themselves were too hard for Sonnet 4 to resolve inside a 20-minute timeout regardless of retrieval.
For clients without Claude Code's plugin system :
pip install rtfm-ai
cd /path/to/your-project
rtfm init
Then point your MCP client at rtfm-serve (the entry exposed by the pip package). Optional extras via pip install rtfm-ai[embeddings,pdf].
---
The core plugin is dependency-free. Heavier optional extras (embedding model, PDF parsers) install on demand into an isolated venv inside the plugin's data directory — no pollution of your system Python, no PEP 668 conflicts:
/rtfm:install-embeddings # FastEmbed ONNX (~85 MB), semantic + hybrid search
/rtfm:install-pdf # pdftext only (~50 MB), fast text extraction
/rtfm:install-pdf-full # + marker-pdf + CPU-only torch (~1.5 GB), complex layouts
The pdf-full install uses PyTorch's CPU-only index (no CUDA, no GPU needed) to stay around 1.5 GB instead of 5 GB.
Restart Claude Code after install for the extras to be picked up.
```bash
```python from rtfm import Library
lib = Library("my_library.db")
In Claude Code (CLI or Desktop Code tab) :
/plugin marketplace add roomi-fields/claude-plugins
/plugin install rtfm@roomi-fields
RTFM is distributed via the roomi-fields/claude-plugins marketplace, which also ships notebooklm-mcp for citation-backed Q&A. To grab both at once:
/plugin install notebooklm@roomi-fields
That's it. The plugin auto-initializes each project on first use: - Creates .rtfm/library.db (one SQLite file) - Injects search instructions into CLAUDE.md - Pre-grants permission for the MCP tools (no prompt every search) - Indexes the project on the first prompt, re-indexes incrementally on every prompt
No pip install required. Pure Python, runs on Linux / macOS / Windows / WSL with Python 3.10+ already on PATH. The plugin bundles its own MCP server (no mcp SDK dep) and resolves python3 / python / py automatically.
Then say to Claude: "Find the authentication flow" — it uses rtfm_search instead of grepping.
RTFM pairs naturally with notebooklm-mcp. NotebookLM caps you at 50 queries/day per notebook; RTFM removes that ceiling by indexing answers locally — ask once, retrieve forever, offline, in milliseconds.
notebooklm-mcp's /batch-to-vault endpoint writes citation-backed Q&A as {slug}.md (markdown with frontmatter) plus {slug}.json (structured nblm-answer-v1 sidecar). Both are guaranteed to coexist. Two integration paths, both ship today:
rtfm sync. The default markdown parser slices each answer into question / answer / per-citation chunks automatically. No mapping, no schema, no code.nblm-answer.yaml mapping into .rtfm/mappings/. Each .json answer file produces typed chunks with notebook_id, source_name, citation_marker queryable via SQL, plus cites edge candidates between answers and sources.Use Path A unless you specifically need to filter or graph by structured citation fields.
---
/plugin install rtfm@roomi-fields/rtfm, auto-init per projectmcp SDK / pydantic / native binariespip install rtfm-ai for Cursor, Codex, Claude Desktop chat, any other MCP client---
For JSON-based formats specifically, RTFM offers a second extensibility path that doesn't need any Python:
| Level | What you do | What you get |
|---|---|---|
| **1. Generic** | Nothing. Just index the file. | Each top-level key becomes a chunk. Full-text search works on values. |
| **2. Mapped** | Drop a YAML mapping in .rtfm/mappings/ (~30 lines). | Typed chunks with declared metadata, custom titles, foreach extraction over arrays, edge candidates. The producing project (NotebookLM, Linear, Notion, OpenAPI…) ships the mapping; RTFM stays generic. |
See JSON schema mappings for the full reference, and RTFM × NotebookLM for a concrete recipe.
| **RTFM** | Augment CE | Sourcegraph | Code-Index-MCP | MemPalace | |
|---|---|---|---|---|---|
| Code indexing | ✅ (AST-aware) | ✅ | ✅ | ✅ | Shallow (char-chunk) |
| Docs, specs, markdown | ✅ (header-parsed) | Partial | ❌ | Limited | Verbatim chunks |
| Legal / regulatory | ✅ (XML, BOFiP) | ❌ | ❌ | ❌ | ❌ |
| Research (LaTeX, PDF) | ✅ | ❌ | ❌ | ❌ | ❌ |
| Custom parsers | ✅ (~50 lines) | ❌ | ❌ | ❌ | ❌ |
| Knowledge graph | ✅ (file/code links) | ❌ | Partial | ❌ | Entity graph (people) |
| File version history | ✅ (unlimited) | ❌ | ❌ | ❌ | ❌ (purge-and-replace) |
| MCP native | ✅ | ✅ | ✅ | ✅ | ✅ |
| Runs locally | ✅ | Cloud | Enterprise | ✅ | ✅ |
| Open source | MIT | ❌ | Partial | ✅ | MIT |
| Price | **Free** | $20-200/mo | $$$/mo | Free | Free |
RTFM is the only open-source option that indexes multi-domain content with structural parsing, a code-level knowledge graph, and unlimited per-file history. That's the niche.
Different from MemPalace specifically: MemPalace is an entity-level memory for conversations (who/project/decision triples in SQLite, plus verbatim chunks in ChromaDB). RTFM is a retrieval layer for artefacts — parsed by format, linked at the file level, versioned over time. The two are stackable, not competing.
For a deeper breakdown of the design choices behind any RAG (chunking, retrieval, augmentation, integration, freshness, storage), see RAG Fundamentals — the 6 axes →
---
rtfm 是一个专为开发者设计的智能代码检索工具,旨在通过高效的索引机制提升 AI 在大型代码库中的理解能力。它能够帮助开发者在复杂的项目结构中快速定位信息,减少在代码库中“手动翻阅”的时间,让 AI 助手能够更精准地理解上下文。
本项目通过 FeatureBench 基准测试验证了其强大的检索能力。在处理不同规模的代码库(如 astropy)时,RTFM 的混��检索模式(Hybrid Search)能显著提升 AI 任务的完成质量。它支持多种检索条件,包括标准路径提示、自主发现模式以及 RTFM 特有的全文搜索(FTS)与混合检索模式,确保在不同复杂度场景下都能提供可靠的辅助。
对于支持插件系统的客户端(如 Cursor、Codex、Claude Desktop 等),可直接通过插件市场安装。对于不支持插件系统的客户端,可以通过 pip 进行手动安装:执行 `pip install rtfm-ai` 后,进入项目目录运行 `rtfm init`,并将 MCP 客户端指向 pip 包暴露的 `rtfm-serve` 入口即可。此外,还可通过 `pip install rtfm-ai[embeddings,pdf]` 安装可选扩展。
项目提供了快速启动指南,帮助开发者根据不同的开发环境(如 Claude Code 或其他 MCP 客户端)快速配置并开始使用。无论是通过命令行交互还是集成在 IDE 插件中,都能实现开箱即用的代码检索体验。
RTFM 的核心插件不依赖任何外部依赖,保持轻量化。对于语义搜索(Semantic Search)和 PDF 解析等高级功能,系统采用按需安装机制,并在插件数据目录下的隔离虚拟环境中运行,有效避免了对系统 Python 环境的污染或 PEP 668 冲突。开发者���以通过 `/rtfm:install-embeddings` 安装 FastEmbed ONNX 模型,或通过 `/rtfm:install-pdf` 安装 PDF 解析组件。
RTFM 提供完善的 CLI 命令行参考手册,方便开发者进行自动化操作。同时,它也暴露了 Python API,允许开发者通过 `from rtfm import Library` 实例化 Library 对象,实现对本地数据库的编程化管理与检索集成。
在 Claude Code 环境中,推荐通过插件市场安装方式进行部署。RTFM 与 `notebooklm-mcp` 具有天然的协同效应:`notebooklm-mcp` 负责处理文档,而 RTFM 则通过本地索引打破了 NotebookLM 的每日查询限制。通过 `/batch-to-vault` 接口,你可以将知识持久化,实现毫秒级的离线检索,真正做到“问一次,永久检索”。
革新性的AI编码检索方案,为代理系统提供核心上下文获取能力。MCP标准设计确保兼容性,但项目仍在早期阶段,需观察社区成长。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,RTFM代码检索层 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | rtfm |
| 原始描述 | 开源MCP工具:The open retrieval layer for AI coding agents. Indexes code, docs, legal, resear。⭐10 · Python |
| Topics | MCP工具代码索引检索系统Claude集成AI代理上下文工程 |
| GitHub | https://github.com/roomi-fields/rtfm |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-19 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端