codegraphv1.1.0

Ask who calls what. Get file:line answers.

codegraph parses Python, Java, TypeScript and JavaScript with Tree-sitter, resolves names into an embedded graph database and answers callers, callees, impact and search for people and coding agents. Every result is a symbol plus a citation you can open. No LLM sits in the answer path.

pip install "codegraph[mcp] @ git+https://github.com/muhib-karim/codegraph"

Python 3.11 or 3.12 · MIT licence · indexing never executes repository code

The graph, live in your browser

This is a real index of the project's own test fixtures (162 symbols and 126 edges across four languages), exported to JSON at build time. Pick a symbol: the panel answers the same questions as the CLI, from the same edges.

Call, reference and inheritance graph of the codegraph test fixtures. Use the symbol search beside it to explore with the keyboard.
PythonJavaTypeScriptJavaScript callreferenceinheritsheuristic

Loading the sample index…

Quickstart

  1. Install into a virtual environment (Python 3.11+).
    python3 -m venv .venv && . .venv/bin/activate
    pip install "codegraph[mcp] @ git+https://github.com/muhib-karim/codegraph"
  2. Index a repository. The graph lands in .codegraph/ inside it.
    codegraph index path/to/repo
  3. Ask. Rows are tab-separated: citation, symbol, kind, confidence, then depth or the definition.

exact means a static binding under the resolver's rules; heuristic marks a unique-name guess for an untyped receiver. Neither proves runtime behaviour.

Output captured from tests/fixtures/web when this page was built
$ codegraph callers make
src/app.ts:11	main	function	exact	1	src/app.ts:10
src/view.tsx:4	Badge	function	exact	1	src/view.tsx:3
$ codegraph callees main
src/app.ts:11	make	function	exact	src/app.ts:6
src/app.ts:12	Registry	class	exact	src/registry.ts:3
src/app.ts:13	Registry.add	method	exact	src/registry.ts:6
src/app.ts:14	Ring	class	exact	src/shapes.ts:23
src/app.ts:14	double	function	exact	src/util.ts:7
src/app.ts:15	Registry.size	method	exact	src/registry.ts:10
src/app.ts:15	Base.describe	method	heuristic	src/shapes.ts:8
src/app.ts:15	Circle.area	method	exact	src/shapes.ts:18
$ codegraph impact src/util.ts --depth 2
src/app.ts:7	make	function	exact	1	src/app.ts:6
src/app.ts:11	main	function	exact	2	src/app.ts:10
src/app.ts:14	main	function	exact	1	src/app.ts:10
src/view.tsx:4	Badge	function	exact	2	src/view.tsx:3
$ codegraph search area --kind method
src/shapes.ts:2	Shape.area	method	exact
src/shapes.ts:6	Base.area	method	exact
src/shapes.ts:18	Circle.area	method	exact

Give your coding agent the graph

codegraph mcp serves the index read-only over stdio with the official MCP SDK. Paths outside the indexed repository are refused, responses are paged, and every row keeps its citation and confidence.

Claude Code

claude mcp add codegraph -- /abs/.venv/bin/codegraph mcp --repo /abs/repo

Codex CLI · ~/.codex/config.toml

[mcp_servers.codegraph]
command = "/abs/.venv/bin/codegraph"
args = ["mcp", "--repo", "/abs/repo"]
search
symbols by name substring, exact matches first
callers
incoming calls and value references
callees
direct outgoing calls with target definitions
impact
what a change to a symbol or file can reach
find_symbol
definitions for a name or full id
inherits
descendants or ancestors
dead_code
unused candidates, never proof
index_status
coverage and staleness by SHA-256

Benchmark

Three pinned public repositories, cloned and indexed on the GitHub-hosted Linux runner by the benchmark CI job. The numbers below are copied from one run, unchanged.

RepositoryFilesLinesSymbolsEdgesIndex sPeak MBcallers mscallees msimpact mssearch ms
requestsPython · v2.32.33611,2099289460.411244.914.1215.282.83
zodTypeScript · v3.23.817030,9941,7177,2750.871278.328.0614.012.14
gsonJava · gson-parent-2.11.024953,0215,75727,3951.51156116.2621.23181.146.98

Measured on: GitHub Actions runner, ubuntu24 20261018.339.1, Linux 7.0.0-1017-azure, x86_64, 4 CPUs, Python 3.12.15; 2026-10-22; codegraph 1.1.0, commit b3daafac4283, run 39707970318. Query times are medians of 20 runs after a warm-up.