Cursor-style vector search MCP plugin for Claude Code
Project description
VecGrep
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). That's a ~95% token reduction for codebase queries.
How it works
- Chunk — Parses source files with tree-sitter to extract semantic units (functions, classes, methods)
- Embed — Encodes each chunk locally using
all-MiniLM-L6-v2(384-dim, ~80MB one-time download) - Store — Saves embeddings + metadata in SQLite under
~/.vecgrep/<project_hash>/ - Search — Cosine similarity over all embeddings returns the most relevant snippets
Incremental re-indexing via SHA256 file hashing skips unchanged files.
Installation
Requires Python 3.12+ and uv.
pip install vecgrep # standard pip
uv tool install vecgrep # uv tool (isolated, recommended)
Claude Code integration
Add to your Claude Code MCP settings (~/.claude/claude_desktop_config.json or via claude mcp add):
{
"mcpServers": {
"vecgrep": {
"command": "uvx",
"args": ["vecgrep"]
}
}
}
Or with the CLI:
claude mcp add vecgrep -- uvx vecgrep
uvx downloads and runs VecGrep in an isolated environment on first use — no cloning or manual setup required.
Tools
index_codebase(path, force=False)
Index a project directory. Skips unchanged files on subsequent calls.
index_codebase("/path/to/myproject")
# → "Indexed 142 file(s), 1847 chunk(s) added (0 file(s) skipped, unchanged)"
search_code(query, path, top_k=8)
Semantic search. Auto-indexes if no index exists.
search_code("how does user authentication work", "/path/to/myproject")
Returns formatted snippets with file paths, line numbers, and similarity scores:
[1] src/auth.py:45-72 (score: 0.87)
def authenticate_user(token: str) -> User:
...
[2] src/middleware.py:12-28 (score: 0.81)
...
get_index_status(path)
Check index statistics.
Index status for: /path/to/myproject
Files indexed: 142
Total chunks: 1847
Last indexed: 2026-02-22T07:20:31+00:00
Index size: 28.4 MB
Supported languages
Python, JavaScript/TypeScript, Rust, Go, Java, C/C++, Ruby, Swift, Kotlin, C#
All other text files fall back to sliding-window line chunks.
Index location
~/.vecgrep/<sha256-of-project-path>/index.db
Each project gets its own isolated index. Delete the directory to wipe the index.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vecgrep-1.0.0.tar.gz.
File metadata
- Download URL: vecgrep-1.0.0.tar.gz
- Upload date:
- Size: 119.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38b30e57149d76b76116f1c423b70a44afca65f57e248a31b2849122c8194c54
|
|
| MD5 |
eae2723d559ee88e15b292b5285a3a09
|
|
| BLAKE2b-256 |
2b2bc37d22e2554af853f676bb86109e3d21e45beedb8b618421daa87495fee4
|
File details
Details for the file vecgrep-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vecgrep-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cf7eebf4dbae30659bdd62027d9e8cff9596a5f453e56ca82886fd5f41bc64d
|
|
| MD5 |
6d21d961cd55fd0d602ca5abbecb4cdf
|
|
| BLAKE2b-256 |
76ffd9c0e3a3d72678b2a1736daa26b5499183a2d8bb8ded9e74d785668c03ce
|