
Vibe Hnindex
io.github.AndyAnh174由 GitHub 帳號 AndyAnh174 發布v0.1.2更新於 Oct 27, 2026
Index source code into a local knowledge base, search with keyword + semantic + hybrid modes.
概覽
本機 MCP 伺服器,為程式碼儲存庫建立一次索引,讓助理以關鍵字、語意或混合模式檢索,並回傳路徑與行號範圍。
- 可以做什麼
- 為資料夾或程式碼庫建立索引,包含多語言 AST 符號圖,支援增量變更偵測與監看模式
- 以關鍵字、語意、混合、正規表達式、符號或自動模式檢索,支援模糊拼字修正與串流進度
- 檢視程式碼結構:尋找參照、呼叫端與有界圖形脈絡,定位檔案或符號並附上程式碼行證據
- 執行程式碼工作階段,並在可設定的安全範圍內套用程式碼變更,自動執行測試、lint 與型別檢查
- 依即時原始碼產生啟發式安全審查線索,可選用重排序
- 跨工作階段保存對話記憶與工作區脈絡
- 適用情境
- 適合長時間在大型或不熟悉的程式碼庫中工作,希望助理直接檢索到含路徑與行號的程式碼,而不必每次工作階段重新讀取檔案。也適用於程式碼導覽、影響分析與輕量原始碼審查,前提是能執行本機元件。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js v22 以上版本。僅關鍵字檢索只需 SQLite;語意與混合檢索需要嵌入服務(預設為本機 Ollama,也可用 OpenAI、Voyage、Gemini 或相容 API)以及 Qdrant,透過 OLLAMA_URL、OLLAMA_MODEL、QDRANT_URL、STORAGE_PATH 設定。Qdrant Cloud 需 QDRANT_API_KEY;選用重排序使用 VOYAGE_API_KEY 或 RERANK_API_KEY。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Vibe Hnindex,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
vibe-hnindex
Local MCP server — index your repo once, search it in every AI session
Keyword (SQLite FTS5) · Semantic (Qdrant + configurable embeddings) · Hybrid — local or cloud embedding providers
[npm vibe-hnindex] [npm hnindex-cli] [License] [MCP] [Node]
Current release: v0.16.1 · MCP server vibe-hnindex · installer hnindex-cli. Release notes
Docs · Changelog · npm server · npm CLI
What this does
vibe-hnindex is a Model Context Protocol server. After you index a folder once, assistants (Claude, Cursor, Windsurf, Antigravity, …) can search that codebase with paths and line ranges — data is stored locally (SQLite + optional Qdrant). Embeddings use Ollama (default), OpenAI, Voyage, Gemini, or an OpenAI-compatible API; see Embedding providers. Cloud providers receive the content being embedded; vectors use Qdrant (Docker, local, or Qdrant Cloud with QDRANT_API_KEY).
Documentation
Source security review: security_audit, security_context and pentest_plan provide live source evidence and validation checks. Optional Voyage/HTTP rerank follows server configuration; rerank:false keeps review local. Results are heuristic review leads with explicit coverage, not confirmed vulnerability reports.
📚 Full docs site: docs.hnindex.cloud — 16 pages covering Getting Started, Configuration, Tools Reference, Guides, and Code Agent.
Also available in-repo: docs/getting-started.md, docs/configuration.md, docs/tools-reference.md.
CLI installer (hnindex)
Optional — writes MCP JSON or Codex TOML for you (merge-safe, same npx -y vibe-hnindex block as in the docs):
See docs.hnindex.cloud for full documentation.
Install in 5 steps
- Node.js — v22+ (nodejs.org). CI verifies Node 22 and 24. SQLite uses N-API binaries bundled for supported platforms; see Troubleshooting → Windows if
npm i vibe-hnindexfails. - Embedding provider — choose OpenAI, Voyage, Gemini or a compatible API, or use local Ollama: install from ollama.com, then:
ollama pull bge-m3:567mand keepollama serverunning (or setOLLAMA_URLto a remote server). - Qdrant — for semantic/hybrid search:
docker run -d --name qdrant -p 6333:6333 qdrant/qdrant(or use Qdrant Cloud). Keyword-only search works without Qdrant. - MCP config — add the server to your assistant’s MCP settings. Minimal example (self-hosted Qdrant):
- Restart the IDE or assistant, then in chat ask to index a path and search — see First steps.
For Qdrant Cloud, add QDRANT_API_KEY and set QDRANT_URL to your HTTPS cluster URL — details in Getting started.
Agent Workspace
workspace_context identifies the active project purpose, Git/index state and a declared task persisted per project/session. locate_code finds files/symbols then keywords locally, returning line evidence and freshness. Explicit hybrid mode uses configured semantic APIs. MCP startup instructions and knowledge://workspace expose this workflow. Project-scoped CLI installs bind their root automatically; global installs follow client roots unless explicitly configured.
See Workspace and code locations. Refresh stale positions before editing; use filesystem tools for unavailable or excluded code.
Code Graph
Build a multilingual AST symbol graph with index_code_graph(path, project_name) using SQLite alone. index_codebase also builds it; file indexing and watching update relationships automatically. Use find_references, callers, and graph_context to inspect source evidence and bounded relationship context. SQLite remains the graph backend. JS/TS retain compiler resolution; Python, PHP, Go, Java, C/C++, C#, Rust, Ruby, Kotlin, Swift, Scala and Lua use bundled offline Tree-sitter profiles. See the language coverage and resolution limits in the graph guide.
AST chunking preserves function/class boundaries where possible. After upgrading, run index_codebase once to rebuild chunks and vectors. See Code Graph guide for resolution limits, offline usage, token budgets and quality evaluation.
Optional rerank
Hybrid search combines keyword results and embedding vectors using RRF. Optional reranking supports Voyage (RERANK_PROVIDER=voyage, VOYAGE_API_KEY or RERANK_API_KEY) and custom HTTP (RERANK_PROVIDER=http, RERANK_URL). Without a reranker, or if it fails, the original retrieval ranking is preserved. Exact symbol/regex modes skip reranking.
See Configuration.
Timeouts
To prevent hanging when Ollama or Qdrant are unresponsive, vibe-hnindex applies timeouts on all external calls. You can tune these via environment variables:
Set any of these to a higher value if you have a slow machine or large dataset. Set to 0 to disable the timeout for that layer (not recommended).
Google Antigravity
Use the same mcpServers block as above, but save it in Antigravity’s MCP file:
Step-by-step: Integrations → Google Antigravity.
Features (short)
Architecture
License
MIT — see LICENSE.
Contributing
Issues and PRs: github.com/AndyAnh174/vibe-hnindex.
Contact
Ho Viet Anh (AndyAnh174) · [email protected] · GitHub
Codex and architecture
Run npx -y hnindex-cli init --mcp codex inside the project, then optionally npx -y hnindex-cli init-skill --target codex. Codex project MCP uses .codex/config.toml (trusted projects only); skills use .agents/skills/use-vibe-hnindex. Restart/reconnect Codex and ask for workspace_context, followed by index_code_graph.
See CLI configuration, system, sequence and user diagrams, and official Codex MCP setup.
來源:README.md,提交 f90d4da
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。