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 →
---
革新性的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-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端