Ask a codebase questions and get cited code back, from a tree-sitter graph of the repo.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
One-click editor setup isn’t available for this listing yet — we don’t have a confirmed install command, and we’d rather show nothing than point your editor at the wrong package or host. Follow the project’s own setup instructions, linked above.
Give coding agents trustworthy, cited answers about unfamiliar codebases.
Ask a repository a question; get back the actual source that answers it, every block stamped with the file and line range it came from.
English · 简体中文 · 日本語 · Français · Español · Deutsch
| 📦 Package | 🩺 Health | 🗂️ Listed on |
|---|---|---|
|
|
|
|
What is it · Who it's for · vs. grep · Quickstart · MCP setup · What it won't do · Benchmarks · Architecture · Docs · Contributing
An agent dropped into a codebase it has never seen has two bad options. Grep for a word and it either floods its context with whole matching files, or finds nothing because the code spells the idea differently than you did. Guess from training data and it writes something confident and wrong. Either way you cannot tell which of the two just happened.
repo2graph answers questions about a repository with the repository's own source. Ask "how
does a request get authenticated" and you get back the function that does it, the functions that
call it and the ones it calls — each block headed [cite: path:start-end], so every claim in the
answer is one click from the line it came from. If the answer is wrong, the citation shows you
where it went wrong. That is the whole point.
It gets there by reading the code rather than searching it: one parse pass records who calls whom, who imports what, and which class extends which, and retrieval follows those links instead of matching more text. The result is served straight into Claude Code, Cursor or any Model Context Protocol client, or packed into a markdown context with a hard token ceiling for any other LLM.
No project setup, no language server, no build step — point it at a folder and it works.
| Interactive canvas, zoomed | Filter & inspector controls |
|---|---|
![]() | ![]() |
graph.html is one self-contained file — no server, no internet, drag to pan, scroll to zoom,
click a node to inspect its code and neighbours.
🧭 Joining a new codebaseThe problem: week one goes on reading files to find out which ones matter. Build once, open the map, and start from the hub files instead of the root directory. Then ask whole questions — "how does a request get from the router to the handler" — and read the answer as source, with the callers and callees already attached. |
🤖 Driving a coding agentThe problem: the agent greps, pulls in three whole files, and still edits the wrong one. Point Claude Code, Cursor or any MCP client at the repo. The agent gets cited blocks under a hard 12k-token ceiling instead of raw file dumps, and can walk from a symbol to its callers in one hop. Secrets are excluded from agent replies unconditionally — no flag turns that off. |
🔍 Reviewing a pull requestThe problem: the diff is 40 lines; the blast radius is unknown. Ask the graph what touches the changed symbol — callers, importers, subclasses — and what the
repository's own history says usually changes alongside it ( |
🌱 Maintaining a projectThe problem: every new contributor asks the same "where do I start" question. Commit a fresh graph on every push with the GitHub Action, and publish |
Both of those are still in the box — repo2graph seeds every query with BM25, and dense vectors
are an opt-in fusion. The difference is what happens after the first match.
| grep / ripgrep | Embedding search | repo2graph | |
|---|---|---|---|
| Finds | the exact string | text that reads similarly | the symbol, then everything wired to it |
| Different words than the code uses | returns nothing | handles it | BM25 seeds, then graph hops reach code the query never named |
| "What calls this?" | can't answer — a match in a comment ranks like the definition | can't answer — neighbours aren't in the embedding | CALLS edges, with direction and a confidence score |
| "What breaks if I change this?" | you read every hit by hand | not represented | callers, importers and subclasses in one hop |
| What comes back | matching lines, or whole files an agent then dumps into context | top-k similar chunks, callers unretrieved | the source that answers it, each block headed [cite: path:start-end] |
| Token cost | unbounded — the agent decides how much file to read | unbounded | hard ceiling on the whole pack, re-measured before it returns |
| "Which files keep changing together?" | — | — | CO_CHANGE, mined from git history |
| Setup | none | index build + an embedding model (~90 MB) | one parse pass, no model, no API key, no language server |
| Ranking is explainable | n/a | a cosine number | repo2graph explain retrieval "<q>" names the seed and the edge that pulled each block in |
Use grep when you want every occurrence of a literal string — a config key, an error message, a TODO. repo2graph has no special knowledge of string literals and will not beat it. Use repo2graph when the question is about relationships: what calls this, what breaks if I change it, how does data get from A to B. Longer version: docs/why-graph.md.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/repo2graph)<a href="https://allmcps.com/mcp/repo2graph"><img src="https://allmcps.com/api/badge/repo2graph?style=directory" alt="Repo2graph on AllMCPs" /></a>