
Embgrep
io.github.ArkNill由 GitHub 帳號 ArkNill 發布v0.1.0更新於 Oct 24, 2026
Local semantic search — embedding-powered grep for files, zero external services.
概覽
Embgrep 是本地 MCP 伺服器,會將檔案索引成向量嵌入,讓助理能對程式碼庫或文件進行語意搜尋。
- 可以做什麼
- 它提供四個工具:index_directory 用來索引目錄中的檔案,semantic_search 用自然語言查詢已索引的檔案,index_status 取得索引統計資訊,update_index 只針對變更過的檔案進行增量重建索引。檔案會依函式層級或標題層級切分成片段,使用 fastembed 與 ONNX Runtime 在本機產生嵌入,並以向量形式存進單一 SQLite 檔案。搜尋依餘弦相似度排序,回傳檔案路徑、行號範圍與分數。
- 適用情境
- 適合助理需要依語意而非精確關鍵字尋找程式碼或文件的情況,例如定位驗證中介軟體或資料庫連線池相關邏輯。也適合本機專案,希望在不必把檔案內容送到雲端服務、也不用另外執行向量資料庫的前提下進行語意搜尋。
- 執行需求
- 以本機行程在使用者電腦上執行,從 PyPI 安裝 embgrep 並加上 mcp 擴充(例如透過 uvx)。需要具備 fastembed 與 numpy 的 Python 環境,首次使用時會下載 BAAI/bge-small-en-v1.5 模型。不需要 API 金鑰、帳號或外部服務。索引預設儲存在 ~/.local/share/embgrep/embgrep.db。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Embgrep,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
embgrep
Local semantic search — embedding-powered grep for files, zero external services.
[PyPI] [Python] [License: MIT]
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
Install
Quick Start
Python API
CLI
Convenience functions
MCP Server
Add to your Claude Desktop / MCP client configuration:
Or with uvx:
MCP Tools
How It Works
-
Chunking — Files are split into semantically meaningful chunks:
- Code files (
.py,.js,.ts, etc.): split by function/class boundaries - Documents (
.md,.txt): split by headings or paragraph breaks - Config files: fixed-size chunking
- Code files (
-
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
QuartzUnit Ecosystem
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.
來源:README.md,提交 3e4f6da
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分