justrach/codedb
Zig code intelligence server and MCP toolset for AI agents. Fast tree, outline, symbol, search, read, edit, deps, snapshot, and remote GitHub repo queries.
What it solves
codedb is a code intelligence server designed specifically for AI agents. It solves the problem of agents struggling to efficiently find and understand large codebases by providing a high-performance context engine that indexes code structurally and textually, rather than just relying on raw file reads or brute-force searches.
How it works
Built in Zig with zero external dependencies, codedb creates a comprehensive index of a project on startup. It uses a combination of structural parsing (for functions, structs, and imports), a trigram index for accelerated full-text search, and an inverted word index for O(1) identifier lookup. A polling file watcher keeps the index updated in real-time. It exposes this intelligence via the Model Context Protocol (MCP) and an HTTP server, allowing AI agents to query symbols, dependencies, and outlines without re-scanning the filesystem.
Who it’s for
Developers using AI agents (such as Claude Code, Cursor, Windsurf, or Devin) who need their agents to have deep, low-latency access to codebase structure and symbols to improve accuracy and reduce token consumption.
Highlights
- Extreme Performance: Pre-indexed queries are orders of magnitude faster than tools like ripgrep or grep.
- MCP Native: Provides 21 specialized tools for agents to explore code, including dependency graphs and symbol lookups.
- Token Efficient: Returns structured, relevant results instead of raw line dumps, significantly reducing the number of tokens used per query.
- Broad Language Support: Full parser support for Zig, C/C++, Python, TypeScript/JavaScript, Rust, Go, PHP, Ruby, HCL, R, and Dart.
- Cloud Intelligence: The
codedb_remotetool allows agents to query indexed public GitHub repositories viaapi.wiki.codeswithout needing a local clone.