code-kb
Interactive Showcase & Benchmarks: https://anortham.github.io/code-kb/
code-kb is a code-intelligence engine and Model Context Protocol (MCP) server for AI coding agents.
Backed by julie-extractors,
code-kb returns file outlines, symbol bodies, reference evidence and edit checks.
Individual responses are 61–99% smaller than a full-file read in
measured examples.
Those comparisons measure response size. The
completed-edit comparison measures
accepted patches, observed tokens and time against native tools.
Agents edit with their native filesystem tools; code-kb automatically refreshes
indexed files after filesystem changes.
Support covers every language reported by the pinned Julie extractor, currently 42 code, markup,
configuration, and data languages. Real-extractor fixtures check each language; advanced checks
follow its call and type semantics. See language support and tested coverage
for the fixture inventory and remaining limits.
Why code-kb?
When a task needs one signature or implementation, a file outline or symbol body can supply that context without loading the whole file.
code-kb exposes progressively more detail:
- Repository Orientation (
file_skeleton on a folder): Understand directory structures and key exports in a few hundred tokens.
- File Skeletons (
file_skeleton): Inspect function signatures, types, traits, and docstrings with implementation bodies stripped.
- Symbol Lookup & Discovery (
lookup_symbol): Instant exact/prefix identifier lookups. A query that names no symbol exactly also gets ranked conceptual matches over names, signatures, and docstrings; substrings inside identifiers are found (sha256 finds parseSha256Sidecar).
- One-Call Edit Context (
get_symbol_context): In a single turn, fetch a target function's body and return type, a summary of its callers with evidence labels, the tests to run with their commands, the markers its sibling symbols share, its callee signatures, its parameter types, and the open ends of a short impact walk.
- Fresh Indexes: Filesystem edits automatically refresh indexed files, and target body and skeleton reads refresh their file before answering.
Key Principles
- Small Retained Memory: Written in Rust, zero heavy runtimes (no web dashboard, no GPU models), retained process memory is about 25–40 MB, and about 50–60 MB after a callers report of a common name in a large project. The plugin launcher is a small Node script that replaces itself with the native binary via
process.execve on supported POSIX Node 22+ runtimes (or waits via spawn on Windows/older Node).
- Millisecond Query Latency: Direct SQLite queries in WAL mode with zero in-memory heap bloat. On this repository a warm symbol body or small skeleton takes 1–4 ms, and most other calls take 10–100 ms; a concept search, a callers report, or
blast_radius can take up to about 200 ms, and check_edit takes 1–5 s on a real diff.
- One
project_root on Every Call: Every tool takes project_root, the absolute path of the project or git worktree the agent works in (lookup_symbol(project_root="/path/to/project", query="...")). A root in every call cannot go stale, so a move to a worktree never answers from the old index.
- CLI-First Parity: Every MCP tool has an exact 1:1 CLI command for instantaneous terminal verification and dogfooding.
- Automatic Index Sync: No tool manages the index, and none is needed. A debounced background watcher refreshes changed files and runs one bulk scan for a Git storm. A reconcile runs at startup and when a call switches to another root. Body and skeleton reads refresh their target file first.
Install
Install the plugin for your agent. The plugin ships a small Node.js launcher. On the first
run it downloads the matching code-kb release archive for your platform, verifies its
SHA-256, and unpacks code-kb and julie-extract into ~/.code-kb/dist/<version>/. Later
runs start instantly. Nothing else to download or put on PATH.
Requirements:
- Node.js 18 or newer on
PATH (the launcher is a Node script; the server itself is a native binary).
- Windows 10 build 17063 or newer (the launcher unpacks with the built-in
tar.exe).
Claude Code