Skip to main content

bettermemory: memory that is checked before it is believed

PyPI CI Python 3.11-3.14 MIT bettermemory MCP server

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, 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 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 reindex rebuilds 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), and bettermemory eval scores 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:

  1. uv tool install bettermemory — or pipx install bettermemory, or pip install bettermemory into a venv. Python 3.11–3.14.
  2. bettermemory init --client claude-code — likewise claude-desktop, cursor, cline. For any other MCP host, plain bettermemory init prints the canonical mcpServers JSON snippet plus known config locations. (Continue needs a hand-written YAML entry — see docs/clients.md.)
  3. bettermemory doctor — exit 0 means correctly wired; every failed check prints a one-line fix.
  4. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bettermemory-6.5.0.tar.gz (6.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bettermemory-6.5.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file bettermemory-6.5.0.tar.gz.

File metadata

  • Download URL: bettermemory-6.5.0.tar.gz
  • Upload date:
  • Size: 6.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bettermemory-6.5.0.tar.gz
Algorithm Hash digest
SHA256 04e90a71384c785adbab3a3b9f16be93ed765ec3eb9a9ce65abdf357ddb184b4
MD5 2064e6e4fc45a48aa2b3acdd1f9fe909
BLAKE2b-256 b4aa921d98f8b3ea432ffbcb529c7c17b78da1743eafa13d037ea7b56d2a6727

See more details on using hashes here.

Provenance

The following attestation bundles were made for bettermemory-6.5.0.tar.gz:

Publisher: release.yml on 0Mattias/bettermemory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bettermemory-6.5.0-py3-none-any.whl.

File metadata

  • Download URL: bettermemory-6.5.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bettermemory-6.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90658960621f4a2e6ff5951a5b8b2ef5fa4d5872c421c6e6f530e2e3808ef58b
MD5 dea9eba5714e442aa93a115e26b9bb1b
BLAKE2b-256 99828206617d9813cbef35d6f9829f0e1ea2deba49cb57ef2ea5a8a17ef8dc82

See more details on using hashes here.

Provenance

The following attestation bundles were made for bettermemory-6.5.0-py3-none-any.whl:

Publisher: release.yml on 0Mattias/bettermemory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

7.8.0

2 files

7.7.0

2 files

7.6.0

2 files

7.5.1

2 files

7.5.0

2 files

7.4.0

2 files

7.3.0

2 files

7.2.0

2 files

7.1.0

2 files

7.0.0

2 files

6.6.0

2 files

This release

6.5.0 This release

2 files

6.4.2

2 files

6.4.1

2 files

6.4.0

2 files

6.3.0

2 files

6.2.0

2 files

6.1.0

2 files

6.0.0

2 files

5.7.0

2 files

5.6.0

2 files

5.5.0

2 files

5.4.0

2 files

5.3.0

2 files

5.2.0

2 files

5.1.1

2 files

5.1.0

2 files

5.0.0

2 files

4.0.0

2 files

3.43.0

2 files

3.41.0

2 files

3.40.0

2 files

3.39.0

2 files

3.38.0

2 files

3.37.0

2 files

3.36.0

2 files

3.35.0

2 files

3.34.0

2 files

3.33.0

2 files

3.32.0

2 files

3.31.1

2 files

3.31.0

2 files

3.30.0

2 files

3.29.0

2 files

3.28.0

2 files

3.27.0

2 files

3.26.0

2 files

3.25.2

2 files

3.25.1

2 files

3.25.0

2 files

3.24.1

2 files

3.24.0

2 files

3.23.0

2 files

3.22.1

2 files

3.22.0

2 files

3.21.0

2 files

3.20.0

2 files

3.19.0

2 files

3.18.1

2 files

3.18.0

2 files

3.17.1

2 files

3.17.0

2 files

3.16.0

2 files

3.15.1

2 files

3.15.0

2 files

3.14.1

2 files

3.14.0

2 files

3.13.1

2 files

3.13.0

2 files

3.12.0

2 files

3.11.0

2 files

3.10.0

2 files

3.9.0

2 files

3.8.0

2 files

3.7.1

2 files

3.7.0

2 files

3.6.5

2 files

3.6.4

2 files

3.6.1

2 files

3.6.0

2 files

3.5.0

2 files

3.4.2

2 files

3.4.0

2 files

3.3.4

2 files

3.3.3

2 files

3.3.2

2 files

3.3.1

2 files

3.3.0

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

2.7.3

2 files

2.7.2

2 files

2.7.1

2 files

2.6.7

2 files

2.6.6

2 files

2.6.5

2 files

2.6.4

2 files

2.6.3

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

2 files

2.5.0

2 files

2.4.0

2 files

2.3.2

2 files

2.3.1

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.5.0

2 files

1.4.2

2 files

1.4.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page