io.github.0Mattias/bettermemory
Memory for coding agents, checked against the filesystem and git before it is believed.
Que pouvez-vous faire avec io.github.0Mattias/bettermemory ?
- Checks memory before believing it. Every hit carries a staleness
- Retrieval is deliberate. Memory is a tool call, not an
- The code is the model. Search is deterministic lexical ranking —
- Plain files. One markdown file per memory. Greppable,
- Rot gets acted on, not accumulated. Episodes journal per-session
- Receipts, not adjectives. The claims above are measured by
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
bettermemoryclaude mcp add bettermemory -- uvx bettermemory==8.0.0
{
"mcpServers": {
"bettermemory": {
"command": "uvx",
"args": [
"bettermemory==8.0.0"
]
}
}
}
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
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 / hermes
Restart the client. bettermemory doctor exits 0 when it's wired
correctly and prints a one-line fix for anything that isn't.
Try it 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
- Checks memory before believing it. Every hit carries a staleness
verdict: calendar age, whether the paths it cites still exist, the
commits landed since it was last confirmed, and how the record
entered the store (written here, pulled, or placed by hand).
Declared claims
(
path,path::symbol,path::NAME=literal) are re-checked against the working tree; a claim that stops being true blocks the stamp instead of riding along. - Retrieval is deliberate. Memory is a tool call, not an injection. Write gates bounce transient state, secret-shaped tokens and near-duplicates; claims about you are labelled as inferences, so they stay distinguishable and correctable.
- The code is the model. Search is deterministic lexical ranking — keyword + BM25, fused — over your own vocabulary. No embedding models, no downloads, nothing to warm up, same answer every time.
- Plain files. One markdown file per memory. Greppable,
git-syncable, no cloud, no account. The SQLite index beside the
files is a derived cache you can delete;
bettermemory reindexrebuilds it. - Rot gets acted on, not accumulated. Episodes journal per-session run-state without polluting durable search; health telemetry and curation tools surface what drifted, what went cold, and what contradicts what.
- Receipts, not adjectives. The claims above are measured by
preregistered benchmarks whose frozen result artifacts — misses
included — live in [bench/][bench] (
results/*.json, each carrying the declared terms it was scored under), andbettermemory evalscores whether memory actually helped against your own log ([ours is published][eval-results]).
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,hermes. 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][clients-continue].)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][api]; 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
The rest is written down: mechanics, storage format, the full tool surface, CLI, configuration and limitations in [internals][internals]; per-client setup in [clients][clients] and [installation][installation]; eval methodology in [eval][eval]; postmortems in [incidents][incidents]; release history in [CHANGELOG][changelog]; dev setup and the compatibility contract in [CONTRIBUTING][contributing].
MIT licensed — see [LICENSE][license].
[api]: https://github.com/0Mattias/bettermemory/blob/main/docs/api.md [bench]: https://github.com/0Mattias/bettermemory/tree/main/bench [changelog]: https://github.com/0Mattias/bettermemory/blob/main/CHANGELOG.md [clients]: https://github.com/0Mattias/bettermemory/blob/main/docs/clients.md [clients-continue]: https://github.com/0Mattias/bettermemory/blob/main/docs/clients.md#continue-legacy-shape--see-caveat [contributing]: https://github.com/0Mattias/bettermemory/blob/main/CONTRIBUTING.md [eval]: https://github.com/0Mattias/bettermemory/blob/main/docs/eval.md [eval-results]: https://github.com/0Mattias/bettermemory/blob/main/docs/eval-results.md [incidents]: https://github.com/0Mattias/bettermemory/blob/main/docs/incidents/ [installation]: https://github.com/0Mattias/bettermemory/blob/main/docs/installation.md [internals]: https://github.com/0Mattias/bettermemory/blob/main/docs/internals.md [license]: https://github.com/0Mattias/bettermemory/blob/main/LICENSE
Questions fréquentes
Qu'est-ce que io.github.0Mattias/bettermemory ?
Memory for coding agents, checked against the filesystem and git before it is believed.
Comment installer io.github.0Mattias/bettermemory ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add bettermemory -- uvx bettermemory==8.0.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour io.github.0Mattias/bettermemory ?
Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.
io.github.0Mattias/bettermemory est-il open source ?
Oui. Son code est sur GitHub sous licence MIT.
Qui maintient io.github.0Mattias/bettermemory ?
Il est publié par 0Mattias. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.