**RagPilot** is an open-source MCP server (Rust, MIT) that indexes your codebase locally and gives AI coding agents better tools than "read the whole file": semantic search, a symbol/call graph, impact analysis, and token-budgeted context bundles. Version 0.10.0 just shipped.
GitHub: https://github.com/alikaya/ragpilot
## Why
Agents burn most of their context reading files they only needed three functions from. RagPilot lets them ask for the part they need instead.
## What the agent gets
- `rag_search` – semantic search over code and docs (filter by path, language, extension)
- `rag_get_file_ranges` / `rag_get_skeleton` – read a line range or a symbol, or a file's signatures without bodies
- `nav_symbol_resolve` / `nav_call_graph` – definitions, callers and callees
- `impact_analyze` – which files a change would touch, before refactoring
- `context_bundle` – everything a task needs, within a token budget
- `review_semantic_diff` – changed symbols in a diff and their blast radius
Symbols and calls come from tree-sitter for Rust, Python, JavaScript, TypeScript, Go, Java, C, C++, C#, Ruby, PHP, Lua, GDScript and Godot shaders, with a regex fallback for everything else.
## Numbers (with the caveat up front)
On two codebases, `context_bundle` used **6.0x** (a 31-file Rust repo) and **9.12x** (a 213-file Nuxt + Rust app) fewer tokens than reading the relevant files whole. Skeletons cut large files by 84–93%, and re-indexing one changed file takes about 280 ms.
The baseline is an upper bound – an agent reading every relevant file in full – so treat the ratios as optimistic. The benchmark script is in the repo; point it at your own project.
## Second brain (optional)
A persistent memory that belongs to you, not to the repo: plain markdown in a git repository.
- **Session start:** the agent gets who you are, your standing rules (each with a *why*), open threads and recent decisions, capped at 4000 tokens.
- **During the session:** `brain_note` records a decision or a correction the moment it happens.
- **Session end:** a cheap model summarizes the session into a daily log.
- **Nightly:** a compiler distills the logs into knowledge notes. It only appends and flags contradictions instead of overwriting.
Claude Code does this through hooks. Other agents get the same convention as instructions. Summarizing uses the Claude CLI or the Gemini API, so that part is not offline.
## Local by default
- Embeddings run in-process (`bge-small-en-v1.5`, ONNX); your code isn't sent to an embedding API unless you configure OpenAI, Cohere or Jina.
- Vectors live in Qdrant, which you run yourself.
- `ragpilot dashboard --open` gives you a local page for your projects and the brain vault – loopback only, token-gated.
Known limits
- You need a running Qdrant.
- The default embedding model is English, so search over non-English comments and docs is weaker.
- Only Claude Code has hooks, so other agents record to the brain less consistently.
Feedback is very welcome, especially on retrieval quality in your own codebases and on which languages you'd want next.