rag-rat
Local repo index with call graphs, git history and durable memory for coding agents
- Pricing
- Open source
- Platforms
- CLI, vscode, self-hosted
- Runs
- Locally
- Version
- 0.24.1
- Listing updated
- 2 days ago
About rag-rat
rag-rat is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
Grep and file reads tell an agent what the code says; this server adds the rationale around it. It parses a repository with tree-sitter, embeds it locally and stores everything in one SQLite database, leaving your source read-only. Callers, callees, imports and type references become a graph across Rust, TypeScript/TSX, Kotlin, C/C++, Python, Swift and Go, and every edge is labelled Exact, Syntactic, Name-only or Ambiguous so a guess reads as a guess. An optional SCIP oracle and live language servers can raise edges to compiler-grade.
On top sit 47 tools for search, graph, history and memory. impact_surface gathers callers, callees, tests and notes around a symbol, important_symbols ranks load-bearing code by PageRank, and rationale_search reaches GitHub and GitLab issue, PR and review history, with closed issues distilled into typed decision records. Memories such as invariants, decisions and risks are anchored to symbols, not line numbers, and survive refactors.
Hooks warn when a file being written duplicates existing functions, and worktrees of one repo share a single index and memory store. It installs via npx @rag-rat/bin or as a Claude Code, Codex or OpenCode plugin.
Install
Run in a terminal
claude mcp add rag-rat -- npx -y @rag-rat/binAdd to claude_desktop_config.json
{
"mcpServers": {
"rag-rat": {
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"rag-rat": {
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"rag-rat": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"rag-rat": {
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"rag-rat": {
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Tools this server provides (4)
Taken from the project documentation; the running server may differ.
- impact_surface
- Gather callers, callees, tests and memories around a symbol.
- important_symbols
- Rank load-bearing symbols by PageRank over the graph.
- rationale_search
- Search issue and review rationale across GitHub and GitLab.
- symbol_lookup
- Look up a symbol with surfaced memories.
What it does
- Labelled code graph
- Every edge says how it was resolved.
- Impact surface
- Shows callers, tests and notes around a symbol before a change.
- Papertrail history
- Mirrors issue, PR and review rationale locally.
- Source-anchored memory
- Notes attach to symbols and outlive refactors.
- Clone warnings
- A hook flags near-duplicates of existing code.
- Shared worktree index
- Parallel agents reuse one index and memory store.
Good for
- See what a change to a function will break
- Find why a piece of code was written this way
- Stop an agent re-implementing an existing helper
- Carry decisions between agent sessions
- Run several agents in git worktrees on one index
Pricing
Open source
Open-source and local-first
Prices change. Check rag-rat.cq27.dev before you buy.
rag-rat FAQ
Does it modify my source?
No. Source stays read-only and it writes only its own SQLite database.
Which languages are supported?
Rust, TypeScript/TSX, Kotlin, C/C++, Python, Swift and Go.
How many tools are there?
47, also available as CLI commands.
How do I install it?
Run npx @rag-rat/bin or install the Claude Code, Codex or OpenCode plugin.
Is rag-rat free?
Yes. rag-rat is open source, so you can use and self-host it for free.
How do I add rag-rat to Claude Code?
Run this command in your terminal: claude mcp add rag-rat -- npx -y @rag-rat/bin
What are the best alternatives to rag-rat?
The closest alternatives to rag-rat are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to rag-rat

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools