Skip to main content

Indexing / AST / Vectorization

Use indexing when you know what the code does but don’t know its name. For example: "Where is the code that handles authentication?"

Fit: repos big enough that Grep costs real context. Skip on small repos, one-shot tasks, or prototype churn.

Solo Dev — CocoIndex​

CocoIndex runs locally using embedded sqlite-vec and an on-device SentenceTransformer. You do not need to run a separate vector service.

pipx install 'cocoindex-code[full]'
cd /path/to/your/project && ccc init
claude mcp add cocoindex -s user -- ccc mcp

Add these instructions to AGENTS.md:

When looking for code by behaviour rather than by name, use the cocoindex
MCP `search` tool. It returns AST-aligned chunks with file paths and
line ranges, at a fraction of the token cost of reading files.

The first index takes 5–15 minutes for a repository with a few thousand files. Incremental updates take seconds.

Telemetry note. CocoIndex ships anonymous usage telemetry on by default — COCOINDEX_DISABLE_USAGE_TRACKING=1 disables it.

Org — claude-context​

claude-context uses Milvus to store an index that developers and CI jobs can share. It combines BM25 keyword search with dense retrieval.

docker compose -f docker-compose.milvus.yml up -d
ollama pull nomic-embed-text
claude mcp add claude-context -s user -- <claude-context server command>

For a shared setup, deploy Milvus, attu, and Ollama in your team’s cluster using its existing Helm chart conventions.

Dive deeper​