What it is
MCP Memory Service is an open-source server that gives AI agents a memory that outlives the session. Agents and assistants forget everything when a conversation ends; this service stores what they learned on your own machine or server and hands it back when it is relevant. It is built for developers who work with coding agents, and for teams that run several agents on shared knowledge.
-
Persistent memory
A client stores a decision, a fix or a preference as a memory with tags and a type. It stays in a database you control: SQLite-vec on disk by default, Cloudflare, a hybrid of both, or Milvus.
-
Semantic search
By default each memory is embedded by a local ONNX model, so a later question finds it by meaning even when the wording differs. Hybrid search adds BM25 keyword matching to the vector results; tags and time ranges narrow them.
-
Knowledge graph
Memories are linked by typed relationships such as
causes,fixes,contradictsandsupports. Scheduled consolidation lets stale entries decay and compresses related ones.
What's new in v12.9
The ontology overlay gets a REST API, a dashboard section and sync between nodes, and two access-scope leaks are closed.
-
Ontology
REST API and dashboard section
GET /api/ontologyreturns the merged memory types, relationships, type patterns and retention periods. Writes go through the same validated storage methods and need the globalwritescope. -
Sync
The ontology overlay syncs through the hub
Overlay writes become sync events that peers resolve per key. A peer that does not advertise
ontology_synckeeps syncing memories without stalling. -
Security
MCP prompts and server status respect scope
prompts/getnow requires a globalreadscope, and/api/server/statusreturns process, OS and Python details to admin callers only. -
Dashboard
Tag management minimum-use filter
Tag management hides tags used fewer than twice by default, with an adjustable threshold. The disabled System Maintenance placeholders are gone.
-
Search
Recall ranges keep both ends
"From January to March" now parses as the whole window instead of keeping only the start.
One service, three ways in
Agents on your machine talk to it over stdio, frameworks over REST, and browser chat apps over Remote MCP with OAuth 2.1.
The underlined lane is the one that crosses the network with OAuth. Local MCP is a process on your machine, with no network hop.
In the wild
Three deployments people built and run themselves.
"After I work with one of the cluster agents on something I want my local agent to know about, the cluster agent adds a special tag to the memory entry that my local agent recognizes as a message from a cluster agent. So they end up using it as a comms bridge, and it's pretty delightful."@jeremykoerber
A five-agent cluster uses one memory service as shared state and as an inter-agent channel, with no custom protocol: cluster agents write a sentinel tag, the local agent filters on it. The pattern
"File-based memory demands constant discipline. Semantic recall from a live database doesn't. Storing data on my own hardware while making it remotely accessible across platforms turned out to be a feature I didn't know I needed."@PL-Peter
Two Docker containers on one SQLite backend, a Cloudflare tunnel for name-based routing, and an auth gateway in front. The checklist
"Claude Code, Claude Desktop, Codex CLI and OpenCode all talk to the same sqlite-vec DB over stdio on my Mac. ~5,900 memories and counting. It's the closest thing to persistent identity my agents have."Mingjian Shao, AI PM and consultant, September 2026
One local sqlite-vec database shared by four agents: no server, no cloud, offline embeddings, daily backups and scheduled consolidation.
How it compares
Against the commercial memory APIs and the MCP-native alternatives.
Commercial memory APIs
| mcp-memory-service | Mem0 | Zep | DIY Redis+Pinecone | |
|---|---|---|---|---|
| License | Apache 2.0 | Proprietary | Enterprise | — |
| Cost | No license fee, your own hosting | Per-call API | Enterprise | Infra costs |
| claude.ai browser | Remote MCP | Desktop only | Desktop only | No |
| OAuth 2.1 + DCR | Yes | Unknown | Unknown | No |
| Streamable HTTP | Yes (SSE too) | No | No | No |
| Framework integration | REST, any HTTP client | SDK | SDK | Manual |
| Knowledge graph | Yes, typed edges | No | Limited | No |
| Auto consolidation | Yes, decay + compression | No | No | No |
| On-premise embeddings | Yes, ONNX local | No | No | Manual |
| Data location | Your machine by default | Cloud | Cloud | Partial |
| Hybrid search | Yes, BM25 + vector | No | Yes | Manual |
| MCP protocol | Yes | No | No | No |
MCP-native: MemPalace
| mcp-memory-service | MemPalace | |
|---|---|---|
| LongMemEval R@5 (raw ChromaDB, zero LLM) | 86.0% session / 80.4% turn | 96.6%1 |
| LongMemEval R@5 (with reranking) | — | 100%2 |
| Storage granularity | Turn-level and session-level | Session-level |
| Team / multi-device sync | Cloudflare sync | Local only |
| REST API / web dashboard | Yes | No |
| OAuth 2.1 + multi-user | Yes | No |
| Knowledge graph | Yes, typed edges | No |
| Auto consolidation | Yes, decay + compression | No |
| License | Apache 2.0 | MIT |
Why the benchmark gap? MemPalace stores whole sessions as single units, and LongMemEval asks which session contains the answer, so that granularity answers the question structurally. This service defaults to turn-level storage for finer retrieval; session-mode ingestion brings it to 86.0% R@5.
1 Measured in MemPalace "raw mode": plain text in ChromaDB with default embeddings. Per Issue #27, the Palace structural features are bypassed in that configuration, and the maintainers acknowledged most of the review's points.
2 Uses optional LLM reranking (~500 API calls) on a partially tuned test set. Clean held-out score as reported by the maintainers: 98.4% R@5.
Full numbers and the run commands: docs/BENCHMARKS.md
SHODH ecosystem
Fully compatible with the SHODH Unified Memory API Specification: every SHODH implementation shares the same memory schema (emotional metadata, episodic memory, source tracking, quality scoring), so memories export and import across implementations with full fidelity. The reference implementation is shodh-memory (RocksDB); shodh-cloudflare runs on Workers + Vectorize; this service runs SQLite-vec or Hybrid.
In the media
Talks and coverage from the community.
-
Heavybit, Humans in the Loop
Agents Overdrawn at the Memory Bank
A deep dive with maintainer Heinrich Krupp on agent amnesia and why persistent memory is the missing infrastructure layer for agentic systems.
-
AI Tinkerers Zürich
Talk by Heinrich Krupp · full video
Persistent memory architecture, semantic search, and multi-agent memory sharing.
-
LinkedIn, Dr. Álvaro Cintas
Solving session amnesia
How mcp-memory-service gives Claude Code, Cursor and OpenCode a shared memory over MCP, with on-device ONNX embeddings and no external API calls.
"Your project has inspired me in many ways. In my view, it's the best implementation of MCP memory I've found so far." — Michał Zubkowicz
Questions
What it stores, where the data lives, and where the limits are.
Does it save every conversation automatically?
No. Connecting the service over MCP gives your client tools to store and recall memories; the client has to call them. Optional hooks for Claude Code and a session import have their own setup.
Where is my data stored?
With the default SQLite-vec backend, memories and their embeddings live in a database file on the machine that runs the service, and embeddings are computed there. The embedding model is downloaded once on first start. Cloudflare storage, hybrid sync and Milvus are optional backends you configure yourself. What your AI client sends to its own model provider is up to that client.
Which clients and frameworks work with it?
Any MCP client over stdio, such as Claude Code, Claude Desktop, Codex CLI, Cursor, OpenCode, Gemini CLI, VS Code, Windsurf and Zed. Browser chat apps such as claude.ai and ChatGPT (Developer Mode) connect over Remote MCP with OAuth 2.1. Frameworks such as LangGraph, CrewAI and AutoGen use the REST API. The integrations list has the details.
How do I install and run it?
Install with pip install "mcp-memory-service[sqlite]" on Python 3.11 or newer, then add it to your client, for example claude mcp add memory -- memory server for Claude Code. The same package runs the HTTP server with the REST API, the dashboard and Remote MCP. The setup guide walks through it.
Is it free?
The software is open source under Apache 2.0 and has no license fee. You run it yourself, so hosting, your AI client's subscription or API usage, and any optional external service such as Cloudflare are your own costs.
What are the limits?
It is a memory store, not a model: it does not answer questions, it returns the memories that match. Search quality depends on the embedding model, and changing its dimensions means re-embedding every memory. External embedding APIs are supported on the SQLite-vec backend only.
Get started in seconds
Install from PyPI and connect your agents to persistent memory.
Deploying for a team?I help teams run self-hosted memory in production: OAuth, hybrid sync, multi-client rollout. Free 30-minute intro call.
Get in touch