# codetopo — code graph for AI agents

> codetopo — code graph for AI agents is an open-source MCP server for developer tools. Queryable code graph of symbols, calls and blast radius for AI coding agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://aimlds.org/codetopo
- **Repository:** https://github.com/nrupala/codetopo
- **MCP Registry name:** io.github.nrupala/codetopo
- **Categories:** developer tools
- **Listing updated:** 2026-11-14

## About

codetopo indexes a repository once into a graph stored in SQLite, then answers structural questions as data: what calls this function, what depends on it, and what a change would ripple into. Its Rust core parses Rust, TypeScript/JavaScript and Python with tree-sitter, and it keeps a hash-chained audit log so the graph's own history is tamper-evident.

The design is deliberately domain-blind. It reports measurements, such as counts and rankings with their method stated, and does not score code quality or interpret what the code means. Output is aggregate-first, with totals before lists, to keep token use down; an --expand flag returns full lists.

The stdio MCP server, codetopo-mcp, exposes 20 tools covering symbol dossiers with size and cyclomatic complexity, index-time diagnostics, importance and complexity rankings, coupling measurements, change-impact diffs, callers and callees, and module structure. The same project also ships a CLI, a JSON HTTP server and codetopo-acp, a read-only Agent Client Protocol agent that answers plain-language questions with no LLM and no network. Install needs a Rust toolchain, for example cargo install codetopo-mcp.

## Features

- **Symbol and call graph:** Maps symbols, calls, references and structure into a queryable graph.
- **Blast radius:** Shows what a failure or change at a node would take with it.
- **Measured rankings:** Ranks symbols by importance or complexity with the method stated.
- **Graph diff:** Compares two graphs to show change impact.
- **Tamper-evident log:** A hash-chained audit log records the graph's history.
- **Other surfaces:** Also provides a CLI, an HTTP API and an ACP agent for editors.

## Good for

- Find every caller before changing a function signature
- Give an agent structural context without pasting whole files
- Estimate the blast radius of a refactor
- Onboard onto an unfamiliar repository
- Compare code graphs between two revisions

## Install

### Claude Code (Terminal)

```sh
claude mcp add codetopo -- npx -y codetopo-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "codetopo": {
      "command": "npx",
      "args": [
        "-y",
        "codetopo-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "codetopo": {
      "command": "npx",
      "args": [
        "-y",
        "codetopo-mcp"
      ]
    }
  }
}
```

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

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

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

```json
{
  "mcpServers": {
    "codetopo": {
      "command": "npx",
      "args": [
        "-y",
        "codetopo-mcp"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "codetopo": {
      "command": "npx",
      "args": [
        "-y",
        "codetopo-mcp"
      ]
    }
  }
}
```

## FAQ

### Which languages are parsed?

Rust, TypeScript/JavaScript and Python via tree-sitter.

### How do I install the MCP server?

Run cargo install codetopo-mcp; a Rust toolchain is required.

### How many tools does it have?

The MCP server exposes 20 tools.

### Does the ACP agent use an LLM?

No. codetopo-acp answers deterministically from the graph, with no LLM, network or file writes.

### Is codetopo — code graph for AI agents free?

Yes. codetopo — code graph for AI agents is open source, so you can use and self-host it for free.

### How do I add codetopo — code graph for AI agents to Claude Code?

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

### What are the best alternatives to codetopo — code graph for AI agents?

The closest alternatives to codetopo — code graph for AI agents are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/codetopo-code-graph-for-ai-agents
