Cursor-style semantic code search as an MCP plugin for Claude Code.
Instead of grepping 50 files and sending 30,000 tokens to Claude, VecGrep returns the top 8 semantically relevant code chunks (~1,600 tokens) — a ~95% token reduction for codebase queries.
- Chunk — Parses source files with tree-sitter to extract semantic units (functions, classes, methods)
- Embed — Encodes each chunk locally using a fine-tuned code search model (384-dim, ~80MB one-time download) via ONNX (~100ms startup) or PyTorch
- Store — Saves embeddings in LanceDB under
~/.vecgrep/<project_hash>/ - Search — ANN index (IVF-PQ) for fast approximate search on large codebases
# Install
uv tool install --python 3.12 vecgrep
# Register with Claude Code (once, works for all projects)
claude mcp add --scope user vecgrep -- vecgrepThen just talk to Claude — it calls VecGrep automatically when you ask about your codebase.
| Repo | Description |
|---|---|
| VecGrep/VecGrep | Core MCP server and CLI |
| VecGrep/action | GitHub Action — index PRs, validate patterns, detect duplicates |
| VecGrep/docs | Documentation (Mintlify) |