# repo-graph

Builds a structural graph of your codebase — entities, calls, routes — so the agent navigates by relationships instead of reading everything and guessing.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 87
- Author: James-Chahwan
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/James-Chahwan/repo-graph
- Updated: 2026-10-02
- HTML: https://affpapa.org/en/nevibecode/mcp/repo-graph

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `REPO_GRAPH_REPO` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env REPO_GRAPH_REPO=<REPO_GRAPH_REPO> --transport stdio repo-graph -- uvx mcp-repo-graph
```
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>

### Codex

**Platform CLI**
```bash
codex mcp add repo-graph --env REPO_GRAPH_REPO=<REPO_GRAPH_REPO> -- uvx mcp-repo-graph
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e REPO_GRAPH_REPO=<REPO_GRAPH_REPO> repo-graph uvx mcp-repo-graph
```
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>

## When to use it
- 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
- Where does the `/api/groups` request get handled?
- Show me the path from the `/users` route to the database call.
- Which files will change if I modify the Order schema?

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
