Codetopo — code graph for AI agents logo

Codetopo — code graph for AI agents

Indexes source repositories into queryable code graphs for symbol, dependency, call-path, blast-radius, and snapshot analysis.

Install Codetopo — code graph for AI agents

Run the project’s own setup commands, in order.

Setup steps from the project

codetopo — code graph for AI agents installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

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

Overview

codetopo — code graph for AI agents turns source repositories into queryable graphs of symbols, calls, references, and containment. It indexes supported languages with tree-sitter, then exposes structural queries through a CLI, JSON HTTP API, or stdio MCP server. Results lead with aggregate counts, while expansion returns detailed lists; unresolved calls and extraction failures remain visible as diagnostics. Reach for it when an agent needs dependency context, caller information, change-impact analysis, or verified graph snapshots before modifying code.

Use cases

  • Map callers and callees before changing a function
  • Estimate a symbol's dependency blast radius
  • Trace typed paths between modules
  • Verify and restore portable code-graph snapshots

Key features

  • Tree-sitter extraction for 19 programming languages
  • Symbol, call, reference, containment, and dependency graphs
  • Ancestor, descendant, path, and blast-radius queries
  • Aggregate-first results with optional expansion
  • Diagnostics for unresolved calls and extraction failures
  • Hash verification and JSON snapshot export and restore

Security & health

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

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 47d

Adoption & maintenance

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

GitHub stars2Stargazers on the source repository.
Last commit8d agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Codetopo — code graph for AI agents works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

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

Frequently Asked Questions about Codetopo — code graph for AI agents

codetopo — code graph for AI agents is an MCP server that connects AI coding agents to indexed source repositories through code-graph queries. Its main capabilities include repository indexing with codetopo_index, structural traversal, blast-radius analysis, and diagnostics for unresolved calls and extraction failures.

Install a prebuilt codetopo-mcp binary for your operating system, place it on PATH, and configure your MCP client with the command codetopo-mcp. Alternatively, use Cargo with a stable Rust toolchain and install the codetopo-mcp package by name.

Yes, Cursor can use it as a stdio MCP server by launching the codetopo-mcp command. After configuring the server, ask the agent to index a repository with codetopo_index before running structural queries.

It supports Rust, TypeScript, JavaScript, Python, Kotlin, C, Java, Go, Shell, C++, Swift, Ruby, R, Julia, C#, PHP, Scala, Haskell, Elixir, and Lua through tree-sitter extraction. Unsupported files add no symbols or edges.

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 PreviewCodetopo — code graph for AI agents AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/codetopo-code-graph-for-ai-agents?style=directory)](https://allmcps.com/mcp/codetopo-code-graph-for-ai-agents)
HTML Embed
<a href="https://allmcps.com/mcp/codetopo-code-graph-for-ai-agents"><img src="https://allmcps.com/api/badge/codetopo-code-graph-for-ai-agents?style=directory" alt="Codetopo — code graph for AI agents on AllMCPs" /></a>