Bettermemory

io.github.0MattiasPublished by GitHub account 0Mattiasv8.0.0Updated Oct 24, 2026

Memory for coding agents, checked against the filesystem and git before it is believed.

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

A local memory server for coding agents that checks stored facts against the filesystem and git before the model relies on them.

What you can do
Stores memories as plain markdown files with a derived SQLite index, and exposes memory as an explicit tool call rather than an automatic injection. Each retrieved hit carries a staleness verdict covering calendar age, whether cited paths still exist, and commits landed since last confirmation; declared claims such as path, path::symbol or path::NAME=literal are re-checked against the working tree. Search is deterministic lexical ranking (keyword plus BM25) with no embedding models, and write gates reject transient state, secret-shaped tokens and near-duplicates. Curation and health tools surface drifted, cold or contradictory records.
When to use it
Useful when a coding agent should carry knowledge across sessions without quoting stale facts, especially in repositories where files and symbols move. It suits teams that want greppable, git-syncable memory files with no cloud account, and users who prefer deterministic retrieval over embedding-based search.
Requirements
Runs locally over stdio as a Python package (pypi bettermemory), installed with uv tool install, pipx or pip into a venv, or run without installing via uvx. Requires Python 3.11–3.14 and a supported MCP client; setup uses bettermemory init with a client name, and bettermemory doctor verifies wiring. No accounts, API keys or environment variables are declared.
Before you install
Memory is stored as local markdown files and a SQLite cache, so anything written there persists on disk and may be synced through git. Write gates are described as rejecting secret-shaped tokens, but users should still avoid storing credentials or private data in memories. The server reads the filesystem and git history to validate claims, and the README notes claims about the user are labelled as inferences rather than verified facts.

Installation

In SourceWeft

  1. Open Bettermemory in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[bettermemory]

[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:

sh
uv tool install bettermemorybettermemory 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 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, hermes. 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.

Source: README.md at commit 129b024

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

5
  1. v8.0.0LatestSep 24, 2026
  2. v7.19.2Sep 21, 2026
  3. v7.19.1Sep 17, 2026
  4. v7.19.0Sep 17, 2026
  5. v7.17.2Sep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts