RTFM — Claude Code MCP server: what it does, how to install
Local retrieval engine that indexes source code, documentation, and PDFs into SQLite. Gives AI agents targeted pointers without burning token limits.
claude mcp add rtfm -- uvx rtfm-aiWhat RTFM 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.
What it helps with
- 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 for the agent
- 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
How to install RTFM
Platform CLI
claude mcp add rtfm -- uvx rtfm-aiuvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>
Platform CLI
codex mcp add rtfm -- uvx rtfm-aiuvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>
Config file
{
"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>
Config file
{
"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>
Platform CLI
gemini mcp add rtfm uvx rtfm-aiuvx runs the command named after the package; if the README names another one, use uvx --from rtfm-ai <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about RTFM
How to install RTFM in Claude Code?
Run claude mcp add rtfm -- uvx rtfm-ai in your terminal. This registers the MCP server using uvx.
What does RTFM do?
It indexes repository files into a local SQLite database. Your coding assistant queries this index to retrieve precise context instead of scanning entire files.
Does RTFM require external API keys?
No external keys or internet connections are needed. All index storage and retrieval operations execute locally on your machine.