Overview
What is memtomem?
Section titled “What is memtomem?”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.
Use It When
Section titled “Use It When”- 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 ~/notesat 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.
Start in 3 Steps
Section titled “Start in 3 Steps”uv tool install 'memtomem[all]' # 1. installmm init # 2. interactive setupclaude mcp add memtomem -s user -- memtomem-server # 3. connect your agentFull walkthrough (including other MCP clients) in Quick Start.
Core Concepts
Section titled “Core Concepts”- 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 asharedspace for cross-agent knowledge. See Multi-Agent Collaboration. - Lifecycle Policies —
auto_archive/auto_expire/auto_promote/auto_tagrun on a background scheduler, so memories are aged and promoted automatically.
Architecture
Section titled “Architecture”AI Agent (Claude Code, Cursor, Gemini CLI, …) ↕ MCP protocolmemtomem 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.
Relationship to STM
Section titled “Relationship to STM”| LTM (memtomem) | STM (memtomem-stm) | |
|---|---|---|
| Role | Persistent storage & search | Real-time proxy & compression |
| Required? | Yes (core) | Optional |
| How it works | Agent calls mem_search when needed | Relevant 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.
Package Info
Section titled “Package Info”| PyPI | memtomem |
| Latest release | 0.2.2 |
| CLI | mm |
| License | Apache 2.0 |
| GitHub | memtomem/memtomem |
Next Steps
Section titled “Next Steps”- Quick Start — Install and store your first memory in 5 minutes
- Memory Persistence Across Sessions — Save in session A, recall in session B
- Hybrid Search — How the search engine works
- Multi-Agent Collaboration — Namespace design and sharing workflows
- Context Gateway — Define agents / skills / commands once, sync across runtimes
- MCP Tools — Full tool reference
- CLI Reference —
mmcommand reference