vibe-hnindex
Integrates with Ollama to generate embeddings for semantic and hybrid search, using models like bge-m3, enabling vector-based code search.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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
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).
Related MCP server: mcp-context
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.
Page | What you'll learn |
What vibe-hnindex does, key features, how it works | |
Node, Ollama, Qdrant setup + MCP config | |
5-minute walkthrough with CLI + agent skill | |
All 25+ env vars with embedding model comparison | |
6 search modes, regex, fuzzy, streaming, cache | |
code_session + code_apply with safety scopes | |
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 MCP JSON or Codex TOML 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-cliSee 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):
{
"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.
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.
Env | Role |
|
|
| Candidate pool before final trim (default |
|
|
| Voyage model, default |
| Custom endpoint; HTTP contract is |
| Optional Bearer credential; Voyage can use |
| Full request/body timeout, default |
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:
Env | Default | Controls |
|
| Max wait for Ollama |
|
| Max wait for Qdrant API calls (search, upsert, etc.) |
|
| 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 |
|
Windows |
|
macOS / Linux |
|
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 |
|
Chat Memory 🆕 | Auto-track tool calls, semantic search via Qdrant, persistent AI context across sessions |
Streaming | Parallel keyword+semantic search with 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 for keyword, graph and metadata; Qdrant for vectors; optional cloud embedding/rerank providers |
Indexing | Incremental change detection, parallel workers, watch mode, text indexing across languages, |
Resilience | Keyword search works without Qdrant or Ollama; graceful degradation |
Benchmark | Built-in |
Multiple Embedding Providers | Ollama, OpenAI, Voyage, Gemini and OpenAI-compatible APIs; provider/model-aware vector collections |
Multiple Embedding Models | bge-m3 (default), nomic-embed-text, qwen3-embedding, mxbai-embed-large, and more |
Architecture
flowchart TB
accTitle: hnindex system architecture
accDescr: An MCP agent calls a local hnindex server with workspace files and SQLite storage. Semantic retrieval optionally uses embeddings and Qdrant.
agent_client["AI agent / MCP client<br/>Codex · Claude · Cursor"]
subgraph local_workspace["Local workspace"]
hnindex_server["hnindex MCP server<br/>Context · multilingual AST · code lookup"]
project_files["Source files<br/>README · Git"]
sqlite_store[("SQLite<br/>FTS · graph · declared tasks")]
security_review["Security review<br/>Live source · bounded leads · validation plan"]
hnindex_server --> security_review
project_files --> security_review
project_files -->|Read and check freshness| hnindex_server
hnindex_server <-->|Index and task storage| sqlite_store
end
subgraph semantic_services["Optional semantic retrieval"]
embedding_provider["Embeddings<br/>Ollama local or cloud API"]
qdrant_store[("Qdrant vectors<br/>Local or hosted")]
end
agent_client <-->|MCP / stdio| hnindex_server
hnindex_server -.->|Code chunks and queries| embedding_provider
embedding_provider -.->|Vectors| hnindex_server
hnindex_server <-.->|Store and retrieve vectors| qdrant_store
security_review -.->|Redacted query and evidence when enabled| reranker["Optional Voyage / HTTP rerank"]License
MIT — see LICENSE.
Contributing
Issues and PRs: github.com/AndyAnh174/vibe-hnindex.
Contact
Ho Viet Anh (AndyAnh174) · hovietanh147@gmail.com · 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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
1Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Related MCP Servers
- AlicenseBqualityCmaintenanceA local-first MCP server that provides AI agents with safe codebase access through file discovery, hybrid lexical-semantic search, and project introspection. It features durable local memory and semantic indexing while keeping all data and processing entirely on your local machine.7432 npm6MIT
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.-
- AlicenseAqualityDmaintenanceMCP server with local vector search for your codebase. Smart indexing, semantic search, Git history — all offline.7124 PyPI49MIT
- AlicenseAqualityDmaintenanceLocal-first MCP server for semantic + keyword hybrid code search. Zero external services, no API keys required.2MIT