mnemo

mnemo

MCP server providing persistent, local-first memory for AI agents via Markdown files in a git repo, with search, branching, and auditability.

Category
Visit Server

README

mnemo

npm version npm downloads CI license MIT PRs welcome

Give your AI agents a git repo as a brain.

🌐 Live site: https://joaquimlegal.github.io/mnemo/

mnemo is persistent, local-first memory for AI agents (OpenCode, Claude Code, Cursor, Codex…). Agents remember by writing Markdown files into a git repo β€” so you get auditability, branching, snapshots, and rollback for free.

demo

$ mm new "We chose Postgres" --body "over Mongo, because of transactions" --tags decision,db --importance 0.9
wrote main/20260811-221936-2d37

$ mm search "which database did we pick"
20260811-221936-2d37  0.81  [main]  We chose Postgres

$ mm log
4e246fa  mem: add 20260811-221936-2d37 - We chose Postgres

$ mm undo        # revert the last change β€” history is preserved
$ mm branch exp  # fork an alternative memory timeline

Why

LLM agents are stateless: every session forgets everything. You repeat decisions, preferences, and context over and over β€” burning tokens and letting the agent re-open settled questions.

mnemo fixes the pain points:

  • Cross-session onboarding β€” a new session reads yesterday's memories and starts knowing.
  • Multi-agent shared reality β€” the planner writes decisions, the implementer reads them.
  • Auditability β€” git log shows exactly what the agent knew, and when. (The requirement the agent community keeps asking for in 2026.)
  • Token economy β€” recall the 3 memories that matter instead of re-reading the whole project.
  • 100% local β€” memory is a folder on your machine. No cloud, no lock-in.

How

              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  agent ─────▢│  MCP server (mm mcp) │──┐
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚   .mnemo/          (a git repo)
  OpenCode ──▢│  plugin (auto)       │──┼──▢ memories/<agent>/<id>.md
  plugin      β”‚  capture + seed      β”‚  β”‚        └── frontmatter + markdown
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚   search: BM25 + recency + importance
  human ─────▢│  mm CLI               β”‚β”€β”€β”˜   audit:  git log / diff / revert
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Every memory is a human-readable Markdown file with metadata, and every mutation is a git commit. Search is classic BM25 plus a recency/importance rank β€” zero dependencies, ~90% recall@1 on synthetic corpora.

Install & use

npm i -g mnemo-mem

# in your project:
mm init
mm setup-opencode        # installs the OpenCode plugin + MCP config, then restart OpenCode

The OpenCode plugin makes memory automatic: at the end of a session it summarizes what was decided/learned and stores it; at the start of the next session it seeds the agent with the recent highlights. You don't maintain memory β€” it happens.

For other agents, add the MCP server:

{ "mcpServers": { "mnemo": { "command": "mm", "args": ["mcp"] } } }

And drop prompts/AGENTS.md into your project so agents know to call recall before work and remember after decisions.

CLI reference

mm init / new / ls / search / cat / rm
mm log | undo | revert <commit> | snapshot <tag> | tags | branches | branch | switch
mm mcp | setup-opencode

Documentation

Roadmap

  • [x] Core store (Markdown + frontmatter, per-agent profiles)
  • [x] Git substrate (auto-commit, branches, undo, snapshots)
  • [x] Search (BM25 + recency/importance ranking, optional embeddings)
  • [x] MCP server + OpenCode plugin (auto-capture + auto-recall)
  • [ ] Consolidation (auto-compress many small memories into an executive summary)
  • [ ] Semantic search defaults, more embedders
  • [ ] Benchmarks on real agent sessions

Develop

npm install
npm test              # vitest β€” 32 tests
npm run build         # tsc
npm run benchmark     # recall@k on 100/1000-memory corpora
bash scripts/demo.sh  # watch it work
vhs -o demo.gif scripts/demo.tape   # regenerate the README GIF (needs vhs + ttyd)

License

MIT β€” Β© 2026 JoaquimLegal

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured