semantic_searchLABSCO SUMMARY
The layer grep cannot give you: why this code exists, anchored to the code itself.
Every harness already has grep and file reads. What is missing is rationale — the decision that produced a function, the invariant it holds, the issue thread that explains the odd branch. rag-rat stores those as typed notes bound to symbols, and every answer carries a confidence label and coverage warnings so a partial index reads as exactly that.
What it is
A local Rust index and MCP server over one checkout. It builds a tree-sitter call graph, reads git and GitHub history, and stores typed source-anchored notes, then answers with provenance on every result. Source files stay read-only; it writes only its own SQLite database.
What you get
- 47 tools in nine groups, covering search, the call graph, clones, history, index health and repo memories
- semantic_search, symbol_lookup and docs_for_symbol for finding your way in
- find_callers, trace_callees, impact_surface and check_library_usage — what calls this, what it calls, and what breaks if you change it
- find_clones and clones_for_symbol — exact and near-duplicate functions already in the repo
- git_history_for_symbol, git_blame_chunk, commit_search and the papertrail tools — the issues, PRs and reviews behind a line
- memory_create and the memory_* family — typed notes (Invariant, Decision, Risk, BugPattern and more) anchored to a symbol, path or call path, retrievable later with evidence
- dream and dream_review — a maintenance pass over accumulated memories
- Results encoded as TOON rather than JSON, which is denser for the uniform result rows
Requirements
Install the plugin for Claude Code, Codex or opencode, which registers the server and installs a matching binary; or install the CLI from npm as @rag-rat/bin, or build it with cargo. It is published as io.github.cq27-dev/rag-rat and runs over stdio. The server starts dormant until the repo is indexed.
Setup effort
Follow the published steps — npm install -g @rag-rat/bin
USE CASES
Judging whether a change is safe
Get the impact surface for a symbol — callers, tests, docs, git history and prior notes in one answer, with the edges labelled by how they were resolved.
Finding out why a strange branch is there
Pull the papertrail for that chunk or symbol: the issues, pull requests and review comments behind it, plus the distilled decision record.
Not writing a function that already exists
Fingerprint what you are about to write against the repo and see the exact or near-duplicate copies already there.
Leaving a finding where the next agent lands
Record a typed note bound to the symbol or path, and it surfaces automatically the next time anyone queries that code.
47 tools
Listed in project docs. Your client may show a different list.
symbol_lookupdocs_for_symbolfind_callerstrace_calleesimpact_surfacecheck_library_usagecompare_graph_to_textcompare_graph_to_scipffi_surfacerepo_briefrepo_clustersimportant_symbolsfind_clonesclones_for_symbolread_chunkcommit_searchgit_history_for_pathgit_history_for_symbolcommits_touching_querygit_blame_chunkpapertrail_for_chunkpapertrail_for_symbolpapertrail_for_commitpapertrail_issue_searchpapertrail_refs_for_pathrationale_searchllm_statusheal_indexpapertrail_sync_statusindex_statusmemory_creatememory_rebindmemory_updatememory_searchmemory_for_symbolmemory_for_pathmemory_for_call_pathmemory_showmemory_validatememory_doctormemory_mark_obsoletememory_edge_addmemory_edge_removememory_edgesdreamdream_reviewBEFORE YOU INSTALL
What to know first
Tools you get
47 tools named in the project's documentation.
Requires
npm, for the prebuilt binary (Apple Silicon macOS, Linux with glibc 2.38+, Windows x64) — or a Rust toolchain to build it with cargo
INSTALLATION
Connect your client
Server setup
npm install -g @rag-rat/binOr, to build it with Rust instead:
cargo install rag-ratThen, from the root of the repository you want it to index, run:
rag-rat initMCP Clients
Claude Code
claude mcp add --scope project rag-rat -- rag-rat mcpCodex
codex mcp add rag-rat -- rag-rat mcpOpenCode
opencode plugin @rag-rat/plugin-opencode