SuperAPI AI Directory

repo-graph

Structural codebase graph: scans entities, relationships and feature flows across languages so LLMs navigate by structure instead of grepping.

Open website

About this tool

repo-graph is a structured graph memory tool for AI programming assistants, providing codebase navigation capabilities in the form of an MCP server. It first scans the codebase, building a lightweight graph composed of entities (modules, packages, classes, functions, routes, services, components), relationships (imports, calls, handles, defines, contains, cross-stack HTTP), and flows (end-to-end paths from entry points to the data layer), and then provides 6 MCP tools for LLM queries: orient (learn the repository language, main features, and graph blind spots), find (locate nodes related to a problem or find entry points by tracing the stack), impact (assess the scope of change impact and dead code), trace (trace the path of a feature from route to database), read (read the source code of a specified function), refresh (rebuild the graph after refactoring).

Installation: one-click installation or run uvx mcp-repo-graph install in the terminal, which can automatically detect installed AI programming agents (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Codex, Gemini CLI, opencode, Kiro) and write the MCP configuration and usage instructions; it can also be configured manually, with the package name being the run command uvx mcp-repo-graph, or after pip install mcp-repo-graph, use the mcp-repo-graph command. The --repo parameter can point to the current project, an absolute path, or a git URL (which will be shallow-cloned before building the graph). Requires Python 3.11+, and uv must be installed to use uvx; the Rust engine already provides precompiled wheels for Linux, macOS, and Windows, so no Rust toolchain is required.

Applicable scenarios: large repositories, multi-language monorepos, multi-service/multi-repository systems, unfamiliar or legacy codebases, and situations that require tracing feature paths across files, languages, and service boundaries. The official documentation states that for small single-language projects with clear tasks, the model can simply read files directly, and the graph instead adds overhead; the MCP layer has a fixed cost per round, so simple tasks may be more expensive, and its value is mainly reflected in avoiding repeated loops of grep and reading.

Limitations and notes: the graph cache is located in .glia/graph/, and it will be rebuilt once on first startup; starting from 0.5.0, the engine package was renamed from repo-graph-py to glia-py, and find_node and other old interfaces are replaced by find(query, top_k), whose return value is a Python object rather than a JSON string. If glia's own CLI hook is used at the same time, the CLI and server glia versions must be kept consistent, otherwise each commit will rebuild the cache for the other. When not using MCP, you can directly pip install glia-py to call the engine.