Repo Graph logo

Repo Graph

by James-Chahwan

Maps codebases into a structural graph so AI agents can find, trace, assess, and read relevant code.

Install Repo Graph

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "james-chahwan-repo-graph": {
      "command": "uvx",
      "args": [
        "mcp-repo-graph"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

James-Chahwan/repo-graph builds a structural graph of a local repository, including code entities, relationships, entry points, and cross-stack flows. Its MCP tools let an agent orient itself, find nodes from symbols or incident text, calculate forward or backward impact, trace paths across services, and read source by graph-derived line spans. The server uses tree-sitter parsing and resolvers for HTTP, gRPC, GraphQL, WebSocket, queues, events, and CLI links, with incremental refreshes after edits. Reach for it when an agent needs to navigate a large repository, monorepo, or multi-service codebase without loading or grepping through every file.

Use cases

  • Map a large repository before making a code change
  • Trace a feature across frontend and backend services
  • Assess the blast radius of a refactor or diff
  • Locate code implicated by a stack trace or failing test

Key features

  • Builds a structural graph from repository source
  • Ranks nodes from symbols, keywords, stack traces, and diffs
  • Calculates forward and backward dependency impact
  • Traces calls and cross-service flows
  • Reads source by graph-derived line spans
  • Refreshes incrementally after file changes

Tools6

What Repo Graph lets your agent do. Expand a tool for its parameters.

Verified live~1.8k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

22/22 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · mcp-repo-graph (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars87Stargazers on the source repository.
Last commit2d agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Repo Graph works

What James-Chahwan/repo-graph MCP server does

James-Chahwan/repo-graph turns a repository into a navigable graph for AI coding assistants. The graph represents entities such as modules, packages, classes, functions, routes, services, and components, along with relationships including imports, calls, containment, handlers, and cross-stack HTTP links. It also records feature paths from entry points through application layers and toward data access.

The result is a structural alternative to starting every investigation with broad file searches. Agents can identify relevant nodes, inspect their surrounding structure, follow a feature across service boundaries, and retrieve only the source spans associated with those nodes. This is most useful for large repositories, monorepos, and systems composed of multiple languages or services.

How it works

The graph is created with tree-sitter AST parsing and additional resolvers for HTTP, gRPC, GraphQL, WebSocket, queues, events, and command-line flows. refresh accepts a local path or a Git URL and can clone a repository on demand. Incremental refresh is the default: changed files are reparsed, while full=true forces a clean rebuild. A file watcher updates the graph as routine edits occur.

A typical investigation starts with orient to see repository counts, entry points, and extraction blind spots. An agent can then use find to turn a symbol, keyword, stack trace, failing-test identifier, or diff into ranked graph nodes. impact evaluates affected or dependent nodes, while trace follows an end-to-end path or finds the shortest route between two nodes. Finally, read returns source slices for selected nodes and adds structural context such as callers, tests, HTTP methods, and available intent or constraint information.

Setup and configuration

The package can be run with uvx mcp-repo-graph --repo . or installed with pip install mcp-repo-graph. The command uvx mcp-repo-graph install configures the available agents from one terminal command. VS Code and Cursor provide direct MCP installation links using the same uvx command and the current repository as --repo ..

The server uses a local repository path or Git URL as its input. Its graph cache is stored under .glia/graph/, and the cache is rebuilt automatically when the graph format requires it. The MCP server exposes the six tools orient, find, impact, trace, read, and refresh.

Tools and capabilities

  • orient returns an overview, entry points, and parser blind spots. A seed limits the map to a node neighborhood; full=true returns the full repository map.
  • find ranks matching nodes and can expand into their neighborhoods. Results include path:line locations.
  • impact calculates a deduplicated forward or backward closure, ranks results, identifies the relationship bringing each result into scope, and can mark nodes unreachable from entry points. Multiple comma-separated nodes support diff-level analysis.
  • trace follows feature flows through calls, HTTP, queues, events, and data links, or finds a shortest path between two nodes.
  • read retrieves source for one or more graph nodes using their recorded line spans and includes structural context.
  • refresh performs incremental or full graph builds from local paths or Git URLs.

Limitations and notes

Extraction coverage varies by language and relationship type. orient reports partial (language, edge-kind) coverage so an agent can decide when to fall back to grep. On large impact queries, the default response is an overview with top results and grouped areas or files; scope, offset, or full=true can be used to drill in or retrieve every row. Small, single-language projects may gain less from graph-based navigation than larger or cross-stack repositories.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Repo Graph

James-Chahwan/repo-graph is an MCP server that connects AI coding assistants to a structural graph of local or Git-hosted code repositories. Its main tools—orient, find, impact, trace, read, and refresh—help agents navigate entities, relationships, feature flows, source locations, and change effects.

Install it with `uvx mcp-repo-graph --repo .` or `pip install mcp-repo-graph`. You can also run `uvx mcp-repo-graph install` to wire it into available agents, or use the direct installation options for VS Code and Cursor.

Yes, James-Chahwan/repo-graph works with Cursor through its MCP installation link. The generated configuration runs `uvx mcp-repo-graph --repo .` against the current repository.

Call the `refresh` tool after major changes; routine edits are picked up incrementally by the file watcher. Use `full=true` when you need a clean reparse rather than the default changed-file update.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRepo Graph AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/james-chahwan-repo-graph?style=directory)](https://allmcps.com/mcp/james-chahwan-repo-graph)
HTML Embed
<a href="https://allmcps.com/mcp/james-chahwan-repo-graph"><img src="https://allmcps.com/api/badge/james-chahwan-repo-graph?style=directory" alt="Repo Graph on AllMCPs" /></a>