pypi bettermemorystdioMITupdated 8d ago
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.
What can you do with bettermemory?
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.
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, and
the commits landed since it was last confirmed. 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 stage for confirmation.
- 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/ (
results/*.json, each carrying the declared terms it was scored under), andbettermemory evalscores whether memory actually helped against your own log (ours is published).
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
The rest is 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.
Install
Add bettermemory to your client. Pick the one you use.
claude mcp add bettermemory -- uvx bettermemorycodex mcp add bettermemory -- uvx bettermemoryamp mcp add bettermemory -- uvx bettermemory{
"mcpServers": {
"bettermemory": {
"command": "uvx",
"args": [
"bettermemory"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"bettermemory": {
"command": "uvx",
"args": [
"bettermemory"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"bettermemory","command":"uvx","args":["bettermemory"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"bettermemory": {
"command": "uvx",
"args": [
"bettermemory"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"bettermemory": {
"command": "uvx",
"args": [
"bettermemory"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"bettermemory": {
"command": "uvx",
"args": [
"bettermemory"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"bettermemory": {
"type": "local",
"command": "uvx",
"args": [
"bettermemory"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"bettermemory": {
"command": {
"path": "uvx",
"args": [
"bettermemory"
]
}
}
}
}Add to your Zed `settings.json`.
uvx bettermemoryRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance25/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 1 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 6.4.1Latest | Aug 31, 2026 |
| 6.4.0 | Aug 30, 2026 |
| 6.3.0 | Aug 30, 2026 |
| 6.2.0 | Aug 25, 2026 |
| 6.1.0 | Aug 17, 2026 |
| 6.0.0 | Aug 15, 2026 |
| 5.7.0 | Aug 15, 2026 |
| 5.6.0 | Aug 15, 2026 |
| 5.5.0 | Aug 14, 2026 |
| 5.4.0 | Aug 12, 2026 |
| 5.3.0 | Aug 11, 2026 |
| 5.2.0 | Aug 11, 2026 |
| 5.1.1 | Aug 10, 2026 |
| 5.1.0 | Aug 9, 2026 |
| 5.0.0 | Aug 9, 2026 |
| 4.0.0 | Aug 9, 2026 |
| 3.43.0 | Aug 9, 2026 |
| 3.41.0 | Aug 6, 2026 |
| 3.40.0 | Aug 5, 2026 |
| 3.39.0 | Aug 5, 2026 |
| 3.38.0 | Aug 4, 2026 |
| 3.37.0 | Aug 3, 2026 |
| 3.36.0 | Aug 2, 2026 |
| 3.35.0 | Aug 1, 2026 |
| 3.34.0 | Aug 1, 2026 |