# RTFM

Local retrieval engine that indexes source code, documentation, and PDFs into SQLite. Gives AI agents targeted pointers without burning token limits.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 27
- Author: roomi-fields
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/roomi-fields/rtfm
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/rtfm

## What it does

RTFM builds a searchable knowledge base right inside your repository. Instead of running endless grep loops or dumping thousands of lines into the prompt, the agent queries an index. It returns ranked matches in a compact metadata block of around 300 tokens, then pulls detailed sections on demand.

All indexed data stays in a single `.rtfm/library.db` file. The server processes code with AST awareness and handles structured documents like Markdown or legal drafts without cloud services or external API keys.

Python 3.10+ on your system PATH is mandatory. The core setup relies on standard tools, while vector embeddings (~85 MB) and advanced PDF parsing require optional virtual environments.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add rtfm -- uvx rtfm-ai
```
uvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>

### Codex

**Platform CLI**
```bash
codex mcp add rtfm -- uvx rtfm-ai
```
uvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "rtfm": {
            "command": "uvx",
            "args": [
                "rtfm-ai"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "rtfm": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "rtfm-ai"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add rtfm uvx rtfm-ai
```
uvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>

## When to use it
- locate functions and references across code and documentation simultaneously
- reduce prompt token usage during multi-step codebase exploration
- stop the agent from looping through repetitive file searches
- extract answers from PDF files and architecture decision records

## Example prompts
- Search our repository docs and source files for the SSO authentication flow
- Find the relevant sections in the tax specification PDF
- Check architecture records for decisions related to database caching

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
