Munin is local memory for AI coding agents. An agent searches it before unfamiliar work and records what it learned afterwards: decisions, how the system is built, bugs and their fixes. Everything lives in one SQLite file, and every MCP client on the machine (Claude Code, Codex, Cursor, OpenCode) reads and writes the same memory.
Why
Agents start every session from zero. Instructions files such as AGENTS.md hold what people write down; they do not hold what an agent found out an hour ago while chasing a bug.
Munin reimplements the ideas of larchanka/memo-mcp in Rust: one SQLite file, a search that returns compact cards first and the full entry only on request, and entries that fade with age by kind. It changes what does not hold up over months of use:
| memo-mcp | Munin |
|---|---|
| Entries can never change | An entry is superseded by a newer one or retracted with a reason |
| No links between entries | supersedes links both ends of the chain |
| Project only as a prefix in the summary | Project is a column; search stays inside it by default |
| Decay applied after a top-30 cut by raw BM25 | Decay applied to every match before the limit |
Invalid input silently becomes a note | Invalid input is rejected with the field and what is allowed |
npx -y fetches the latest version on every start | One pinned binary |
How It Works
On connect, the server sends the agent its instructions: search before unfamiliar work, record after a decision or a fix, reuse existing tags. Nothing has to be copied into the agent's own instructions file.
Entries
| Kind | For | Fades with age |
|---|---|---|
decision | a choice or convention that holds until replaced | no |
architecture | how the system is built | no |
bugfix | a problem, its cause and the fix | half its weight every 30 days |
note | anything else | half its weight every 30 days |
Ranking is BM25 text relevance times the age factor of the kind, computed by a function registered in SQLite. It covers every match before the limit is applied, so one old decision is not pushed out by a pile of stale fixes.
An entry is never edited. Its status only moves away from active, and either way it stays readable with its history:
Triggers in the database refuse edits and deletes, so this holds for any client that opens the file, not only for Munin's own code.
Projects and Groups
Every entry belongs to a project, named after the git root the agent works in. Projects can be grouped, for example the services of one microservice system. A project in a group searches the whole group by default, and a decision that spans the services is recorded on the group itself, so every member sees it.
Getting Started
Each release has an archive for Apple Silicon Macs and one for x86_64 Linux (statically linked), each with a .sha256 next to it: unpack it and put munin on your PATH. Or build from source:
git clone https://github.com/alnovis/munin.git
cd munin
cargo install --locked --path .
Then connect it to Claude Code:
claude mcp add --scope user munin -- munin serve
For the agent to use Munin without being asked, allow its tools and add a session-start hook that runs munin brief; both are a few lines in ~/.claude/settings.json. These settings, connecting Codex, Cursor, OpenCode and agents without MCP, the command line and the search syntax are described in the repository's install and usage guides.