zebrarag

Overview

zebrarag is a local-first semantic code index and MCP server. It parses your codebase with tree-sitter, chunks it by structure, embeds everything on your own hardware, and exposes fast query tools for AI coding agents — no cloud, no API keys.

How it works

your repo
  ↓ tree-sitter
AST symbols + edges
  ↓ chunking
semantic chunks (symbol-aware or recursive)
  ↓ Candle (BERT/Jina)
float32 embeddings  →  TurboQuant (int8)
  ↓ LanceDB + usearch
vector + full-text index
  ↓ MCP stdio server
AI agent tools: searchQuery · searchDep · fileTree · …

Architecture

zebrarag is a workspace of focused Rust crates:

CrateRole
zrag-daemonBackground process, handles IPC requests
zrag-pipelineIndex + search pipeline orchestration
zrag-dslTree-sitter code parsing, chunking, call graphs
zrag-embedCandle-based embedding engine (BERT, Jina, BGE, …)
zrag-annANN index (usearch) + TurboQuant reranker
zrag-storeLanceDB storage layer
zrag-protocolIPC request/response types
zrag-tree-sitterLanguage detection + tree-sitter frontends
zrag-rerankTurboQuant reranking (CPU & GPU)
apps/zebraragCLI, TUI, and MCP server entry point

Key properties

Quick start

cargo install --git https://github.com/hicaru/zebra_tree_indexer

# index the current project
zebrarag index .

# search from the terminal
zebrarag search "retry logic"

# start as MCP stdio server for AI agents
zebrarag --mcp

See install for full setup and MCP config snippets.