Open source · Apache-2.0 · MCP-native
The self-hostable memory layer for AI agents. One
pip install, one SQLite file, and shared memory
across Claude Code, Cursor, Codex, ChatGPT, or any MCP client.
Get started
pip install memry (or straight from source:
pip install git+https://github.com/cosmin-novac/memry.git).
Python 3.11+, no other services.
Claude Code: claude mcp add memry -- memry mcp. Claude Desktop,
Cursor, Windsurf: add the memry mcp command to your MCP config.
Works with zero keys using verbatim memories, keyword search and local embeddings. Add an Anthropic or OpenAI key and Memry also extracts facts, reconciles changes and resolves entities.
Tell your agent something worth keeping, then ask about it in a fresh
session. Inspect anytime: memry list, memry entities
proposals, or the dashboard via memry serve.
How it works
Most "memory" is retrieval over raw chat logs. Memry keeps the raw episodes and distills them into reconciled, contradiction-aware facts, so your agent remembers what's true now without losing the history of how it got there.
Every message is stored immutably before anything is derived. Memories are an index; episodes are the source of truth.
An LLM distills self-contained facts with type, importance, and entities. No LLM key? Verbatim mode still works.
Duplicates are skipped, refinements merge, contradictions invalidate the old memory and link its successor. Bi-temporal, fully audited.
BM25 + vectors fused by reciprocal rank, boosted by recency and importance. Every result shows its score signals.
Features
Point Claude, ChatGPT, Cursor, Codex and other MCP clients at the same Memry server. Something learned in one is immediately available to the others.
When something changes, the old fact stays in its history and the new one takes over. Nothing silently disappears, so your agent can distinguish what's true now from what was true before.
Raw episodes stay in the store, so when extraction improves you can rerun it over years of history and recover memories earlier versions missed.
Episodes, memories, embeddings, topics and entities live in one local store. No external database, vector service or cloud account.
Every memory links back to the exact conversation it came from, and every change is preserved. You can always see where something came from and how it changed.
Similar names aren't merged just because they look alike. Memry waits until there's enough evidence to know they're the same person, or until you confirm it yourself.
Connect any MCP client over stdio or streamable HTTP. No client-specific memory integration to build or maintain.
Keyword search and local hash embeddings work out of the box. Add an Anthropic or OpenAI key when you want automatic extraction and reconciliation.
Old trivia gradually matters less, so stale details stop crowding out what matters without being deleted from your history.
Use Anthropic, OpenAI or Ollama for extraction, and choose between hosted or local embeddings. Memry doesn't lock your memory to one model provider.
Per-tenant API keys with transparent namespacing and strict isolation, plus category filters on every search surface.
A built-in eval harness (recall@k, MRR, latency) runs offline in CI. Format LoCoMo or LongMemEval into JSONL and compare configs honestly.
Two ways in
any MCP client
{
"mcpServers": {
"memry": {
"command": "memry",
"args": ["mcp"]
}
}
}
# or for Claude Code:
$ claude mcp add memry -- memry mcp
python
from memry import MemoryStore store = MemoryStore() store.add("I'm Ada. I moved to Amsterdam.", user_id="ada") hits = store.search("where does ada live?", user_id="ada") ctx = store.reconstruct_context( "plan my commute", user_id="ada", token_budget=1200).text # drop into any prompt
The memory map
The memory map gives you a view across everything Memry has learned, grouped by tags or by the people, projects and tools in your memories. You can inspect any part of it and see the memories behind it.
Memories, entities, edit history, and the conversations they came from all stay together in one place.
Run it on your laptop or a VPS. There’s no Memry account to create, and the only data that leaves the machine is whatever you send to the model provider you configure. With the default hash embedder and no LLM key, nothing leaves the machine at all.
And if you want to get rid of it, you delete the file.
So if Claude Code learns something in the morning, ChatGPT already knows it that afternoon. And if you switch models or vendors later, your memory stays where it is. You don’t have to start over.
Your work, your projects, the people around you, and the things you care about all end up in there. That’s unusually personal data. It shouldn’t have to live inside whichever AI product you happen to be using today, under terms that may look different a year from now.
Memry gives you somewhere independent to keep it.
If two entries clearly refer to the same person, they get merged. If a tag has drifted into two spellings, Memry flags it for review instead of guessing. Old trivia gradually matters less in ranking, so it stops getting in the way without disappearing.
Anything ambiguous waits for you under Knowledge > Upkeep, and each maintenance task can be turned off individually.
Compare
| Memry | Mem0 OSS | Zep | Recall MCP | |
|---|---|---|---|---|
| LLM extraction + reconciliation | yes | yes | yes | - |
| Temporal invalidation (supersede, not delete) | yes | platform only | yes | - |
| Provenance: fact → source episode | yes | partial | yes | - |
| Hybrid retrieval (BM25 + vector + recency) | yes | yes | graph | yes |
| Memory decay / forgetting | yes | platform only | retention | yes |
| Works with zero API keys | yes | no | no | yes |
| Runs without extra services | SQLite only | needs vector DB | BYOC | SQLite |
| Built-in eval harness | yes | - | - | - |
| License | Apache-2.0 | Apache-2.0 | proprietary | open source |
Feature availability as of July 2026, self-hosted/OSS editions; see docs/research/competitive-analysis.md in the repo for sources.
Self-host
Memory is the most personal data an agent touches. Memry keeps it in a file you own, on a machine you control, under a license that can't be revoked.
MEMRY_API_KEYmemry export; account servers also back up auth.db# bare metal $ pip install memry $ memry serve --host 0.0.0.0 --port 8787 → dashboard http://localhost:8787/ → REST API http://localhost:8787/api/v1 → MCP http://localhost:8787/mcp # or docker $ docker compose up -d
Research-grade
Memry doubles as a memory-systems research codebase: raw episodes are never thrown away, so better extraction pipelines can be replayed over history; every ranking signal is exposed; and the eval harness compares providers, weights, and even competing backends (a Mem0 adapter ships in the box) under identical conditions. Hierarchical compression, belief revision, and memory-type routing are on the open roadmap - contributions welcome.