codegraph MCP server
Commit 25 Okt 2026Provides AI agents with high-accuracy symbol and call graphs across multiple programming languages using tree-sitter and SQLite.
Juga dikenal sebagai crowbett/codegraph
- Stars
- 0
- Tools
- —
- Unduhan, 30 hari
- —
- Versi terbaru
- —
- Commit terakhir
- 25 Okt 2026
- Lisensi
- MIT
Apa itu codegraph MCP?
codegraph adalah MCP server. Provides AI agents with high-accuracy symbol and call graphs across multiple programming languages using tree-sitter and SQLite.
Ringkasan dibuat dari README proyek
Tentang codegraph MCP server
Providing AI agents with high-accuracy symbol and call graphs across multiple programming languages is what codegraph enables. It allows developers to ask structural questions about their codebases, such as identifying where a function is defined or determining which parts of a system will break if a specific file is modified. The server uses tree-sitter for parsing and SQLite for storage, supporting Go, Rust, C, C++, TypeScript, TSX, JavaScript/JSX, and Python.
Users can run this as a local MCP server that re-indexes the target repository before answering queries. It provides specific confidence levels for every edge, categorized as exact, likely, or name_only, so agents can gauge the reliability of the information. The system handles complex logic like Go implicit interface satisfaction and Rust dynamic dispatch through type-aware resolution. Because it uses incremental indexing based on content hashes, it can re-index a single-line edit in just a few seconds.
Apa yang bisa Anda lakukan dengannya
- 1Analyze code change impactAsk an AI agent to identify which parts of the codebase will break if a specific function or file is modified.
- 2Trace function callersFind every location in a large repository where a specific symbol or method is being called.
- 3Locate symbol definitionsRequest the exact definition and associated documentation comments for a specific code symbol.
- 4Navigate complex type hierarchiesResolve receiver calls through inferred types rather than simple name matching.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
README
Lihat di GitHubcodegraph
A Rust CLI + MCP server that answers "who calls this / what breaks if I change it" across 8 languages for AI agents, with every edge's accuracy measured against compiler-grade ground truth.
Results: 99.5% callers recall, 0.6% false call edges and 99.2% refs recall vs SCIP
ground truth (scip-go, rust-analyzer, scip-typescript, scip-python) on 16 repos / 1,079 files;
exact edges are 99.9% correct (47,193 / 47,258)
(docs/ACCURACY.md, raw run: bench/results/accuracy.json).
Cold index of Linux v6.12 (59,994 files) in 91.8 s; a one-line edit under watch
re-indexes it in 3.5–3.7 s (docs/SCALE.md).
A symbol + call graph of every repo you own, built with tree-sitter, stored in SQLite, and
served to AI agents over MCP. It answers the structural questions an agent otherwise
answers with a dozen greps: where is this defined, who calls it, what does it call, what
breaks if I change this file?, with file:line on every answer, and a confidence
(exact / likely / name_only) on every edge so you know how much to trust it.
- 8 languages, one engine: Go, Rust, C, C++, TypeScript, TSX, JavaScript/JSX, Python,
via per-language tree-sitter tag queries (
queries/<lang>/tags.scm). - Type-aware resolution: receiver calls (
x.foo()) resolve through an inferred type, not just a name guess; Go implicit interface satisfaction and dynamic dispatch (interfaces, traits, Rustdyn) are tracked. - Cross-file resolution with a confidence on every edge, measured against compiler-grade ground truth (see docs/ACCURACY.md).
- Incremental: only files whose content hash changed are re-parsed (in parallel).
- MCP server that re-indexes the repo you're asking about before it answers.
It follows a small shared CLI contract (config paths, --json envelope, exit codes, MCP
conventions).
Install
curl -fsSL https://raw.githubusercontent.com/crowbett/codegraph/main/packaging/install.sh | sh # Linux / macOS
irm https://raw.githubusercontent.com/crowbett/codegraph/main/packaging/install.ps1 | iex # Windows PowerShell
cargo install --git https://github.com/crowbett/codegraph --locked codegraph # from source (Rust 1.85+, a C compiler)
The installers fetch the latest release and
verify it against SHA256SUMS. Other channels: docs/INSTALL.md.
Quickstart
codegraph index ~/dev # index every repo under the configured roots
codegraph find Store # search
codegraph def Store::open # definition + doc comment
codegraph callers Store::open # who calls it
codegraph impact Store::open # what breaks if it changes
claude mcp add codegraph -- codegraph mcp # serve it to Claude Code over MCP
Also: refs, callees, outline, path, hotspots, dot, watch, status. A symbol can be a
simple name, a qualified name (store::Store::open) or a file:line. In trees, ~ marks a likely
edge and ? a name_only one.
Docs
- docs/GUIDE.md: walkthrough, every command and MCP tool, config, architecture, trade-offs, limitations
- docs/ACCURACY.md: how every edge tier is measured against SCIP ground truth
- docs/SCALE.md: performance on large trees
- docs/COMPARISON.md: how it compares to other code-graph tools
- docs/DEVELOPMENT.md: building, testing, the accuracy bench
License
MIT © 2026 crowbett
Pertanyaan tentang codegraph MCP
How accurate is the call graph?
The tool achieves 99.5% callers recall and 99.2% refs recall compared to SCIP ground truth.
How fast can it index large repositories?
It can perform a cold index of the Linux v6.12 kernel (59,994 files) in approximately 91.8 seconds.