rag-rat — Claude Code MCP server: setup
A local repository index for coding agents, connecting source code with its graph, history, and stored repository decisions.
claude mcp add rag-rat -- npx -y @rag-rat/binWhat rag-rat does
rag-rat runs as a local repository index and MCP server. It answers questions about callers, callees, imports, tests, Git and GitHub history, and repository notes tied to source locations. Results include evidence, confidence, and coverage details, so an agent can distinguish a confirmed edge from a partial index.
The server combines a code graph, a SQLite database, history data, and durable repository memories. Its graph covers Rust, TypeScript and TSX, Kotlin, C/C++, Python, Swift, and Go; configured toolchains can add SCIP-based edges. The plugin also provides a grep-augmentation hook and checks written or edited functions for exact or near-duplicate code.
Source files stay read-only: rag-rat writes only to its own SQLite database. That makes the server unsuitable for agents expected to modify code through this integration. After repository setup, reconnect the MCP server so it starts against the new index.
What it helps with
- trace callers and callees for a symbol
- connect code to Git and GitHub history
- record a repository decision or invariant
- spot duplicate code before editing a function
Example prompts for the agent
- Show the callers of
parseConfigand include the source evidence. - Explain the history behind
PaymentServiceand find related repository decisions. - Record the decision about
rag-rat.tomlas a source-linked repository memory.
How to install rag-rat
Platform CLI
claude mcp add rag-rat -- npx -y @rag-rat/binPlatform CLI
codex mcp add rag-rat -- npx -y @rag-rat/binConfig file
{
"mcpServers": {
"rag-rat": {
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Config file
{
"servers": {
"rag-rat": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rag-rat/bin"
]
}
}
}Platform CLI
gemini mcp add rag-rat npx -y @rag-rat/binStep 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 rag-rat
How do I install rag-rat in Claude Code?
Run claude mcp add rag-rat -- npx -y @rag-rat/bin. Then open the repository and configure it for indexing.
What does rag-rat do?
It indexes a repository and gives coding agents evidence-backed answers about the code graph, history, GitHub context, and stored repository facts.
Which languages does the rag-rat code graph support?
The graph covers Rust, TypeScript and TSX, Kotlin, C/C++, Python, Swift, and Go. Configured toolchains can provide extra SCIP-based edges.