{
  "markdown": "<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/0Mattias/bettermemory/main/docs/assets/banner.svg\" alt=\"bettermemory: memory that is checked before it is believed\" width=\"100%\">\n</p>\n\n<p align=\"center\">\n  <a href=\"https://pypi.org/project/bettermemory/\"><img src=\"https://img.shields.io/pypi/v/bettermemory.svg\" alt=\"PyPI\"></a>\n  <a href=\"https://github.com/0Mattias/bettermemory/actions/workflows/ci.yml\"><img src=\"https://github.com/0Mattias/bettermemory/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <a href=\"https://www.python.org/downloads/\"><img src=\"https://img.shields.io/badge/python-3.11%E2%80%933.14-blue.svg\" alt=\"Python 3.11-3.14\"></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"MIT\"></a>\n  <a href=\"https://glama.ai/mcp/servers/0Mattias/bettermemory\"><img src=\"https://glama.ai/mcp/servers/0Mattias/bettermemory/badges/score.svg\" alt=\"bettermemory MCP server\"></a>\n</p>\n\n<!-- mcp-name: io.github.0Mattias/bettermemory -->\n\nAn MCP memory server for coding agents. Stored facts get checked against\nthe filesystem and git *before* the model relies on them, so a memory\nthat has rotted is flagged instead of quoted back at you.\n\n## Install\n\nClaude Code — two slash commands, zero config:\n\n```\n/plugin marketplace add 0Mattias/bettermemory\n/plugin install bettermemory@bettermemory\n```\n\nAnything else that speaks MCP:\n\n```sh\nuv tool install bettermemory\nbettermemory init --client claude-desktop   # or cursor / cline / claude-code\n```\n\nRestart the client. `bettermemory doctor` exits 0 when it's wired\ncorrectly and prints a one-line fix for anything that isn't.\n\nTry it without installing: `uvx bettermemory try` writes a memory\nciting a file, deletes the file, and shows the next search flagging it.\nOffline, throwaway store.\n\n## What it does\n\n- Checks memory before believing it. Every hit carries a staleness\n  verdict: calendar age, whether the paths it cites still exist, the\n  commits landed since it was last confirmed, and how the record\n  entered the store (written here, pulled, or placed by hand).\n  Declared claims\n  (`path`, `path::symbol`, `path::NAME=literal`) are re-checked\n  against the working tree; a claim that stops being true blocks the\n  stamp instead of riding along.\n- Retrieval is deliberate. Memory is a tool call, not an\n  injection. Write gates bounce transient state, secret-shaped tokens\n  and near-duplicates; claims about *you* stage for confirmation.\n- The code is the model. Search is deterministic lexical ranking —\n  keyword + BM25, fused — over your own vocabulary. No embedding\n  models, no downloads, nothing to warm up, same answer every time.\n- Plain files. One markdown file per memory. Greppable,\n  git-syncable, no cloud, no account. The SQLite index beside the\n  files is a derived cache you can delete; `bettermemory reindex`\n  rebuilds it.\n- Rot gets acted on, not accumulated. Episodes journal per-session\n  run-state without polluting durable search; health telemetry and\n  curation tools surface what drifted, what went cold, and what\n  contradicts what.\n- Receipts, not adjectives. The claims above are measured by\n  preregistered benchmarks whose frozen result artifacts — misses\n  included — live in [bench/][bench] (`results/*.json`, each carrying\n  the declared terms it was scored under), and `bettermemory eval`\n  scores whether memory actually helped against your own log ([ours\n  is published][eval-results]).\n\n## For agents\n\nYou were likely handed this link with \"set this up.\" On Claude Code,\nthe two plugin commands above are the whole install — skip to step 3.\nEverywhere else, steps are idempotent and safe to re-run:\n\n1. `uv tool install bettermemory` — or `pipx install bettermemory`,\n   or `pip install bettermemory` into a venv. Python 3.11–3.14.\n2. `bettermemory init --client claude-code` — likewise\n   `claude-desktop`, `cursor`, `cline`. For any other MCP host, plain\n   `bettermemory init` prints the canonical `mcpServers` JSON snippet\n   plus known config locations. (Continue needs a hand-written YAML\n   entry — see [docs/clients.md][clients-continue].)\n3. `bettermemory doctor` — exit 0 means correctly wired; every failed\n   check prints a one-line fix.\n4. Have the user restart the client so the server loads, then confirm\n   by asking the model *\"what memory tools do you have?\"*\n\nYour operating contract — tool signatures, retrieval discipline,\nwrite gates — is [docs/api.md][api]; the server's\n`instructions` block delivers the core policy automatically. For the\nlong-form policy in your system prompt: `bettermemory init\n--with-addendum`. Migrating from Claude Code's built-in auto-memory:\n`bettermemory ingest` imports those files once.\n\n## Everything else\n\nThe rest is written down: mechanics, storage format, the full tool\nsurface, CLI, configuration and limitations in\n[internals][internals]; per-client setup in [clients][clients] and\n[installation][installation]; eval methodology in [eval][eval];\npostmortems in [incidents][incidents]; release history in\n[CHANGELOG][changelog]; dev setup and the compatibility contract in\n[CONTRIBUTING][contributing].\n\nMIT licensed — see [LICENSE][license].\n\n[api]: https://github.com/0Mattias/bettermemory/blob/main/docs/api.md\n[bench]: https://github.com/0Mattias/bettermemory/tree/main/bench\n[changelog]: https://github.com/0Mattias/bettermemory/blob/main/CHANGELOG.md\n[clients]: https://github.com/0Mattias/bettermemory/blob/main/docs/clients.md\n[clients-continue]: https://github.com/0Mattias/bettermemory/blob/main/docs/clients.md#continue-legacy-shape--see-caveat\n[contributing]: https://github.com/0Mattias/bettermemory/blob/main/CONTRIBUTING.md\n[eval]: https://github.com/0Mattias/bettermemory/blob/main/docs/eval.md\n[eval-results]: https://github.com/0Mattias/bettermemory/blob/main/docs/eval-results.md\n[incidents]: https://github.com/0Mattias/bettermemory/blob/main/docs/incidents/\n[installation]: https://github.com/0Mattias/bettermemory/blob/main/docs/installation.md\n[internals]: https://github.com/0Mattias/bettermemory/blob/main/docs/internals.md\n[license]: https://github.com/0Mattias/bettermemory/blob/main/LICENSE\n",
  "bytes": 6141,
  "sha": "ca4e08d0cd496e06c4b87db46844a6204fcd191710ac5511d5f57839b7080118",
  "repo_slug": "0mattias/bettermemory",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_0mattias_bettermemory_d12d4bb9/readme"
}