YourMemory MCP
A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary
- 270 ★ on the repository
- Last commit
Extended access
Why this level
- The wizard writes the server into the configs of Claude Code, Claude Desktop, Cursor, Windsurf and Cline
- Your preferences and work facts, personal ones included, accumulate in the local database
- The proxy on localhost:3033 sees every model request and the API key the client passes
Install
- Works in
Manual install
pip install yourmemoryNeeds Python 3.11 to 3.14. Standalone binaries for macOS, Linux and Windows are in the GitHub releases.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The wizard writes the server into the configs of Claude Code, Claude Desktop, Cursor, Windsurf and Cline
- Your preferences and work facts, personal ones included, accumulate in the local database
- The proxy on localhost:3033 sees every model request and the API key the client passes
This is third-party code. Review the repository files before installing.
What it does
YourMemory is a Python MCP server that keeps an AI agent's memory between sessions. The agent calls three tools itself. `recall_memory` ranks records by similarity and strength, `store_memory` saves a fact with an importance score and a category and drops duplicates, and `update_memory` replaces an outdated fact. A record can carry file paths: when you work in that folder it gets a boost in search. A record's strength decays along an Ebbinghaus forgetting curve. What is rarely recalled fades, while important and frequent facts stay. When many related facts pile up they are compressed into one summary and the originals are archived. Records are linked in a graph by people, places and concepts, so search finds things the agent did not ask for. Results blend vector search, BM25 and the graph. Storage defaults to a local DuckDB file in `~/.yourmemory`, with Postgres and pgvector for teams. Every read, write and delete lands in a hash-chained log, so a retroactive edit shows. There are shared role-based memory pools, export and deletion on request, a web dashboard at `localhost:3033/ui` and a memory graph. `yourmemory ask` answers from memory without an LLM call when there is enough to go on. A proxy on `localhost:3033` injects memory into every Anthropic or OpenAI call.
Who it is for. For developers tired of repeating project context and personal preferences to Claude Code, Cursor or Cline in every new session.
Good fit when
- The agent forgets your agreements every morning: code style, stack, the chosen database
- You want memory that ages by itself and does not pile up duplicates
- The context was compacted mid-task and the agent needs its working context back without rereading files
- A team needs shared agent memory with roles and a verifiable access log
- The data has to stay on your computer: storage is local
Not a fit when
- You need commercial use: the CC BY-NC 4.0 license forbids it without a separate written agreement
- You do not want to get a token by email on the project site: registration is part of the setup
- The task is one-off and the context will not be needed after the session
- You want memory without local models: the server installs sentence-transformers and spaCy
Example request
Recall which database and code style we chose for this project and store the new decision about the cacheMCP
- Transport
- stdio
- Authentication
- key is optional
Environment variables
YOURMEMORY_EXTRACT_BACKEND- The value anthropic switches on cloud fact extraction
DATABASE_URLsecret- Postgres with pgvector address for a shared or production setup
Limitations
License is CC BY-NC 4.0: free for personal use, education, research and open-source projects, while commercial use needs a written agreement with the author. Installation needs a token issued on yourmemoryai.xyz after email verification with a six-digit code. Python 3.11 to 3.14 is required. Fact extraction is better with Ollama and the qwen2.5:7b model, built-in heuristics work without it, and cloud extraction is switched on with `YOURMEMORY_EXTRACT_BACKEND=anthropic`. The standalone binary weighs about 2 GB because it bundles both models. Shared team pools need Postgres with the pgvector extension.
How to disable. Remove the server from the client configs that the `yourmemory-setup` wizard wrote and run `pip uninstall yourmemory`. Memory lives in `~/.yourmemory`: delete the folder to erase it, or use the built-in data deletion.
FAQ
How do I install YourMemory in Claude Code?
Run `pip install yourmemory`, then `yourmemory-register` with the token from the project site and `yourmemory-setup`. The wizard finds Claude Code, Claude Desktop, Cursor, Windsurf and Cline, writes the server config and asks which storage backend to use.
What does it mean that records decay?
A record's strength falls along an Ebbinghaus forgetting curve. Facts that were not recalled for a long time weaken and are eventually pruned, while important and frequently needed ones stay. A background job does the decay and pruning.
Where is the data stored?
By default in a local DuckDB file inside `~/.yourmemory`, and the default graph lives in `~/.yourmemory/graph.pkl`. Teams can use Postgres with pgvector. Embedding models run locally.
How do I check that the access log was not tampered with?
Every log row stores the hash of the previous one. `GET /audit/verify` checks the chain and shows the row where it breaks. Pruning old rows through `POST /audit/prune` refuses a retention under 90 days.
What does yourmemory ask do?
It answers a question from memory without an LLM call: no tokens, no cloud. If there are not enough records, the command declines and leaves the question without an invented answer.
Discussion
No questions or reviews yet.
Related
MCP serversA self-hosted MCP server for long-term agent memory: structured records, versioned rollback and a visual dashboard
A long-term memory system for AI agents: the agent stores experience and facts, then retrieves them through a built-in MCP server
An MCP server for long-term agent memory: compresses dialogues into atomic facts, resolves pronouns and anchors relative time to absolute dates
Long-term memory for AI agents: a skill and the mindmemos command store facts from conversations and recall them in later sessions
Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools
Long-term memory for agents: a remote MCP server, plugins for Claude Code, Cursor and Codex, and an API for your own apps
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| YourMemory (this entry) | no | key is optional | 270 | |
| agentmemory | yes | not required | 30,007 | records sessions with hooks and returns past decisions through 54 MCP tools |
| Hindsight | yes | API key | 55,871 | a long-term memory system with a built-in MCP server and no forgetting curve |
README in short
The README starts with the problem of a forgetful agent and a table of differences, then covers the author's benchmark results, a quick start, how memory works and sections on audit, pools, data rights, dashboards, MCP tools, the proxy and the stack. It ends with troubleshooting, the license and dataset sources.