codegraph vs codebase-memory-mcp
Local code knowledge graphs for coding agents compared
codegraph and codebase-memory-mcp both build local code knowledge graphs that coding agents can query through MCP. codegraph emphasizes incremental indexing and agent setup, while codebase-memory-mcp offers a broader set of graph, search, and visualization capabilities.

codegraph: Give Coding Agents a Local Code Knowledge Graph
CodeGraph builds and maintains a local graph of code structure so AI coding agents can retrieve relevant source, call paths, and change impact without exploring files one by one. It connects to multiple agents through MCP and supports many languages.

codebase-memory-mcp: Build a Searchable Code Knowledge Graph
A local MCP server that indexes repositories into a persistent graph of code structure and relationships. It helps AI coding agents answer architectural and code-navigation questions with focused queries instead of repeated file searches.
| codegraph | codebase-memory-mcp | |
|---|---|---|
| Language | C | C |
| License | MIT | MIT |
| Stars | 73.1k | 45.7k |
| Forks | 4.7k | 3.8k |
| Last analyzed | Oct 3, 2026 | Oct 3, 2026 |
Key differences
- codegraph describes its MCP tool as returning relevant source, call paths, and impact context; codebase-memory-mcp lists separate tools for structural search, architecture summaries, code search, and graph queries.
- codegraph watches project files and incrementally syncs changes; codebase-memory-mcp describes automatic change detection and re-indexing.
- codegraph offers CLI commands for symbol search, tracing, impact checks, and finding affected tests; codebase-memory-mcp supports one-shot CLI access and an optional browser-based graph visualization UI.
- codebase-memory-mcp describes bundled tree-sitter grammars and Hybrid LSP semantic type resolution for supported languages; codegraph describes broad language support and framework route recognition.
- Both projects list C as their language and MIT as their license. The supplied figures list 73.1k stars and 4.7k forks for codegraph, and 45.7k stars and 3.8k forks for codebase-memory-mcp.
- codegraph reports anonymous usage telemetry by default with opt-out options; codebase-memory-mcp advises reviewing its configuration and security documentation to audit installer changes. Both are listed as not archived.
Choose codegraph if you…
- need CLI workflows that include finding tests related to changed source files.
- want agent configuration installation for Claude Code, Cursor, Codex, Gemini, or GitHub Copilot.
- prefer an index that incrementally syncs file changes and stores project data in local SQLite.
Choose codebase-memory-mcp if you…
- want optional browser-based graph visualization or one-shot CLI access.
- need the described combination of structural, semantic, full-text, and graph queries.
- work across services and want to explore route-to-call relationships or cross-repository links.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.