repo-graph
Structural graph memory for AI coding assistants. Map your codebase. Navigate by structure. Read only what matters.
repo-graph is an MCP server that builds a structural graph of your codebase — entities, how they connect, and the feature flows that run frontend to backend. Your AI assistant queries the graph to find the right files instead of reading the whole repo first. The engine is Rust + tree-sitter and handles 20+ languages and frameworks, cross-stack.
Why
Instead of flooding the context window (grep, read, grep, read…), the model gets a map. On a Go + Angular monorepo fixing a reversed comparison operator — same bug, same model, same prompt:
| Without repo-graph | With repo-graph | |
|---|---|---|
| Tokens | 75,308 | 29,838 |
| Time | 4m 36s | ~30s |
| Files read | ~15 | 2 |
Install
Zero-install:
uvx mcp-repo-graph --repo .
Claude Code:
claude mcp add repo-graph -- uvx mcp-repo-graph --repo .
Any MCP client (Cursor, Windsurf, Codex, Gemini CLI, Antigravity, Claude Desktop):
{ "mcpServers": { "repo-graph": { "command": "uvx", "args": ["mcp-repo-graph", "--repo", "."] } } }
Tools (11)
- generate — scan and build the graph
- status — repo overview; orient first
- dense_text — the whole graph as dense text
- flow — entry → service → data for a feature
- trace — shortest path between two nodes
- impact — blast radius of a change, by tier
- neighbours — direct connections to a node
- activate — spreading activation (Personalized PageRank) from seeds
- find — match nodes by name/qname
- graph_view — ASCII overview or node tree
- reload — re-generate after changes
Links
- Site: https://repo-graph.com
- Guides: https://repo-graph.com/guides/
- GitHub: https://github.com/James-Chahwan/repo-graph
- PyPI: https://pypi.org/project/mcp-repo-graph
MIT licensed.
Server Config
{
"mcpServers": {
"repo-graph": {
"command": "uvx",
"args": [
"mcp-repo-graph",
"--repo",
"."
]
}
}
}