Skip to content
MCP server

Codegraph

Static call graph for TS/JS and Python repos: who calls what, impact, and hotspots

Pricing
Open source
Platforms
CLI, self-hosted, Linux
Version
1.0.0
Listing updated
today

Similar MCP servers

About Codegraph

Codegraph is an open-source MCP server for developer tools. It is available on CLI, self-hosted, Linux, macOS and Windows.

The README describes codegraph as a way to see what a code change touches beyond one hop of IDE find-references. It parses a repository with tree-sitter into a graph of functions, classes and files linked by calls, inheritance and imports, stored in SQLite, and answers questions such as who calls a symbol, which code is affected by changing it, and what sits on a path from an entry point to a database or external call.

Every result comes from static analysis, and each edge links back to a source location. Calls that cannot be resolved, such as dynamic dispatch, ambiguous names or shadowed variables, are listed separately as dynamic rather than guessed. The README says no vector store or code upload is required and that query results are reproducible.

The tool is aimed at developers working in large or inherited TypeScript, JavaScript or Python codebases who need to judge the blast radius of an edit. It ships as a CLI and as an MCP stdio server so coding agents such as Claude Code or Cursor can call the same queries.

Tools this server provides (9)

Taken from the project documentation; the running server may differ.

who_calls
Lists callers of a symbol.
impact
Ranks code affected by a change, with evidence chains.
trace
Shows the path between two symbols through the call graph.
callees
Lists what a symbol calls.
dead_code
Finds functions with no callers.
cycles
Detects import cycles.
hotspots
Ranks the most central symbols in the graph.
search
Searches symbols in the graph.
archaeology
Uses git blame to attribute symbol lines to commits and authors.

What it does

Caller lookup
Lists every call site of a function with its source location.
Risk-ranked impact analysis
Shows the code affected by a change, ordered by risk, with a call chain for each entry.
Path tracing
Finds which functions lie between an entry point and a downstream call such as a database.
Dynamic call flagging
Marks unresolvable calls as dynamic instead of returning a possibly wrong target.
Incremental indexing
Re-parses only changed files and supports a watch mode for automatic rebuilds.
Git archaeology
Uses git blame to show which commit and author introduced each line of a symbol.

Good for

  • Estimate what breaks before changing a shared TypeScript function
  • Find dead code and import cycles in a Python or JS project
  • Give a coding agent call-graph queries through MCP instead of text search
  • Locate hotspots in an unfamiliar legacy codebase

Pricing

Open source

MIT licensed and self-hosted.

Codegraph FAQ

Which languages are supported?

The README says TypeScript and JavaScript are fully covered and Python is supported, with barrel-style re-export chains handled only on the TypeScript side.

Does it send code to a cloud service?

The README states it needs no vector database and no code upload, and runs from a local build or Docker image.

How does it expose tools to AI clients?

It runs as an MCP stdio server with nine tools, started with a mcp command pointing at a repository root.

Is Codegraph free?

Yes. Codegraph is open source, so you can use and self-host it for free.

What are the best alternatives to Codegraph?

The closest alternatives to Codegraph are Llmgraph, Code-Graph-RAG, codetopo — code graph for AI agents, Code Crawler and Graphify.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.

How AIPoweredBot checks servers