repo-graph — Claude Code MCP server: what it does, how to install
Builds a structural graph of your codebase — entities, calls, routes — so the agent navigates by relationships instead of reading everything and guessing.
claude mcp add --env REPO_GRAPH_REPO=<REPO_GRAPH_REPO> --transport stdio repo-graph -- uvx mcp-repo-graphWhat repo-graph does
repo-graph maps your repository: which handlers, models, routes exist, what depends on what, how a request flows through the stack. The agent queries the graph (orient, find, trace, impact, read, refresh), gets the minimal file set, and reads only that. Instead of grep and reading dozens of files by keyword, it takes a direct path.
Inside sits the glia engine: parses code, extracts entities (functions, classes, routes, calls), stores them in a local graph at .glia/graph/. Supports Python, Go, TypeScript, JavaScript, and other languages in one repo. Requires Python and uvx to run the server.
The benefit shows on large repos, monorepos spanning several languages, multi-service systems. On a small single-language project the model will read all the files anyway — token savings won't appear there.
What it helps with
- find where a feature starts in a multi-service project
- trace a request path from route to database through several layers
- see which files a model or API change will touch
- navigate a monorepo with Go, TypeScript, and Python without reading everything
- cut the context the agent wastes on orientation in a large codebase
Example prompts for the agent
- Where does the
/api/groupsrequest get handled? - Show me the path from the
/usersroute to the database call. - Which files will change if I modify the Order schema?
How to install repo-graph
Platform CLI
claude mcp add --env REPO_GRAPH_REPO=<REPO_GRAPH_REPO> --transport stdio repo-graph -- uvx mcp-repo-graphReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-repo-graph <command>
Platform CLI
codex mcp add repo-graph --env REPO_GRAPH_REPO=<REPO_GRAPH_REPO> -- uvx mcp-repo-graphReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-repo-graph <command>
Config file
{
"mcpServers": {
"repo-graph": {
"command": "uvx",
"args": [
"mcp-repo-graph"
],
"env": {
"REPO_GRAPH_REPO": "<REPO_GRAPH_REPO>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-repo-graph <command>
Config file
{
"servers": {
"repo-graph": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-repo-graph"
],
"env": {
"REPO_GRAPH_REPO": "<REPO_GRAPH_REPO>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-repo-graph <command>
Platform CLI
gemini mcp add -e REPO_GRAPH_REPO=<REPO_GRAPH_REPO> repo-graph uvx mcp-repo-graphReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from mcp-repo-graph <command>
Step 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 repo-graph
How to install repo-graph in Claude Code?
Run claude mcp add repo-graph -- uvx mcp-repo-graph in your terminal. The server will install and connect to Claude Code automatically.
What does repo-graph do?
Builds a structural graph of your codebase: entities, calls, dependencies. The agent queries the graph, gets the list of relevant files, and reads only those instead of scanning the entire project.
When should I install repo-graph?
If you have a large repository, a monorepo with several languages, or a multi-service system. On a small single-language project the model will read all the files without the graph, and the gain will be negligible.