cocoindex-code vs code-graph-rag
AST-based semantic code search for coding agents: pipx install, zero config, local embeddings out of the box — a CLI/skill/MCP that cuts agent context ~70% vs grepping. Built on CocoIndex. — versus — Parses a polyglot monorepo with Tree-sitter into a Memgraph knowledge graph: query it in plain English (NL→Cypher), trace data flow, find dead code, edit via AST-surgical patches.
Two shapes of code retrieval for agents: cocoindex-code does AST-aware semantic search with local embeddings (pipx install, zero infra); code-graph-rag builds an explicit relationship graph you can walk and mutate. Search-and-read → cocoindex; structure queries and edits → this.
| cocoindex-code | code-graph-rag | |
|---|---|---|
| Stars | 2.6k | 2.5k |
| Forks | 208 | 408 |
| Language | Python | Python |
| License | Apache-2.0 | MIT |
| Last activity | 4 days ago | yesterday |
| Topics | coding, local | coding, rag |
| Curated connections | 5 | 4 |
cocoindex-code — the curator's take
The lowest-friction entry in the code-context-server category: one pipx install, zero config, and the [full] variant ships local embeddings so there's no API key before first search. AST-aware chunking plus the CocoIndex engine underneath means the index stays fresh incrementally instead of rebuilding. Integrates as a skill or MCP with Claude Code, Codex, Cursor. NOT the deepest graph: it's semantic search, not call-graph analysis — no callers/blast-radius queries (that's TokenSave or codegraph-mcp territory) — and the slim install quietly requires a cloud embedding key while [full] costs ~1GB of torch.
code-graph-rag — the curator's take
Deepest of the code-graph tools: not just retrieval — NL→Cypher querying, FLOWS_TO taint tracing across C#/Java/C/Go, dead-code walks from entry points, ast-grep structural search-and-replace, and AST-surgical editing with diff preview, all over mixed languages in one schema. The price is infrastructure: you run Memgraph plus Python tooling. If you only want fast agent context, codebase-memory-mcp (ms indexing, single static binary) or cocoindex-code are far lighter; reach for this when agents need to *query and rewrite* structure, not just find it.