</>MCP Agents Market
MCP Server

CodeGraphContext

by CodeGraphContext4.2kPythonUpdated 2026-09-02

An MCP server plus a CLI tool that indexes local code into a graph database to provide context to AI assistants.

Claude DesktopVS CodeCursorWindsurfZedChatGPTCodexCline

CodeGraphContext is an MCP server and CLI toolkit that indexes local code repositories into a queryable graph database, enabling AI assistants to understand code structure and relationships. It parses source code using Tree-sitter and optional SCIP indexers to build comprehensive knowledge graphs of functions, classes, imports, calls, and inheritance across 23 programming languages. Developers can query the graph directly via CLI commands or connect it to AI assistants through MCP for natural-language code exploration. The tool supports multiple embedded and remote graph databases including FalkorDB Lite, KuzuDB, and Neo4j, making it suitable for both local development and enterprise-scale analysis.

Key Features

Indexes code into graph databases capturing functions, classes, calls, inheritance, and imports across 23 languages
Dual-mode operation: standalone CLI toolkit for developers and MCP server for AI assistants
Real-time file watching to automatically update the code graph as files change
Multiple database backends including embedded FalkorDB Lite, KuzuDB, LadybugDB, and remote Neo4j
Advanced call-chain tracing that follows execution paths across hundreds of files and layers of abstraction
Dead code detection, cyclomatic complexity analysis, and code quality metrics
Interactive web-based graph visualizations with search, node inspection, and multiple layout algorithms
Optional SCIP indexing for C/C++ and C# for more accurate relationship extraction than Tree-sitter alone

Use Cases

  • 01Trace multi-layer call chains and understand execution flow from entry points to specific functions across large codebases
  • 02Perform impact analysis by identifying all code affected by changes to a core function or class
  • 03Enable AI assistants to answer natural-language questions about code structure, dependencies, and relationships
  • 04Find dead code, detect unused imports, and identify high-complexity functions for refactoring
  • 05Understand class hierarchies, interface implementations, and inheritance relationships in object-oriented projects
  • 06Visualize code architecture and relationships through interactive, searchable knowledge graphs

Related MCP Servers

View more

CodeGraphContext — FAQ

What is CodeGraphContext?+

CodeGraphContext is an MCP server and CLI tool that parses local code repositories into a graph database, extracting relationships between functions, classes, calls, and imports. It enables both direct querying via CLI and AI assistant integration through the Model Context Protocol.

How do I install CodeGraphContext?+

Install via pip with 'pip install codegraphcontext', then run 'cgc index .' to index your first repository. For MCP server mode, run 'cgc mcp setup' to configure your AI client, then 'cgc mcp start' to launch the server.

Which AI clients work with CodeGraphContext?+

CodeGraphContext supports VS Code, Cursor, Windsurf, Zed, Claude Desktop, Gemini CLI, ChatGPT Codex, Cline, RooCode, Amazon Q Developer, Kiro, Goose, and OpenCode. The setup wizard can auto-configure most of these clients.

Do I need API keys or external services?+

No external services or API keys are required for basic operation. CodeGraphContext uses embedded databases (FalkorDB Lite or KuzuDB) by default. Optional SCIP indexing for C/C++ requires a compile_commands.json file but no API keys.

Is CodeGraphContext free to use?+

Yes, CodeGraphContext is open source under the MIT License and completely free to use. All core features work with embedded databases at no cost.

What programming languages are supported?+

CodeGraphContext supports 23 languages including Python, JavaScript, TypeScript, Java, C, C++, C#, Go, Rust, Ruby, PHP, Swift, Kotlin, Dart, Scala, Haskell, Elixir, Solidity, and more. Each language parser extracts functions, classes, calls, and relationships.

How do I install CodeGraphContext?+

Open the source repository on GitHub and follow its README. CodeGraphContext is a mcp server — MCP Agents Market links you directly to the official repo.

Is CodeGraphContext free?+

CodeGraphContext is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches