# codetopo — code graph for AI agents [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/nrupala/codetopo  
**GitHub Stars:** 2  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/codetopo-code-graph-for-ai-agents

## Description
Domain-blind code graphs for AI agents: symbols, calls, blast radius, proof-checked snapshots.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/nrupala/codetopo), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
cargo install --git https://github.com/nrupala/codetopo codetopo-cli codetopo-server codetopo-mcp codetopo-acp
```

## Documentation

## What codetopo — code graph for AI agents does

codetopo indexes a source tree and stores its structure as a graph. Nodes can represent packages, modules, files, functions, external entities, and other extracted symbols; edges capture relationships such as calls, containment, reads, imports, and dependencies. The resulting data supports questions such as which functions call a symbol, which nodes depend on it, and how two nodes are connected.

The extractor is domain-blind: it reports structural measurements rather than judging code quality or interpreting business meaning. Supported source languages include Rust, TypeScript and JavaScript, Python, Kotlin, C, Java, Go, Shell, C++, Swift, Ruby, R, Julia, C#, PHP, Scala, Haskell, Elixir, and Lua. An English profile is also available for graphing English text, but its results are claims-class rather than truth-class data.

## How it works

The normal workflow is to index a repository once, discover a symbol identifier, and query the resulting database. Aggregate-first output reports totals before potentially large lists. An explicit expansion option returns the full result set when needed.

Graph answers use resolved structural relationships. Calls that cannot be mapped to a graph node are recorded as `UnresolvedCall` diagnostics rather than silently discarded. Index runs also report failed files, dependency cycles, and multiple-definition conditions where applicable. Counts therefore describe resolved relationships and should be considered alongside diagnostics.

The project also supports hash-chained audit-log verification and portable JSON graph snapshots. A snapshot can be restored into a new database for later use.

## Setup and configuration

Prebuilt `codetopo-mcp` binaries are available for Linux, macOS, and Windows on x86_64 and ARM64. Install the binary, place it on `PATH`, and configure an MCP client to launch `codetopo-mcp` over stdio. The initial operation is indexing a repository with `codetopo_index`.

A Rust toolchain installed through `rustup` can be used instead. The repository contains separate packages for the CLI, HTTP API, MCP server, and ACP agent, so each package must be named when installing with Cargo. The CLI stores indexed data in a database file selected with `--db`.

The HTTP service listens on `127.0.0.1:8080` by default and exposes JSON endpoints under `/v1`. It uses Bearer API-key authentication, with keys read from an `api_keys` file, and provides per-request metering.

## Tools and capabilities

- Index repositories into a graph database.
- Search for symbols and use their identifiers in later queries.
- Traverse ancestors and descendants of a node.
- Calculate a node's blast radius.
- Find a shortest typed path between two nodes.
- Inspect extraction and resolution diagnostics through the MCP interface.
- Verify the audit log.
- Export and restore complete graph snapshots as JSON.

The CLI, HTTP API, and MCP interface use the same underlying graph data and query model.

## Limitations and notes

Extraction only covers files handled by the listed language extractors. Unsupported extensions contribute no symbols or edges, and failed files are included in the index totals. Resolution is syntactic, so dynamic or otherwise unresolved calls can make caller and dependency counts incomplete. Check diagnostics before treating a count as exhaustive.

English processing uses a separate profile and should not be treated as one of the parsed programming languages. Its graph describes claims and interpretation relationships rather than establishing truth. The project is domain-blind and does not provide semantic code-quality scoring.

_Full upstream README: https://allmcps.com/mcp/codetopo-code-graph-for-ai-agents/readme_

