
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 分
请在仓库或注册中心条目中声明许可证。