Memory you can verify — a trust layer between an AI coding agent and its own past: per-hit staleness verdicts, claim-level use attribution, measured effectiveness, episodic run-state. MCP-native, local-first, MIT, no cloud.
Project description
An MCP memory server for coding agents. Stored facts get checked against the filesystem and git before the model relies on them, so a memory that has rotted is flagged instead of quoted back at you.
Install
Claude Code — two slash commands, zero config:
/plugin marketplace add 0Mattias/bettermemory
/plugin install bettermemory@bettermemory
Anything else that speaks MCP:
uv tool install bettermemory
bettermemory init --client claude-desktop # or cursor / cline / claude-code
Restart the client. bettermemory doctor exits 0 when it's wired
correctly and prints a one-line fix for anything that isn't.
Kick the tyres without installing: uvx bettermemory try writes a
memory citing a file, deletes the file, and shows the next search
flagging it. Offline, throwaway store.
What it does
- Every hit carries a staleness verdict — calendar age, the paths it cites, commits landed since it was last confirmed.
- Nothing is auto-injected; retrieval is a deliberate tool call. The 18 default tools do cost ~35 KB of schema per turn either way; the description half of that is capped in CI.
- Write gates: transient state, secret-shaped tokens and near-duplicates bounce; claims about you stage for confirmation.
- One markdown file per memory. Greppable, git-syncable. Markdown is canonical; the SQLite index next to it is a derived cache you can delete. No cloud, no account.
bettermemory evalmeasures whether memory actually helped, against your own log. Ours is published — a floor, from one user's store, caveats and misses included.
For agents
You were likely handed this link with "set this up." On Claude Code, the two plugin commands above are the whole install — skip to step 3. Everywhere else, steps are idempotent and safe to re-run:
uv tool install bettermemory— orpipx install bettermemory, orpip install bettermemoryinto a venv. Python 3.11–3.14.bettermemory init --client claude-code— likewiseclaude-desktop,cursor,cline. For any other MCP host, plainbettermemory initprints the canonicalmcpServersJSON snippet plus known config locations. (Continue needs a hand-written YAML entry — see docs/clients.md.)bettermemory doctor— exit 0 means correctly wired; every failed check prints a one-line fix.- Have the user restart the client so the server loads, then confirm by asking the model "what memory tools do you have?"
Your operating contract — tool signatures, retrieval discipline,
write gates — is docs/api.md; the server's
instructions block delivers the core policy automatically. For the
long-form policy in your system prompt: bettermemory init --with-addendum. Migrating from Claude Code's built-in auto-memory:
bettermemory ingest imports those files once.
Everything else
You shouldn't need it, but it's all written down: mechanics, storage format, the full tool surface, CLI, configuration and limitations in internals; per-client setup in clients and installation; eval methodology in eval; postmortems in incidents; release history in CHANGELOG; dev setup and the compatibility contract in CONTRIBUTING.
MIT licensed — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bettermemory-3.29.0.tar.gz.
File metadata
- Download URL: bettermemory-3.29.0.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b2f04b0f0381c7d53770ca3aa55236a608ce339601f391dbf07bad71bf2ee62
|
|
| MD5 |
16f929bc614e1fcdb13cc9ebdfa15b0b
|
|
| BLAKE2b-256 |
c28c3f133b54da1bb801b8ff1951a1f7f2473e1936b934b2a491b850ef490318
|
Provenance
The following attestation bundles were made for bettermemory-3.29.0.tar.gz:
Publisher:
release.yml on 0Mattias/bettermemory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bettermemory-3.29.0.tar.gz -
Subject digest:
7b2f04b0f0381c7d53770ca3aa55236a608ce339601f391dbf07bad71bf2ee62 - Sigstore transparency entry: 2255214251
- Sigstore integration time:
-
Permalink:
0Mattias/bettermemory@be6e0127cf8152edd365b44e51aa8ea0b4fb50b4 -
Branch / Tag:
refs/tags/v3.29.0 - Owner: https://github.com/0Mattias
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be6e0127cf8152edd365b44e51aa8ea0b4fb50b4 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bettermemory-3.29.0-py3-none-any.whl.
File metadata
- Download URL: bettermemory-3.29.0-py3-none-any.whl
- Upload date:
- Size: 904.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96ba0aa29e996e6c739d1673bbbe1f5cb146710eada5850b2fe24b9105edf4db
|
|
| MD5 |
dbd347920eb69ed7df975a88125c7041
|
|
| BLAKE2b-256 |
09692c9f6c42e52e2c5ebf44f01ced025b89cc12738eaf80a641002f8ad1cdd5
|
Provenance
The following attestation bundles were made for bettermemory-3.29.0-py3-none-any.whl:
Publisher:
release.yml on 0Mattias/bettermemory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bettermemory-3.29.0-py3-none-any.whl -
Subject digest:
96ba0aa29e996e6c739d1673bbbe1f5cb146710eada5850b2fe24b9105edf4db - Sigstore transparency entry: 2255214259
- Sigstore integration time:
-
Permalink:
0Mattias/bettermemory@be6e0127cf8152edd365b44e51aa8ea0b4fb50b4 -
Branch / Tag:
refs/tags/v3.29.0 - Owner: https://github.com/0Mattias
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@be6e0127cf8152edd365b44e51aa8ea0b4fb50b4 -
Trigger Event:
push
-
Statement type: