# Repograph

> Repograph is an open-source MCP server for developer tools. Local MCP server that maps a codebase and traces which files a change affects. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Repository:** https://github.com/karry1123/repograph
- **MCP Registry name:** io.github.Karry1123/repograph
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

RepoGraph scans a project's local imports, groups files by directory and by likely architectural layer (entry, business, data, utility), and writes a self-contained interactive HTML map. Clicking a file shows its callers in cyan and its dependencies in red. Directory clustering and utility folding hide heavily shared helpers so the picture does not turn into a tangle.

Three MCP tools expose this to an assistant. One returns the full graph as JSON, one writes the HTML map, and one traces the direct and transitive callers of a file along with the affected clusters and blast radius, which is useful before editing or deleting something. Each call does a fresh static scan and the tools are annotated read-only except the HTML writer.

Scanning stays on your machine, with no account or server. It uses Babel for JavaScript and TypeScript with a regex fallback, and does not execute code, so computed imports and custom aliases can be missed. The README says dead-code warnings are only hints. The CLI also exports JSON, Mermaid and SVG, and runs with npx on Node 18 or newer.

## Features

- **Interactive map:** HTML graph with search, minimap and collapsible directory clusters.
- **Impact tracing:** Finds direct and transitive callers and a blast radius for a changed file.
- **Layer classification:** Colours files as entry, business, data, utility or unknown from naming clues.
- **Utility folding:** Hides high fan-in helpers to reduce clutter.
- **Multiple exports:** HTML, JSON, Mermaid and SVG output.
- **Local scanning:** No account or server; code stays on your machine.

## Good for

- Map an unfamiliar codebase before refactoring
- Check what depends on a file before deleting it
- Export an architecture diagram in Mermaid for docs
- Find hub files that many modules rely on

## Install

### Claude Code (Terminal)

```sh
claude mcp add repograph -- npx -y repograph-cli
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "repograph": {
      "command": "npx",
      "args": [
        "-y",
        "repograph-cli"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "repograph": {
      "command": "npx",
      "args": [
        "-y",
        "repograph-cli"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "repograph": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "repograph-cli"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "repograph": {
      "command": "npx",
      "args": [
        "-y",
        "repograph-cli"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "repograph": {
      "command": "npx",
      "args": [
        "-y",
        "repograph-cli"
      ]
    }
  }
}
```

## Tools

- `scan_repository_graph`: Scan a repository and return the architecture graph as JSON
- `generate_architecture_html`: Write a self-contained interactive HTML map
- `query_impact_path`: Direct and transitive callers and blast radius for a changed file

## FAQ

### Does it send my code anywhere?

No. Scanning is local, though opening the HTML map loads pinned scripts from public CDNs.

### What languages does it parse?

JavaScript and TypeScript through Babel, with a regex fallback for unsupported syntax.

### How do I add it to Claude Code?

Run claude mcp add repograph -- npx -y repograph-cli mcp.

### Does it run the code?

No. It is a static scan and can miss computed imports and custom aliases.

### Is Repograph free?

Yes. Repograph is open source, so you can use and self-host it for free.

### How do I add Repograph to Claude Code?

Run this command in your terminal: claude mcp add repograph -- npx -y repograph-cli

### What are the best alternatives to Repograph?

The closest alternatives to Repograph are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/repograph
