npm vibe-hnindexstdioupdated 2mo ago
Local MCP server โ index your repo once, search it in every AI session
What can you do with vibe hnindex?
vibe-hnindex
Local MCP server โ index your repo once, search it in every AI session
Keyword (SQLite FTS5) ยท Semantic (Qdrant + Ollama embeddings) ยท Hybrid โ your code stays on disk
MCP server (vibe-hnindex) latest: v0.12.0 ยท hnindex-cli v0.12.0 โ Docs ยท Changelog ยท GitHub Releases
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; vectors use Qdrant (Docker, local, or Qdrant Cloud with QDRANT_API_KEY).
Documentation
๐ Full docs site: docs.hnindex.cloud โ 16 pages covering Getting Started, Configuration, Tools Reference, Guides, and Code Agent.
| Page | What you'll learn |
|---|---|
| Introduction | What vibe-hnindex does, key features, how it works |
| Installation | Node, Ollama, Qdrant setup + MCP config |
| Quick Start | 5-minute walkthrough with CLI + agent skill |
| Configuration | All 25+ env vars with embedding model comparison |
| Search | 6 search modes, regex, fuzzy, streaming, cache |
| Code Agent ๐ | code_session + code_apply with safety scopes |
| Setup MCP | Per-platform config (Claude, Cursor, Antigravity, VS Code...) |
Also available in-repo: docs/getting-started.md, docs/configuration.md, docs/tools-reference.md.
CLI installer (hnindex)
Optional โ writes the MCP JSON for you (merge-safe, same npx -y vibe-hnindex block as in the docs):
npm install -g hnindex-cli
# Setup MCP config
hnindex init --mcp antigravity # or: claude, cursor, windsurf, vscode, codex
hnindex init --list # show all targets and paths
# Install AI agent skill (recommended)
hnindex init-skill --target claude # or: antigravity, cursor, windsurf, vscode
hnindex init-skill --list # show all skill targets
# Update
hnindex update # npm update -g hnindex-cli
See docs.hnindex.cloud for full documentation.
Install in 5 steps
- Node.js โ v20+ (nodejs.org). On Windows, Node 20 or 22 LTS is strongly recommended so
npm installdoes not need a C++ compiler. See Troubleshooting โ Windows ifnpm i vibe-hnindexfails. - 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):
{
"mcpServers": {
"vibe-hnindex": {
"command": "npx",
"args": ["-y", "vibe-hnindex"],
"env": {
"OLLAMA_URL": "http://localhost:11434",
"OLLAMA_MODEL": "bge-m3:567m",
"QDRANT_URL": "http://localhost:6333",
"SEARCH_STREAM_ENABLED": "true",
"CODE_AGENT_ENABLED": "true",
"CODE_AGENT_SCOPE": "moderate",
"CHAT_MEMORY_ENABLED": "true"
}
}
}
}
- 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.
Optional rerank (RERANK_URL)
Semantic/hybrid search already uses Ollama (OLLAMA_URL, OLLAMA_MODEL e.g. bge-m3:567m) for query vectors and Qdrant for retrieval. After that, the server can reorder the top pool of hits:
- Without
RERANK_URL: reorder by Qdrant semantic scores (no extra network service). This is enough for most setups, including when you only run Ollama + Qdrant. - With
RERANK_URL: POST JSON{ "query", "documents" }to your URL; response{ "scores": number[] }(same length asdocuments). Use a small HTTP service you host that wraps your reranker; Ollama does not expose this contract on:11434by default.
Ollama vs rerank: pulling a reranker model in Ollama (e.g. qllama/bge-reranker-v2-m3) does not replace RERANK_URLโyou still need an adapter service unless you only rely on the built-in Qdrant reorder. See Configuration โ Rerank.
| Env | Role |
|---|---|
SEARCH_RERANK |
false disables post-retrieval reorder entirely (default: enabled). |
SEARCH_RERANK_POOL |
Max candidates considered before trim (default 50). |
RERANK_URL |
Full URL of your {query, documents} โ {scores} API (optional). |
RERANK_TIMEOUT_MS |
Timeout for that POST (default 15000). |
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:
| Env | Default | Controls |
|---|---|---|
OLLAMA_TIMEOUT_MS |
30000 (30s) |
Max wait for Ollama /api/embed and /api/tags calls |
QDRANT_TIMEOUT_MS |
15000 (15s) |
Max wait for Qdrant API calls (search, upsert, etc.) |
SEARCH_TIMEOUT_MS |
60000 (60s) |
Overall timeout for the entire search operation |
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:
| File | mcp_config.json under .gemini/antigravity/ in your user folder |
| Windows | C:\Users\<your-username>\.gemini\antigravity\mcp_config.json |
| macOS / Linux | ~/.gemini/antigravity/mcp_config.json |
| UI | โฎ menu โ MCP โ Manage MCP Servers โ View raw config |
Step-by-step: Integrations โ Google Antigravity.
Features (short)
| Search | 6 modes: keyword (FTS5+BM25), semantic (Qdrant vectors), hybrid (RRF fusion), regex, symbol, auto |
| Code Agent | code_session โ 1 call replaces 5-15 searches. code_apply โ safe code changes with auto test/lint/typecheck |
| Chat Memory ๐ | Auto-track tool calls, semantic search via Qdrant, persistent AI context across sessions |
| Streaming | Parallel keyword+semantic search (~1.5-2ร faster), 4-phase progress notifications |
| Fuzzy Search | Levenshtein distance auto-corrects typos ("fucntion" โ "function") |
| Smart Context | Task-aware context: impact analysis, test file detection, similar code patterns |
| Storage | SQLite on disk + Qdrant for vectors; 100% local, no cloud required |
| Indexing | Incremental (SHA-1 hash), parallel workers (~3-4ร faster), watch mode (auto re-index on save), 40+ languages, .hnindexignore |
| Resilience | Keyword search works without Qdrant or Ollama; graceful degradation |
| Benchmark | Built-in benchmark_search tool โ compare streaming vs non-streaming, all search modes |
| Multiple Embedding Models | bge-m3 (default), nomic-embed-text, qwen3-embedding, mxbai-embed-large, and more |
Architecture
graph TB
subgraph Input["๐ Input"]
A["๐ป Your Codebase<br/>.ts .py .go .rs ..."]
end
subgraph Server["โ๏ธ vibe-hnindex MCP Server"]
B["๐ Search Router<br/>keyword | semantic | hybrid"]
C["๐ RRF Fusion"]
end
subgraph Storage["๐พ Storage"]
D[("SQLite<br/>FTS5 + Keyword")]
E[("Qdrant<br/>Vector Embeddings")]
end
subgraph Memory["๐ง Chat Memory (v0.12)"]
F[("SQLite<br/>Chat Context")]
G[("Qdrant<br/>Chat Vectors")]
end
subgraph Infra["๐๏ธ Infrastructure"]
H["Ollama<br/>Embeddings"]
I["Qdrant<br/>localhost:6333"]
end
subgraph Output["๐ค AI Clients"]
J["Claude ยท Cursor ยท Windsurf<br/>Antigravity ยท VS Code"]
end
A -->|"index_codebase"| Storage
A -->|scan| H
B -->|"keyword"| D
B -->|"semantic"| E
B -->|"hybrid"| C
C --> D
C --> E
B -.->|"auto-track"| F
F --> H
H --> G
D --> J
E --> J
H -.-> I
style F fill:#6366f1,color:#fff
style G fill:#6366f1,color:#fff
style B fill:#f59e0b,color:#000
style J fill:#22c55e,color:#fff
License
MIT โ see LICENSE.
Contributing
Issues and PRs: github.com/AndyAnh174/vibe-hnindex.
Contact
Ho Viet Anh (AndyAnh174) ยท hovietanh147@gmail.com ยท GitHub
Install
Add vibe hnindex to your client. Pick the one you use.
claude mcp add vibe-hnindex -- npx -y vibe-hnindexcodex mcp add vibe-hnindex -- npx -y vibe-hnindexamp mcp add vibe-hnindex -- npx -y vibe-hnindex{
"mcpServers": {
"vibe-hnindex": {
"command": "npx",
"args": [
"-y",
"vibe-hnindex"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"vibe-hnindex": {
"command": "npx",
"args": [
"-y",
"vibe-hnindex"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"vibe-hnindex","command":"npx","args":["-y","vibe-hnindex"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"vibe-hnindex": {
"command": "npx",
"args": [
"-y",
"vibe-hnindex"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"vibe-hnindex": {
"command": "npx",
"args": [
"-y",
"vibe-hnindex"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"vibe-hnindex": {
"command": "npx",
"args": [
"-y",
"vibe-hnindex"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"vibe-hnindex": {
"type": "local",
"command": "npx",
"args": [
"-y",
"vibe-hnindex"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"vibe-hnindex": {
"command": {
"path": "npx",
"args": [
"-y",
"vibe-hnindex"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y vibe-hnindexRun `goose configure`, choose **Add Extension โ Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance16/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 77 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 0.1.2Latest | Apr 5, 2026 |