# CodeGraphContext

> CodeGraphContext is an open-source MCP server for developer tools. Indexes local code into a queryable graph so AI assistants can trace calls. It is available on CLI, Self-hosted and VS Code.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, VS Code
- **Website:** https://cgc.codes
- **Repository:** https://github.com/codegraphcontext/codegraphcontext
- **GitHub stars:** 4,468
- **License:** MIT
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

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.

## Features

- **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

## 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.

## Alternatives

- [Codegraph](https://ai-powered.com/mcp/codegraph): Codegraph is an open-source MCP server for developer tools.
- [GoGraphCtx](https://ai-powered.com/mcp/gographctx): GoGraphCtx is an open-source MCP server for developer tools.
- [Cgraphy](https://ai-powered.com/mcp/cgraphy): Cgraphy is an open-source MCP server for developer tools.
- [Grafyx](https://ai-powered.com/mcp/grafyx): Grafyx is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [graphlore](https://ai-powered.com/mcp/graphlore): graphlore is an open-source MCP server for developer tools.
- [CGraph](https://ai-powered.com/mcp/cgraph): CGraph is an open-source MCP server for developer tools.
- [Code-Graph-RAG](https://ai-powered.com/mcp/code-graph-rag): Code-Graph-RAG is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/codegraphcontext
