codedb
Zig-built code intelligence server that gives AI coding agents symbols, outlines, callers, dependencies and search over MCP.
At a Glance
codedb core MCP code intelligence server, open source under the BSD-3-Clause license, free to install and self-host.
Engagement
Available On
Alternatives
Listed Nov 2026
About codedb
codedb is a code intelligence engine for coding agents, written in Zig and published by Rach Pradhan (justrach) as part of the Codegraff product family. It indexes a repository locally and exposes structural context to any MCP client. It has no edit capability, so the client uses its own native tools to make changes.
What It Is
codedb is a single binary that runs as an MCP server over stdio JSON-RPC, with an optional localhost HTTP server and a CLI. On startup it walks the codebase and builds in-memory indexes: outlines, a word index, a trigram index, a dependency graph and a content cache. A file watcher keeps them fresh. Agents query these indexes instead of shelling out to grep or reading whole files.
How the Workflow Works
By default agents see five one-shot tools: context, explain, callpath, list_dir and status. Other tools cover tree, outline, symbol, search, word, callers, deps, read, changes, snapshot and glob. codedb_context composes task-shaped context with hybrid retrieval. codedb_explain returns a definition and its callers. codedb_callpath traces a call chain between symbols. The CLI exposes similar commands such as tree, outline, find, search, word and hot.
Languages and Clients
Parsers cover Zig, C/C++, Python, TypeScript/JavaScript, Rust, Go, PHP, Ruby, HCL, R, Dart/Flutter and OCaml. The installer registers codedb as an MCP server in clients including Claude Code, Codex, Gemini CLI, Cursor, Windsurf, Devin, Cline, Copilot CLI, Kiro and OpenCode. Binaries exist for macOS, Linux and Windows. The README lists the project as alpha, so APIs and snapshot formats can change.
Data and Privacy Model
Structural search runs locally. The default hybrid retrieval in codedb_context also uses a hosted embedding service, while semantic=local keeps retrieval fully on-device. Sensitive files such as .env and key files are excluded from indexing. Anonymous telemetry is on by default and can be disabled with --no-telemetry or CODEDB_NO_TELEMETRY.
Performance Claims
The project's own benchmarks, run on an Apple M4 Pro, report sub-millisecond warm MCP queries and large reductions in tokens per response compared with ripgrep and grep output.
Community Discussions
Be the first to start a conversation about codedb
Share your experience with codedb, ask questions, or help others learn from your insights.
Pricing
Open Source
codedb core MCP code intelligence server, open source under the BSD-3-Clause license, free to install and self-host.
- BSD 3-Clause licensed core
- Single Zig binary running as a local MCP server
- Structural search runs locally
- Default hybrid retrieval uses a free hosted embedding service; semantic=local keeps retrieval local-only
Capabilities
Key Features
- In-memory outline, word, trigram, dependency-graph and content indexes
- Task-shaped context retrieval with hybrid or local-only semantic mode
- Symbol definitions, callers and call-path tracing
- Typed dependency graph
- Trigram-accelerated full-text and regex search
- File watcher for live index updates
- Portable snapshots
- MCP server over stdio plus optional HTTP server on port 7719
- CLI commands for tree, outline, find, search, word and hot
- Automatic MCP registration across many coding clients
- Local-only semantic mode and telemetry opt-out
