codetopo is a code graph engine designed to help AI coding agents understand codebases in a structured way. By indexing source code repositories, it builds a queryable graph containing symbols, calls, references, and structure, and returns results in JSON format for direct use by agents.
Key capabilities
codetopo supports querying structural questions such as function call relationships (who calls this function), change blast radius (what will break if something is modified), and paths between modules. It provides four interfaces: CLI, HTTP API, MCP server, and ACP agent, all of which share the same set of query handlers to ensure consistent results. Output follows an aggregation-first principle: counts are returned first, and full lists are expanded via --expand when needed, to save token budgets.
How to use
Users can get started quickly with precompiled binaries or build from source (requires a Rust toolchain). The basic workflow is: index a repository once, then query it as data. For AI agents, it can be called directly through MCP tools (such as codetopo_index, codetopo_descendants, codetopo_blast_radius, etc.); the HTTP API provides 21 endpoints, supports Bearer API key authentication, and meters usage per request; the ACP agent supports natural language queries, but only for read-only operations.
Use cases
Suitable for AI coding agents performing static structural analysis before modifying code, quickly answering structural questions such as call relationships, blast radius, and module connections. Also suitable for development teams that need to understand codebase structure as data.
Limitations
codetopo reports only structural measurements (counts and rankings) and does not assess code quality or meaning. Parsed languages include Rust, TypeScript/JavaScript, Python, Kotlin, C, Java, Go, Shell, C++, Swift, Ruby, R, Julia, C#, PHP, Scala, Haskell, Elixir, and Lua (based on tree-sitter). Unresolved calls are recorded as diagnostics rather than discarded. The ENGLISH documentation profile can analyze English text, but it is declarative rather than factual. The local tool is completely free and open source; the hosted API is a paid service, and specific pricing and tier limits should be referenced from official information.