codegraph-rust
100% Rust implementation of code graphRAG with blazing fast AST+FastML parsing, surrealDB backend and advanced agentic code analysis tools through MCP for efficient code agent context management
CodeGraph is a Rust-based MCP server that transforms codebases into semantically searchable knowledge graphs for AI coding assistants. It combines AST parsing, FastML algorithms, embeddings, and a SurrealDB graph backend to enable AI agents to reason about code architecture and relationships rather than just searching text. The server exposes four consolidated agentic tools (context gathering, impact analysis, architecture mapping, and quality assessment) that use graph traversal and semantic search to provide structured, relationship-aware answers to code queries.
Key Features
Use Cases
- 01Understanding architectural dependencies and impact before refactoring critical components
- 02Answering semantic code questions with full relationship context instead of isolated file matches
- 03Mapping call chains and transitive dependencies to assess change blast radius
- 04Identifying code quality hotspots, coupling metrics, and complexity patterns for technical debt prioritization
- 05Providing AI coding assistants with pre-built context so they don't burn tokens on file-by-file discovery
- 06Cross-file navigation and architecture analysis in large multi-language codebases
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-rust — FAQ
What is CodeGraph?+
CodeGraph is an MCP server written in Rust that indexes your codebase into a knowledge graph with embeddings, then exposes agentic analysis tools via the Model Context Protocol. AI assistants like Claude can query it to understand code architecture, dependencies, and relationships instead of reading files one by one.
How do I install and connect CodeGraph to Claude Desktop or Claude Code?+
Clone the repo, run the installation script, start SurrealDB locally, apply the schema, and index your project. Then add CodeGraph to your MCP client config JSON with the command path and stdio args. See the installation steps for exact commands.
Which AI clients work with CodeGraph?+
CodeGraph works with any MCP-compatible client, including Claude Desktop, Claude Code, and Cursor. It communicates via the Model Context Protocol stdio transport.
What are the prerequisites and do I need API keys?+
You need Rust toolchain, SurrealDB (free local or cloud tier), and language-specific LSP servers (rust-analyzer, typescript-language-server, pyright, gopls, jdtls, or clangd) for balanced/full indexing tiers. For embeddings and LLM reasoning, you can use free local models (Ollama) or cloud providers (OpenAI, Anthropic, Jina AI) with your own API keys.
Is CodeGraph free to use?+
Yes, CodeGraph is MIT-licensed and free. SurrealDB offers a free cloud tier, and you can use free local embedding/LLM models via Ollama or LM Studio to avoid cloud API costs.
What languages does CodeGraph support?+
CodeGraph supports Rust, Python, TypeScript, JavaScript, Go, Java, C++, C, Swift, Kotlin, C#, Ruby, PHP, and Dart via tree-sitter parsers and FastML algorithms.
How do I install codegraph-rust?+
Open the source repository on GitHub and follow its README. codegraph-rust is a mcp server — MCP Agents Market links you directly to the official repo.
Is codegraph-rust free?+
codegraph-rust is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.