TrueMemory MCP
Local memory for an agent: hooks record facts from conversations and the MCP server brings them back in later sessions from one SQLite file
- 384 ★ on the repository
- Last commit
- AGPL-3.0
Broad access
Why this level
- Hooks automatically save the content of your conversations with the agent, including personal data if you mentioned any, into a local file on disk
- The installer is downloaded and run as a shell script, and anonymous telemetry is on by default
Install
- Works in
Manual install
curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh | shThe installer for Claude Code, Cursor, Codex CLI and Gemini CLI. It downloads about 1.5 GB of models and needs no sudo. On Windows there is install.ps1 for PowerShell.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Hooks automatically save the content of your conversations with the agent, including personal data if you mentioned any, into a local file on disk
- The installer is downloaded and run as a shell script, and anonymous telemetry is on by default
This is third-party code. Review the repository files before installing.
What it does
TrueMemory gives Claude Code, Cursor, Codex CLI, Gemini CLI and Claude Desktop memory between sessions. Lifecycle hooks pick out what matters from conversations by themselves: preferences, facts, decisions and corrections, and insert the right records into the next session. Nothing has to be saved or searched by hand. Everything lives in one SQLite file, `~/.truememory/memories.db`, on your computer. The memory does not just pile up records. When you change your mind it resolves contradictions, updates stale facts and merges similar ones. A separate directive flag turns a record into a standing instruction such as "always sign commits". These instructions load at the start of every session, ahead of records found by search. The MCP server exposes 11 tools: `truememory_store` saves a record, `truememory_search` and `truememory_search_deep` search (the second is deeper and slower), `truememory_get` and `truememory_forget` read and delete a record by ID, and `truememory_directives` lists standing instructions. Search runs through six layers with model reranking. There are three tiers: Edge runs on any CPU, Base uses more accurate models locally and Pro adds query expansion through a language model with your key.
Who it is for. For people who work in Claude Code or Cursor every day and are tired of repeating the stack, agreements and corrections to the agent at the start of each new session.
Good fit when
- The agent starts every session from zero and asks again which framework the project uses
- You want to pin a standing instruction, such as signing commits, and have it load by itself
- You changed a decision and the old fact in memory should update and not sit beside the new one
- You want memory that works with no cloud and no keys and lives in one file on disk
- You want to attach the same memory to Claude Code, Cursor, Codex CLI and Gemini CLI
Not a fit when
- Conversations hold client data or secrets: hooks save the content of conversations automatically, so with such data it is better not to turn capture on
- You need shared team memory in the cloud: TrueMemory is local, and the single file lives on your machine
- You need a commercial integration into a product: the AGPL-3.0 license allows free personal and research use, while commercial use needs a separate license
- The computer is weak or short on space: the installer downloads about 1.5 GB of models, and Base and Pro want 4 GB of RAM or more
Example request
Remember that we use FastAPI and Pydantic v2 and the auth middleware lives in src/auth. And from now on always sign commits with GPG.MCP
- Transport
- stdio
- Authentication
- not required
Environment variables
TRUEMEMORY_TELEMETRY- The value off turns off anonymous telemetry, which is on by default
TRUEMEMORY_DIRECTIVE_LIMIT- Cap on standing instructions at session start, 50 by default
Limitations
The installer downloads about 1.5 GB of models and creates an isolated Python 3.12 environment through uv, leaving the system Python untouched. Base and Pro assume 4 GB of RAM or more, while Edge runs on any CPU. Pro needs a language model key: it sends the text of search queries but not the memories themselves.
Anonymous telemetry is on by default: it counts tool calls, the number of sessions and platform details, and does not track memory content, queries, paths or keys. You can turn it off with `TRUEMEMORY_TELEMETRY=off`. The number of standing instructions loaded at the start of a session is capped at 50, and the cap is changed with `TRUEMEMORY_DIRECTIVE_LIMIT`. One stored fact is limited to 50 thousand characters.
The license is AGPL-3.0: free for personal and research use, with a separate license for commercial use. The README gives results on three test sets that can be reproduced with the scripts in the benchmarks folder, but they are the author's own measurements.
How to disable. Close the agent, remove the TrueMemory entry from the MCP configuration and the hooks the installer added. To remove the data, delete the `~/.truememory/` folder. For the Python library run `pip uninstall truememory`.
FAQ
How do I install TrueMemory for Claude Code?
Run the install command `curl -LsSf https://raw.githubusercontent.com/buildingjoshbetter/TrueMemory/main/install.sh | sh`, quit the agent completely, reopen it and type "Set up TrueMemory", then pick a tier. No root rights are needed, and the install takes 3–5 minutes.
Where are memories stored and do they go to the cloud?
Everything lives in `~/.truememory/memories.db`. The Edge and Base tiers make no external calls. Pro sends a language model only the text of a search query for expansion, and the memories themselves are not transmitted.
How do the Edge, Base and Pro tiers differ?
Edge uses a lightweight embedding model of about 8 MB and runs on any CPU. Base takes a more accurate model of about 600 MB and needs 4 GB of memory or more. Pro adds query expansion through a language model and needs an API key. You switch tiers by saying "switch to Pro" or "switch to Base".
How do I turn telemetry off?
Run `export TRUEMEMORY_TELEMETRY=off`. By default anonymous data about tool calls, session counts and platform is collected, while memory content, queries, paths and keys are not.
How do I pin a standing instruction like "always sign commits"?
Store a record with the directive flag, and to see the list of such instructions call `truememory_directives`. Stale or contradicting instructions are removed with `truememory_forget`. Up to 50 instructions are inserted at the start of each session.
Discussion
No questions or reviews yet.
Related
MCP serversLong-term memory for agents: a remote MCP server, plugins for Claude Code, Cursor and Codex, and an API for your own apps
Long-term memory for Claude Code, Cursor and Codex: the agent saves decisions and finds them again in later sessions
Agent memory as a graph of linked facts: decisions and errors outlive the session, with no vector database or paid API calls
Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones
Memory for agents over MCP: five tools, one local SQLite file and layers modeled on human memory, no account
Membase keeps one shared memory for AI agents that Claude Code, Cursor and Codex read through MCP, an SDK or the membase command
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| TrueMemory (this card) | no | not required | 384 | |
| Claude-Mem | no | 113,534 | a persistent memory plugin that injects observations from agent sessions into context | |
| Hindsight | yes | API key | 59,167 | a long-term memory system where the agent stores experience and facts itself and retrieves them later |
| AgentRecall | no | not required | 373 | local agent memory built on a corrections ledger |
README in short
The README explains the idea with an agent that starts every session with amnesia and compares the system with other memory solutions on results from three test sets. It continues with install commands for different systems, a description of the tiers, a table of Python library methods, a documentation list and answers to common questions. Details about the author's paper and README translations sit at the end.