Self-hosted AI memory · Apache-2.0
Your data stays yours.
Memory that runs on your machine. Drop-in for Claude.
Core capabilities
Memory that works like yours
Three primitives. Everything your agent needs to learn, recall, and comply.
Remember
Every conversation, preference, and decision — persisted automatically. MemDB extracts entities, classifies memory types, and deduplicates. Your agent gets smarter with every interaction.
Recall
Ask in natural language, get the right context back. Hybrid vector + fulltext search with temporal decay — recent memories rank higher. Results in under 50ms.
Forget
GDPR compliance built in. Delete a single memory, a user's entire history, or everything in a namespace. Instant. No reindex. No residual embeddings.
Three Claude integration surfaces
Plug MemDB into Claude. Pick your surface.
Same memory backend, three install paths. The Anthropic memory_20250818 adapter is a drop-in — no code changes for users already on the official tool spec.
Claude Code plugin
Auto-injects memories into your IDE context. Install via the Claude Code plugin manager and forget it exists.
MCP server
Built-in MCP at :8001 for Claude Desktop, Cursor, Windsurf, or any MCP-compatible host. stdio + HTTP transport.
Anthropic memory_20250818 adapter
Python drop-in for the official Claude memory tool. Swap one import — no SDK changes, no prompt rewrites.
Benchmarks
| System | LoCoMo LLM Judge | License |
|---|---|---|
| 1. Memobase | 75.78% | Commercial cloud |
| 2. Zep | 75.14% | Apache-2.0 + Cloud |
| 3. MemOS | 73.31% | Apache-2.0 |
| MemDB v0.23.0 | 72.50% | Apache-2.0 |
| 5. Mem0 | 66.88% | Commercial cloud |
LoCoMo chat-50 stratified, LLM Judge by Gemini Flash, category 5 excluded. Methodology and raw results: MILESTONES.md.
Start in minutes
# Add a memory
curl -X POST https://api.memdb.ai/product/add \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "agent-123",
"messages": [{"role": "user", "content": "I prefer bullet points"}]
}'
# Search memories
curl -X POST https://api.memdb.ai/product/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "agent-123", "query": "formatting preferences", "top_k": 5}'
# Delete memories
curl -X POST https://api.memdb.ai/product/delete_memory \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "agent-123", "memory_ids": ["mem_abc"]}'Built to run offline
No External APIs
ONNX embeddings run locally. LLM extractor works with Ollama, vLLM, or any OpenAI-compatible API — no cloud LLM required. Fully air-gappable.
One Database
Everything in PostgreSQL: vectors (pgvector HNSW), graph (Apache AGE), fulltext (tsvector). No separate graph DB, no managed vector service. One backup, one migration path.
MCP Native
Built-in MCP server with stdio + HTTP transport. Claude Code, Cursor, Windsurf — any MCP client connects instantly. No SDK integration needed. Your agent gets memory in one config line.
Frequently asked questions
How is MemDB different from Mem0 or Zep?
MemDB runs entirely self-hosted with no external API calls. Embeddings are ONNX (local), not OpenAI. The MCP server is built in — no SDK needed. Everything runs in one PostgreSQL instance (pgvector + Apache AGE). And it's the only system on the LoCoMo leaderboard with a drop-in Anthropic memory_20250818 adapter.
How does MemDB score on LoCoMo?
v0.23.0 scores 72.5% on LoCoMo LLM Judge (chat-50 stratified, category 5 excluded, judged by Gemini Flash). That sits between MemOS (73.31%) and Mem0 (66.88%), with Memobase (75.78%) and Zep (75.14%) ahead. Methodology and raw results are in MILESTONES.md.
Can I run this without any internet connection?
Yes. ONNX embeddings run locally, LLM uses Ollama or any local model, PostgreSQL stores everything. No phone-home, no telemetry. Fully air-gappable.
What about the hosted API?
api.memdb.ai is live for teams who want zero-ops. Same API, same features, managed infrastructure. Self-hosted is free and always will be.
How fast is search?
1.7ms for cached queries (Redis 30s TTL), 350ms uncached (ONNX embed + parallel DB). At 20 req/s sustained, 100% success rate. Numbers from real vegeta load tests on ARM64.
What frameworks does it work with?
Any. MCP for Claude Code / Cursor / Windsurf. REST API for LangChain, CrewAI, custom agents. No vendor lock-in — it is a standard HTTP API with Bearer auth.
Is there a Python SDK?
Yes — for Anthropic's official memory tool we ship `memdb-claude-memory-tool` (v0.1.0): a drop-in replacement for `memory_20250818` that points at MemDB instead of in-process state. `pip install git+https://github.com/anatolykoptev/memdb-claude-memory-tool@v0.1.0`. For other use-cases, the REST API and MCP server cover everything.
Join the waitlist
Be first to know when the hosted API opens. Self-hosted is available now on GitHub.