Your AI assistant doesn't understand your codebase. It reads files, guesses at function names, invents import paths, and hallucinates enum values. Then you fix its mistakes. Then it makes them again next session.
Kodegraf gives it a memory. It parses your code into a queryable graph — every function signature, every import path, every type definition — and serves that knowledge to your AI through MCP. Your assistant stops guessing. It looks things up.
Built in Rust. Parses 37,000 files in 46 seconds. Searches in 23ms. Zero runtime dependencies.
Install
Set Up (once per project)
This single command handles everything: parses your codebase, builds the graph, registers the MCP server, and configures your editor. Open Claude Code (or Cursor, Windsurf, Zed) and start working.
What Happens Next
When your AI assistant needs to find a function, it queries the graph instead of grepping thousands of files. When it writes code, Kodegraf validates the imports, function calls, and enum values against what actually exists. When you switch branches, the graph updates automatically.
You: "How is authentication implemented?"
Without Kodegraf: With Kodegraf:
Grep("auth") → 200+ matches kodegraf_find("auth") → 3 results
Read 8 files → 25K tokens Exact signatures, file:line
Guesses import path → wrong Verified import path → correct
3 fix cycles Works first try
17 Tools
| Tool | What it does |
|---|---|
kodegraf_find |
Find functions, classes, types by name with signatures |
kodegraf_search |
Full-text search across all symbols (FTS5 + porter stemmer) |
kodegraf_deps |
What does this file import? |
kodegraf_dependents |
What imports this file? |
kodegraf_impact |
Blast radius — what breaks if you change this? |
kodegraf_check |
Validate code against the graph (DiffGuard) |
kodegraf_exports |
List a file's exported symbols |
kodegraf_enum_values |
Get valid enum values (never guess) |
kodegraf_context |
~100 token summary with next-step suggestions |
kodegraf_query |
Trace callers, callees, imports, tests for any symbol |
kodegraf_changes |
Risk-scored git diff with test gap detection |
kodegraf_flows |
Execution flows sorted by criticality |
kodegraf_affected_flows |
Which user-facing paths are impacted by changes? |
kodegraf_large |
Find oversized functions for decomposition |
kodegraf_dead_code |
Find unreferenced code |
kodegraf_build |
Build or update the graph |
kodegraf_insights |
Quality metrics and failure patterns |
DiffGuard
Every time your AI writes code, Kodegraf checks it against the graph:
- Does the import path resolve to a real file?
- Does the function being called actually exist?
- Does the function signature match (parameter count, types)?
- Is the enum value valid?
Errors are caught before they reach your PR. Failures are recorded, patterns are detected, and prevention rules are generated automatically. The system gets smarter every session.
Performance
Tested on a production monorepo with 37,000 source files:
| Metric | Value |
|---|---|
| Full build | 46 seconds |
| Incremental update | 191ms |
| Search latency (avg) | 23ms |
| Search latency (P99) | 200ms |
| Symbols indexed | 390,000 |
| Dependency edges | 2.5 million |
Parallel parsing with 8 threads. SQLite with WAL mode, FTS5 full-text search, 64MB cache. All queries use prepared statements.
Languages
TypeScript, JavaScript, Python, Go, Rust, Java, Ruby, C, C++, C#, Scala.
How It Integrates
kodegraf install sets up five layers automatically:
- MCP Server — registers with your AI tool via
.mcp.json - Instructions — prepends CLAUDE.md with "use Kodegraf tools first"
- Hooks — auto-updates graph after every file edit (191ms, silent)
- Skills — workflow templates for explore, review, debug, refactor
- Auto-build — graph rebuilt on session start if empty or stale
Works with Claude Code, Cursor, Windsurf, Zed, and Continue.
CLI
Architecture
Four Rust crates. Two binaries. One SQLite database.
| Crate | What it does |
|---|---|
| kodegraf-core | Graph store, tree-sitter parser, FTS5 search, flow detection, signals |
| kodegraf-checks | DiffGuard — 12 validation rules with fuzzy matching |
| kodegraf-cli | CLI binary with all commands |
| kodegraf-mcp | MCP server (rmcp SDK, 17 tools, stdio transport) |
Development
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md. Kodegraf is local-only — no network calls, no telemetry, no cloud.
License
MIT