embgrep
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@embgrepsearch the project for 'authentication middleware'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
embgrep
Local semantic search — embedding-powered grep for files, zero external services.
Search your codebase and documentation by meaning, not just keywords. embgrep indexes files into local embeddings and lets you run semantic queries — no API keys, no cloud services, no vector database servers.
Features
Local embeddings — Uses fastembed (ONNX Runtime), no API keys needed
SQLite storage — Single-file index, no external vector DB
Incremental indexing — Only re-indexes changed files (SHA-256 hash comparison)
Smart chunking — Function-level splitting for code, heading-level for docs
MCP native — 4-tool FastMCP server for LLM agent integration
15+ file types —
.py,.js,.ts,.java,.go,.rs,.md,.txt,.yaml,.json,.toml, and more
Related MCP server: Personal Semantic Search MCP
Install
pip install embgrep # core (fastembed + numpy)
pip install embgrep[cli] # + click/rich CLI
pip install embgrep[mcp] # + FastMCP server
pip install embgrep[all] # everythingQuick Start
Python API
from embgrep import EmbGrep
eg = EmbGrep()
# Index a directory
eg.index("./my-project", patterns=["*.py", "*.md"])
# Semantic search
results = eg.search("database connection pooling", top_k=5)
for r in results:
print(f"{r.file_path}:{r.line_start}-{r.line_end} (score: {r.score:.4f})")
print(f" {r.chunk_text[:80]}...")
# Incremental update (only changed files)
eg.update()
# Index statistics
status = eg.status()
print(f"{status.total_files} files, {status.total_chunks} chunks, {status.index_size_mb} MB")
eg.close()CLI
# Index a project
embgrep index ./my-project --patterns "*.py,*.md"
# Search
embgrep search "error handling patterns"
# Filter by file type
embgrep search "async database query" --path-filter "%.py"
# Check status
embgrep status
# Update changed files
embgrep updateConvenience functions
import embgrep
embgrep.index("./src")
results = embgrep.search("authentication middleware")
status = embgrep.status()
embgrep.update()MCP Server
Add to your Claude Desktop / MCP client configuration:
{
"mcpServers": {
"embgrep": {
"command": "embgrep-mcp"
}
}
}Or with uvx:
{
"mcpServers": {
"embgrep": {
"command": "uvx",
"args": ["--from", "embgrep[mcp]", "embgrep-mcp"]
}
}
}MCP Tools
Tool | Description |
| Index files in a directory for semantic search |
| Search indexed files using natural language |
| Get current index statistics |
| Incremental update — re-index changed files only |
How It Works
flowchart TD
A["📁 Files"] --> B["Smart Chunking\ncode: function-level\ndocs: heading-level"]
B --> C["fastembed\nlocal embeddings"]
C --> D["SQLite\nvector index"]
D --> E["🔍 Query"]
E --> F["Cosine Similarity\nranked results"]
F --> G["✅ Matches\nwith context"]Chunking — Files are split into semantically meaningful chunks:
Code files (
.py,.js,.ts, etc.): split by function/class boundariesDocuments (
.md,.txt): split by headings or paragraph breaksConfig files: fixed-size chunking
Embedding — Each chunk is converted to a 384-dimensional vector using BGE-small-en-v1.5 via ONNX Runtime (no PyTorch needed)
Storage — Embeddings are stored as BLOBs in a local SQLite database
Search — Query text is embedded and compared against all chunks using cosine similarity
Configuration
Parameter | Default | Description |
|
| SQLite database location |
|
| fastembed model name |
| 1000 chars | Maximum chunk size for fixed-size splitting |
| 5 | Number of search results |
QuartzUnit Ecosystem
Package | Description |
HTML/YouTube/PDF/DOCX to LLM-ready markdown | |
URL to screenshot + metadata | |
OCR + LLM document structure extraction | |
Local LLM browser agent | |
RSS feed collection + MCP | |
embgrep | Local semantic search for files |
Used in
newswatch — RSS news monitoring pipeline (feedkit → markgrab → embgrep → diffgrab)
License
MIT
Part of the QuartzUnit ecosystem — composable Python libraries for data collection, extraction, search, and AI agent safety.
This server cannot be deployed
Maintenance
Related MCP Connectors
Ingest, manage, and retrieve documents for RAG-powered AI applications
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory for AI agents. Search, store, and recall across sessions.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides intelligent retrieval capabilities for local files by scanning directories, generating vector indexes, and enabling semantic search through RAG (Retrieval Augmented Generation) with incremental indexing support.2-
- FlicenseNot gradedqualityDmaintenanceEnables semantic search over local notes and documents using natural language queries. Supports multiple file types (Markdown, Python, HTML, JSON, CSV, text) with fast local embeddings and persistent ChromaDB vector storage.1-
- AlicenseAqualityDmaintenanceProvides semantic code search over codebases using local embeddings with natural language queries. Supports hybrid search, file watching, and respects .gitignore.115MIT
- AlicenseNot gradedqualityCmaintenanceSemantic search and retrieval system for local documents using vector embeddings, enabling AI-powered search across your document collections with support for multiple embedding providers.9MIT