Jakedismo/codegraph-rust
Rust GraphRAG over MCP for codebase context and change-impact analysis
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
CodeGraph is a Rust workspace with separate parser, graph, vector, and MCP crates, including dedicated MCP tool, server, and daemon crates. Indexing extracts source spans and relationships with AST parsing and FastML. The selected tier determines whether build context, LSP resolution, and enrichment also run. SurrealDB backs the code graph, while embeddings support semantic retrieval. The combination lets an agent retrieve relevant code and then follow its recorded relationships instead of treating each retrieved snippet as an isolated result.
The same four agentic operations are available through the CLI and MCP over stdio. Rig supplies the reasoning layer: ReAct is the default tool-calling loop, LATS explores and evaluates candidate branches using their graph observations, and Reflexion retries with error feedback. Index construction is separate from this query-time reasoning, and embedding and semantic-resolution scheduling can be configured independently of the extraction tier.
Key Capabilities & Differentiators
The default fast tier keeps AST nodes and core edges without LSP or enrichment. balanced adds build context, LSP symbols, module links, and document and contract enrichment, while still filtering out References edges. full enables all analyzers and LSP definitions without that edge filtering. The richer graph can connect Markdown and SurrealQL documentation to backticked symbols, represent Rust-local dataflow, and surface package cycles or configured boundary violations.
agentic_context, agentic_impact, agentic_architecture, and agentic_quality cover context assembly, dependency and call-chain analysis, system structure and API surfaces, and complexity or coupling hotspots. Full, single-file, and watch indexing reconcile against the same project-wide catalog, retaining caller information across edits, renames, and deletions. For embeddings, Ollama and LM Studio are covered by batching controls; Ollama input handling accounts for model and serving context, including Qwen3 Embedding and nomic-embed-text-v2-moe.
Trade-offs & Limitations
Compared with grep or editor LSP alone, CodeGraph is most useful when the starting point is a question rather than a known string or symbol, and the answer requires following relationships across files. It can retrieve by meaning and then traverse call or dependency edges. In exchange, the team has an index to keep current and an additional model in the query path. Treat change-impact output as evidence to verify, not as a complete list of everything a refactor will break.
Start with fast and move up when missing edge types limit useful answers; richer extraction adds analyzer and storage costs without guaranteeing better answers. Deferred inference can make structural graph data available before semantic processing finishes. LATS adds candidate exploration and evaluator calls, so use ReAct as a baseline before paying for the extra work. Cloud providers add network, quota, cost, and source-data considerations; local inference shifts the load to model-serving hardware. The Cargo workspace declares MIT OR Apache-2.0, but verify repository-level coverage and dependency and model terms before redistribution.
Hardware & Deployment Guide
The Cargo workspace declares Rust 1.95 and edition 2024. It defaults to the core crate, so a plain workspace-root build should not be assumed to produce the CLI. The tree includes install-codegraph.sh and install-codegraph-full-features.sh. Configure embedding and LLM providers through the project .env or environment, then start with codegraph index /path/to/project --index-tier fast. Use the CLI directly or launch codegraph start stdio from an MCP client. The Python manifest is for test utilities, not the server runtime.
balanced and full fail early if required LSP tooling is absent. Check rust-analyzer --version from the target Rust project; JavaScript and TypeScript require Node.js and typescript-language-server, while Python requires Node.js and pyright-langserver. For offline Ollama use, pre-stage the model weights and tokenizer: recognized tokenizers can be downloaded on first use, but weights are not. No GitHub release is listed, so pin a source revision and validate build flags and indexing behavior before rolling it out to a team.
fast keeps AST nodes and core edges; balanced adds LSP symbols and module linking; full adds definition resolution and dataflow.sync, deferred, and off policies; deferred work is resumable.truncate=false.codegraph.boundaries.toml matches denied package dependencies and records violates_boundary edges.Teams maintaining a shared codebase whose agents repeatedly need cross-file context, caller tracing, or package-boundary analysis, and that can keep the index and model providers operational.
Exact search and editor navigation already cover the work, or policy prohibits sending source to remote providers and the team cannot provision local inference.
Quick Start & Installation
# Install LLVM so ld64.lld is on PATH (Homebrew) brew install llvm # Use the repo-provided Makefile targets make build-llvm make test-llvm
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| codegraph-rust ★ | 927 | +5 | Rust | — | Rust GraphRAG over MCP for codebase context and change-impact analysis |
| graphify | 156.8k | +2.4k | Python | Apache-2.0 | Local AST graphs for dependency tracing, with CLI and MCP access. |
| codebase-memory-mcp | 49.6k | +335 | C | MIT | A local code graph for tracing code, docs, and infrastructure via MCP. |
| taste-skill | 125.3k | +2.9k | JavaScript | MIT | An agent skill for directing company website design and checking builds in a bro |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Jakedismo/codegraph-rust.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about codegraph-rust
How does CodeGraph fit into an existing coding-agent workflow?
codegraph agent context from the shell or configure an MCP-compatible client to launch codegraph start stdio. The CLI and MCP expose the same four agentic operations. codegraph init offers project-local hook setup and adds agent instructions; persistent cross-session memory is a separate sibling project.Does running the Rust CLI locally require a GPU?
What should we verify before commercial use or private self-hosting?
MIT OR Apache-2.0, but the repository-level license is unspecified. Before commercial redistribution, verify the terms for the exact files, bundled dependencies, and model artifacts you intend to ship. For private self-hosting, verify the embedding and LLM endpoints separately: local CLI execution does not make remote inference local. An offline Ollama setup also needs model weights and a tokenizer provisioned in advance.When is CodeGraph worth using instead of grep and editor LSP?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy