Skip to content

Overview

memtomem gives your AI agent memory that persists across sessions and across agents. It runs as a local MCP server — your agent uses the same tool-calling it already does, and past information becomes searchable.

  • You keep re-explaining yesterday’s decisions in today’s session — memtomem solves the “every new session is a blank slate” problem. Walk through the flow in Memory Persistence Across Sessions.
  • You want notes or docs to be searchable by your agent — point mm index ~/notes at a folder of Markdown / structured files and every MCP-connected agent can query it.
  • Multiple agents need to share the same knowledge — Claude Code, Cursor, Codex CLI, and any other MCP client share one memory store.
Terminal window
uv tool install 'memtomem[all]' # 1. install
mm init # 2. interactive setup
claude mcp add memtomem -s user -- memtomem-server # 3. connect your agent

Full walkthrough (including other MCP clients) in Quick Start.

  • Hybrid Search — BM25 keyword + dense vector search merged via RRF, so exact identifiers and meaning-based queries both land. See Hybrid Search.
  • Namespaces — Per-agent private spaces (agent-runtime:{id}) plus a shared space for cross-agent knowledge. See Multi-Agent Collaboration.
  • Lifecycle Policiesauto_archive / auto_expire / auto_promote / auto_tag run on a background scheduler, so memories are aged and promoted automatically.
AI Agent (Claude Code, Cursor, Gemini CLI, …)
↕ MCP protocol
memtomem server
SQLite (FTS5 + sqlite-vec)

memtomem runs as a local MCP server. All data stays on your machine — SQLite for storage, ONNX for embeddings. No GPU, no external services, no account required.

LTM (memtomem)STM (memtomem-stm)
RolePersistent storage & searchReal-time proxy & compression
Required?Yes (core)Optional
How it worksAgent calls mem_search when neededRelevant memories auto-injected into every tool response

The default setup is LTM alone. If you want token-optimized responses with proactive memory injection, add memtomem-stm as a proxy in front.

PyPImemtomem
Latest release0.2.2
CLImm
LicenseApache 2.0
GitHubmemtomem/memtomem