v2.0.0 · AI Memory + MCP

Forge your vector
database. Own it forever.

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.

Get Started ☆ Star on GitHub

📕 Read the complete guide (PDF, 26 pages)

$ pip install vecforge 📋
quickstart.py
# 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}")
Terminal Output
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

What you get

Everything runs inside your own Python process. No cloud account and no usage fees.

🔐

AES-256 Encryption

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.

🔍

Hybrid Search

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.

🛡️

Namespace Isolation

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.

🔑

Role-Based Access

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.

📄

Auto-Ingestion

Add PDF, DOCX, HTML, TXT and Markdown files, or whole folders. Text is split into overlapping chunks you can size yourself.

📋

Audit Logging

An append-only JSONL log of every add, search and delete, with the actor, the time and the details.

🧠

AI Memory + MCP

Remember facts, preferences and decisions across sessions, and serve them to Claude Desktop, Claude Code or any MCP client from your own machine.

🌀

Quantum-Inspired Rerank

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.

⚡

Fast Reopen

Index snapshots stored in the vault, O(1) deletes, batched ingest, and a hash embedder that needs no download for CI and offline machines.

Memory that survives the session

Give Claude, or any agent, a long-term memory stored in your own encrypted vault.

# pip install "vecforge[mcp]" from vecforge import MemoryStore mem = MemoryStore("~/.vecforge/memory.db", agent="claude") mem.remember("User prefers concise answers", kind="preference", importance=0.9) mem.start_session() print(mem.context_pack("how should I answer?")) mem.end_session("Reviewed the deployment plan") # Connect Claude Desktop / Claude Code $ vecforge mcp --print-config claude-desktop $ vecforge mcp --vault ~/.vecforge/memory.db

🧠 Remember what matters

Facts, preferences, decisions, tasks and session summaries, ranked by relevance, importance and recency. Near-duplicates strengthen the existing memory instead of piling up.

🔁 Pick up where you left off

context_pack() returns a prompt-ready briefing with the last session's summary and the memories that matter for the topic at hand.

🔌 Local MCP server

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

⚡ Fast to reopen

Index snapshots, background model warm-up and an embedding cache mean the next session starts without rebuilding anything.

VecForge vs. the rest

How VecForge compares with two popular vector databases.

Feature Pinecone ChromaDB VecForge
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

Ready-to-run demos

Runnable scripts from the examples folder.

🧠

AI Memory Agent

An assistant that remembers preferences and tasks across a full process restart.

🏥

Hospital Search

Medical record retrieval with namespace isolation per ward and metadata filtering.

⚖️

Legal Documents

NDA and contract search with type/year filtering and clause discovery.

🌍

GIS Data Search

Geospatial dataset discovery with USGS, Sentinel, and OpenStreetMap data.

🤖

RAG Pipeline

Retrieval-Augmented Generation with VecForge as the retrieval backend.

🏢

Multi-Tenant SaaS

Namespace isolation, RBAC, and audit logging for SaaS applications.

💻

Codebase Assistant

Code documentation semantic search with module and method indexing.

The paper behind VecForge 2.0

Design, proofs and a reproducible evaluation of every feature.

Preprint, October 2026

VecForge: A Local-First Hybrid Vector Database with Persistent Agent Memory and Order-Preserving Grover-Inspired Reranking

Suneel Bose K, ArcGX TechLabs Private Limited. ORCID 0009-0000-9282-2287

@misc{bosek2026vecforge, author = {Suneel Bose K}, title = {VecForge: A Local-First Hybrid Vector Database with Persistent Agent Memory and Order-Preserving Grover-Inspired Reranking}, year = {2026}, note = {Preprint}, url = {https://github.com/bosekarmegam/vecforge/blob/main/paper/VecForge-2.0-Paper.pdf} }

Learn VecForge

Guides from the first install to advanced configuration.

VecForge 2.0 Complete Instructions

One 26-page PDF: installation, search, AI memory, connecting Claude over MCP, REST API, command line, security, upgrading from 1.x and troubleshooting.

⚡ Quickstart 📦 Installation 🧠 Core Concepts 🔍 Search Guide 🔐 Security Guide 📄 Ingestion Guide 📖 API Reference 🖥️ CLI Reference 🌐 REST API ⚙️ Configuration 🧠 AI Memory 🔌 MCP Server 🌀 Quantum Rerank 🖼️ Multimodal 📕 Full Guide (PDF)

Ready to forge your vault?

Install VecForge and run your first search in a few minutes. No cloud account, no API key, no credit card.