Skip to content
MCP server

CodeGraphContext

Indexes local code into a queryable graph so AI assistants can trace calls

Actively maintained

The repository was last updated 3 days ago and is published under MIT.

CodeGraphContext is an open-source MCP server for developer tools. It is available on CLI, Self-hosted and VS Code.

Pricing
Open source
Platforms
CLI, Self-hosted, VS Code
GitHub stars
4.5K
Last commit
Language
Python
License
MIT

Similar MCP servers

About CodeGraphContext

CodeGraphContext turns a code repository into a graph of files, symbols, calls, imports and inheritance relationships. Instead of relying on text search or chunked retrieval, it stores the structure of a codebase in a graph database so questions like who calls a function or how two modules connect can be answered directly.

The project ships both a command-line toolkit and an MCP server. The CLI handles indexing, caller and callee lookups, complexity reports, dead code detection and a file watcher that keeps the graph current as files change. The MCP server exposes the same graph to AI coding assistants so they can answer structural questions about a repository in plain language.

It suits developers who work in large or unfamiliar codebases and want impact analysis before a refactor, or who want an assistant to reason about call chains across many files. Storage defaults to an embedded database that runs locally, with KuzuDB, LadybugDB, FalkorDB or Neo4j available as alternatives.

What it does

Repository call graph
Maps functions, classes, imports and calls across files into one queryable graph.
Caller and callee queries
Lists direct and indirect callers or callees of any symbol, including multi-hop chains.
Dead code and complexity reports
Flags potentially unused code and ranks functions by cyclomatic complexity.
Live file watching
Monitors a directory and updates the graph as source files change.
MCP server for AI assistants
Exposes the graph to MCP-compatible IDEs and assistants through a setup wizard.
Multiple graph backends
Runs on an embedded database by default, with options for KuzuDB, FalkorDB or Neo4j.
Broad language parsing
Parses a wide range of languages via Tree-sitter, with optional SCIP indexers for more precise results.

Good for

  • Assessing the ripple effect of changing a core function before refactoring
  • Tracing how execution reaches a bug from an entry point
  • Giving an AI coding assistant structural context about a large repository
  • Finding unused functions and hotspots in an existing codebase
  • Visualizing class hierarchies and call relationships

Pricing

Open source

Free and open source under the MIT licence.

Prices change. Check cgc.codes before you buy.

CodeGraphContext FAQ

Does CodeGraphContext need a remote service?

No. It works locally with embedded graph databases, and external databases are optional.

Which AI assistants can use CodeGraphContext?

Any MCP-compatible client. The setup wizard can configure VS Code, Cursor, Windsurf, Zed, Claude, Gemini CLI and several others.

How is CodeGraphContext installed?

Install the Python package with pip, or run it through the Docker image without Python.

Is CodeGraphContext free to use?

It is released under the MIT licence and is open source.

What are the best alternatives to CodeGraphContext?

The closest alternatives to CodeGraphContext are Codegraph, GoGraphCtx, Cgraphy, Grafyx and Codebase Memory.

Where this comes from

  • Description: written from the project's README and the project's website.

How AIPoweredBot checks servers