What is VecGrep?
VecGrep is a semantic code search and knowledge graph tool that works as an MCP (Model Context Protocol) plugin for Claude Code. Instead of grepping 50 files and sending 30,000 tokens to Claude, VecGrep returns only what’s relevant:How it works
1
Chunk
Parses source files with tree-sitter to extract semantic units — functions, classes, and methods.
2
Embed
Encodes each chunk locally using
all-MiniLM-L6-v2-code-search-512 (384-dim, ~80MB one-time download) via the fastembed ONNX backend (~100ms startup) or PyTorch.3
Store
Saves embeddings and metadata in LanceDB, and optionally a knowledge graph (
graph.json), under ~/.vecgrep/<project_hash>/.4
Search
Uses an ANN index (IVF-PQ) for fast approximate search, keyword search over graph nodes, or a blended hybrid of both.
Which tool to use
Key features
Up to 99.8% token reduction
Returns only relevant chunks or graph nodes instead of entire files.
Fast startup
ONNX backend starts in ~100ms. No PyTorch required by default.
Knowledge graph
AST-based graph index captures calls, imports, inheritance — no LLM required.
Works automatically
Claude decides when to call VecGrep — no manual invocation needed.
