codegraph
Pre-indexed code knowledge graph, auto syncs on code changes, for Claude Code, Codex, Gemini, Cursor, OpenCode, AntiGravity, Kiro, and Hermes Agent — fewer tokens, fewer tool calls, 100% local
CodeGraph is an MCP server that delivers pre-indexed semantic code knowledge graphs to AI coding agents like Claude Code, Cursor, Codex, and GitHub Copilot. It builds a complete graph of symbols, dependencies, and call relationships across 35+ languages using a native Rust kernel, then auto-syncs on every file change. Instead of forcing agents to crawl files one-by-one with grep and read commands, CodeGraph answers structural questions in a single tool call—returning relevant source code, call paths (including dynamic dispatch), and blast-radius analysis. Benchmark testing shows 88% fewer tool calls, 62% fewer tokens, and 53% faster responses compared to file-reading workflows, with zero file reads across all tested repositories.
Key Features
Use Cases
- 01Answering architectural questions like "how does X reach Y" without multi-step file exploration
- 02Tracing call paths and blast radius before refactoring functions or changing APIs
- 03Finding all callers, callees, and affected test files for a modified symbol
- 04Navigating cross-language flows in React Native, Expo, or mixed Swift/ObjC iOS codebases
- 05Discovering framework routes and their handlers across Django, Express, Rails, Spring applications
- 06Reducing token costs and tool calls in AI agent sessions by providing precise context upfront
Related MCP Servers
View moremarkitdown
Python tool for converting files and office documents to Markdown.
firecrawl
The context API to search, scrape, and interact with the web at scale. 🔥
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
codegraph — FAQ
What is CodeGraph?+
CodeGraph is an MCP server that provides AI coding agents with a pre-indexed knowledge graph of your codebase, enabling one-call answers to structural and architectural questions across 35+ languages. It eliminates the need for agents to repeatedly grep and read files by delivering surgical context, call paths, and impact analysis in a single tool response.
How do I install and connect CodeGraph to my AI agent?+
Run the installer with `npx @colbymchenry/codegraph` or use the shell/PowerShell one-liner to install the CLI, then restart your agent (Claude Code, Cursor, Codex, etc.) so the MCP server loads. Finally, run `codegraph init` in each project directory to build the index. The installer auto-detects and configures all supported agents.
Which AI clients does CodeGraph work with?+
CodeGraph supports Claude Code, Cursor, Codex CLI, OpenCode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub Copilot (VS Code, Copilot CLI, JetBrains IDEs). The installer auto-detects installed agents and wires the MCP server into each.
Do I need API keys or an external service?+
No. CodeGraph is 100% local—all indexing, graph storage, and queries happen on your machine using a SQLite database. No data leaves your system, and no API keys or cloud services are required.
Is CodeGraph free to use?+
Yes, CodeGraph is open-source and MIT-licensed. The CLI and MCP server are free, with no usage limits or paid tiers.
Does the index stay up-to-date automatically?+
Yes, auto-sync is enabled by default. CodeGraph uses native file watchers to detect changes and updates the graph within 2 seconds of edits (debounced), so the index is never stale without manual intervention.
How do I install codegraph?+
Open the source repository on GitHub and follow its README. codegraph is a mcp server — MCP Agents Market links you directly to the official repo.
Is codegraph free?+
codegraph is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.