Lightning-fast RAG for AI agents. 4-layer fusion, ONNX Runtime, sub-200ms search.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Lightning-fast RAG for AI agents.
Four-layer retrieval fusion powered by ONNX Runtime. No PyTorch. Sub-200ms warm search. Incremental graph updates. MCP-ready.
Most RAG solutions either drag in 2GB+ of PyTorch or limit you to single-layer vector search. VelociRAG gives you four retrieval methods โ vector similarity, BM25 keyword matching, knowledge graph traversal, and metadata filtering โ fused through reciprocal rank fusion with cross-encoder reranking. All running on ONNX Runtime, no GPU, no API keys. Comes with an MCP server for agent integration, a Unix socket daemon for warm queries, and a CLI that just works.
Claude Code โ add to .mcp.json in your project root:
Then open /mcp in Claude Code and enable the velocirag server. If using a virtualenv, use the full path to the binary (e.g. .venv/bin/velocirag).
Claude Desktop โ add to claude_desktop_config.json:
Cursor โ add to .cursor/mcp.json:
The daemon keeps the ONNX model + FAISS index warm over a Unix socket. First query loads the engine (~1s), subsequent queries return in ~180ms with full 4-layer fusion.
The 4-layer pipeline:
What each layer catches:
| Query type | Vector | Keyword | Graph | Metadata |
|---|---|---|---|---|
| Conceptual ("improve error handling") | โ | โ | โ | โ |
| Exact match ("ERR_CONNECTION_REFUSED") | โ | โ | โ | โ |
| Connected concepts | โ | โ | โ | โ |
| Filtered ("#python status:active") | โ | โ | โ | โ |
| Combined ("React state management") | โ | โ | โ | โ |
VelociRAG exposes a Model Context Protocol server for seamless agent integration:
Available tools:
search โ 4-layer fusion search with rerankingindex โ Add documents to the knowledge baseadd_document โ Insert single documenthealth โ System diagnosticslist_sources โ Show indexed document sourcesThe MCP server process stays alive between queries, so models load once and every subsequent search is warm. Works with any MCP-compatible client.
Full 4-layer unified search:
Quick semantic search:
Incremental graph updates:
Options:
--no-graph โ Skip knowledge graph build--no-metadata โ Skip metadata extraction--full-graph โ Build graph WITH semantic similarity edges (~2GB extra RAM)--source NAME โ Label for multi-source provenance isolation--force โ Clear and rebuild from scratch--gliner โ Use GLiNER for entity extraction (requires pip install "velocirag[ner]")Real benchmarks on ByteByteGo/system-design-101 (418 files, 1,001 chunks):
| Metric | Value |
|---|---|
| Index (418 files) | 13.6s |
| Search (warm, 5 results) | 35โ90ms |
| Graph build (light) | 2.1s โ 2,397 nodes, 8,717 edges |
| Incremental update (1 file) | 1.3s |
| Reranker | Cross-encoder TinyBERT via ONNX |
| Install size | ~80MB (no PyTorch) |
| RAM usage | <1GB with all models loaded |
Production deployment (6,300+ chunks, 3 sources, 950 files):
| Metric | Value |
|---|---|
| Full search (warm) | 16ms avg, 2ms min |
| Full search (first run) | 22ms avg, 4ms min |
| Search P50 / P95 | 17ms / 55ms |
| Hit rate (100-query benchmark) | 99/100 |
| Graph | 3,125 nodes, 132,320 edges |
| Reranker | Cross-encoder TinyBERT via ONNX |
| RAM | <1GB with all models loaded |
| Environment Variable | Default | Description |
|---|---|---|
VELOCIRAG_DB | ./.velocirag | Database directory |
VELOCIRAG_SOCKET | /tmp/velocirag-daemon.sock | Daemon socket path |
NO_COLOR | โ | Disable colored output |
Dependencies (all included in base install):
onnxruntime โ ONNX inference (embedder + reranker)tokenizers + huggingface-hub โ model loadingfaiss-cpu โ vector similarity searchnetworkx + scikit-learn โ knowledge graph + topic clusteringnumpy, click, pyyaml, python-frontmatterOptional extras:
pip install "velocirag[mcp]" โ MCP server (adds fastmcp)pip install "velocirag[ner]" โ GLiNER entity extraction (adds gliner, requires PyTorch)VelociRAG builds on these foundational works:
Core Fusion & Retrieval
Reciprocal Rank Fusion โ Cormack, G. V., Clarke, C. L. A., & Bรผttcher, S. (2009). "Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods." SIGIR '09.
Core fusion algorithm for merging results across retrieval layers.
BM25 โ Robertson, S. E., Walker, S., Jones, S., Hancock-Beaulieu, M., & Gatford, M. (1994). "Okapi at TREC-3." TREC-3.
Keyword search foundation via SQLite FTS5.
Embeddings & Neural IR
Sentence-BERT โ Reimers, N., & Gurevych, I. (2019). "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks." EMNLP 2019. paper
Dense embedding architecture usingall-MiniLM-L6-v2.
MiniLM โ Wang, W., Wei, F., Dong, L., Bao, H., Yang, N., & Zhou, M. (2020). "MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers." NeurIPS 2020. paper
Efficient transformer distillation for production embedding models.
Reranking & Neural Models
Cross-Encoder Reranking โ Nogueira, R., & Cho, K. (2019). "Passage Re-ranking with BERT." arXiv:1901.04085. paper
Cross-attention reranking with TinyBERT on MS MARCO.
TinyBERT โ Jiao, X., et al. (2020). "TinyBERT: Distilling BERT for Natural Language Understanding." Findings of EMNLP 2020. paper
Compressed BERT for fast reranking inference.
Vector Search & Systems
FAISS โ Johnson, J., Douze, M., & Jรฉgou, H. (2019). "Billion-scale similarity search with GPUs." IEEE Transactions on Big Data. paper
High-performance vector similarity search engine.
GLiNER โ Zaratiana, U., Nzeyimana, A., & Holat, P. (2023). "GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer." arXiv:2311.08526. paper
Generalist NER for knowledge graph entity extraction (optional dependency).
MIT โ Use it anywhere, build anything.
Need agent integration help? Check AGENTS.md for machine-readable project context.
Built for agents who think fast and remember faster.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/velocirag)<a href="https://allmcps.com/mcp/velocirag"><img src="https://allmcps.com/api/badge/velocirag?style=directory" alt="Velocirag on AllMCPs" /></a>