A local-first Python vector database with AES-256 encryption, hybrid search, and long-term memory for Claude and other AI agents over MCP. Your data stays on your machine.
📕 Read the complete guide (PDF, 26 pages)
# Hybrid search across unrelated topics
from vecforge import VecForge
db = VecForge(":memory:")
db.add("The quick brown fox jumps over the lazy dog")
db.add("NASA's Artemis aims to return humans to the Moon")
db.add("Authentic Italian pizza requires a wood-fired oven")
results = db.search("space exploration")
for r in results:
print(f"{r.score:.3f} {r.text}")
1.000 NASA's Artemis aims to return humans to the Moon
0.134 Authentic Italian pizza requires a wood-fired oven
0.000 The quick brown fox jumps over the lazy dog
Scores are normalised to the range 0 to 1
Everything runs inside your own Python process. No cloud account and no usage fees.
SQLCipher encrypts the whole file at rest, so the data is unreadable without the key. Keep the key in an environment variable, not in your code.
FAISS vectors and an incremental BM25 keyword index, fused into one score that shows which retriever found each result. Metadata filters and an optional cross-encoder rerank.
Tenants are separated in SQL and inside the vector index itself, so small tenants still get full recall and never see each other's data.
Admin, read-write and read-only roles. Keys are stored as SHA-256 digests and unregistered keys get no access. Without a key you are the local admin, which keeps development simple.
Add PDF, DOCX, HTML, TXT and Markdown files, or whole folders. Text is split into overlapping chunks you can size yourself.
An append-only JSONL log of every add, search and delete, with the actor, the time and the details.
Remember facts, preferences and decisions across sessions, and serve them to Claude Desktop, Claude Code or any MCP client from your own machine.
Grover amplitude amplification computed in closed form. Results both retrievers agree on move up and the best result stays first. About 2 ms for a million candidates.
Index snapshots stored in the vault, O(1) deletes, batched ingest, and a hash embedder that needs no download for CI and offline machines.
Give Claude, or any agent, a long-term memory stored in your own encrypted vault.
Facts, preferences, decisions, tasks and session summaries, ranked by relevance, importance and recency. Near-duplicates strengthen the existing memory instead of piling up.
context_pack() returns a prompt-ready briefing with the last session's summary and the
memories that matter for the topic at hand.
stdio for Claude Desktop and Claude Code, or HTTP for several clients. Twelve tools:
context_packrememberrecallforget
reinforcelist_memoriesstart_session
end_sessionrecent_sessionssearch_vault
add_documentvault_stats
Index snapshots, background model warm-up and an embedding cache mean the next session starts without rebuilding anything.
How VecForge compares with two popular vector databases.
| Feature | Pinecone | ChromaDB | |
|---|---|---|---|
| Local-first | ❌ Cloud-only | ✅ | ✅ Always |
| Encryption at rest | ❌ | ❌ | ✅ AES-256 |
| Hybrid search | ✅ | ❌ | ✅ Dense + BM25 |
| AI memory + MCP server | ❌ | ❌ | ✅ Built-in |
| Quantum-inspired reranking | ❌ | ❌ | ✅ Grover, O(N) |
| Namespace isolation | ✅ Cloud | ❌ | ✅ Inside the index |
| RBAC | ✅ Cloud | ❌ | ✅ Built-in |
| Audit logging | ❌ | ❌ | ✅ JSONL |
| Price | $$$$ | Free | ✅ Free |
Runnable scripts from the examples folder.
An assistant that remembers preferences and tasks across a full process restart.
Medical record retrieval with namespace isolation per ward and metadata filtering.
NDA and contract search with type/year filtering and clause discovery.
Geospatial dataset discovery with USGS, Sentinel, and OpenStreetMap data.
Retrieval-Augmented Generation with VecForge as the retrieval backend.
Namespace isolation, RBAC, and audit logging for SaaS applications.
Code documentation semantic search with module and method indexing.
Design, proofs and a reproducible evaluation of every feature.
Guides from the first install to advanced configuration.
One 26-page PDF: installation, search, AI memory, connecting Claude over MCP, REST API, command line, security, upgrading from 1.x and troubleshooting.
Install VecForge and run your first search in a few minutes. No cloud account, no API key, no credit card.