What is MCP Memory Service?
MCP Memory Service is an open-source memory backend for AI agents. It starts from a familiar problem: an assistant forgets everything when a new chat begins, and you spend the first minutes of every session re-explaining your architecture. It sits in the Agent Memory category of the Agents & Automation tools and is open-source, written in Python and licensed Apache-2.0.
Overview
MCP Memory Service is an open-source memory backend for AI agents. It starts from a familiar problem: an assistant forgets everything when a new chat begins, and you spend the first minutes of every session re-explaining your architecture. The service stores decisions, notes, code patterns and project context, and hands them back to the next session or the next agent, so work does not restart from zero each time.
It is one self-hosted Python service that speaks every transport its users need: MCP for Claude Desktop, Claude Code, Cursor, VS Code and other MCP clients; a framework-agnostic REST API for agent pipelines built on LangGraph, CrewAI, AutoGen or any HTTP client; Remote MCP with OAuth 2.0 over HTTPS for claude.ai and ChatGPT in the browser; plus a CLI and a web dashboard. Embeddings run locally through ONNX and the default store is SQLite, so core memory operations stay on your own infrastructure; Cloudflare, a Hybrid mode (local reads with background cloud sync) and Milvus are the other storage backends.

Beyond plain storage, memories are linked in a knowledge graph with typed edges such as causes, fixes and contradicts, so agents can share causal chains rather than isolated facts. A scheduled consolidation pass clusters, compresses and selectively forgets old memories, and heuristic contradiction detection can mark older memories as superseded. The README says agents retrieve prior decisions in 5ms; the project publishes LongMemEval, DevBench and LoCoMo benchmark results, with run commands, in its own docs.
What it does
- Persistent memory shared across sessions, agents and runs, with an `X-Agent-ID` header that tags each memory by the agent that stored it for scoped retrieval
- Semantic search combined with BM25 keyword search, a ranked mode that weighs recency, access frequency and quality, and tag, time-range and store-partition filters

- Knowledge graph with typed causal relationships and entity extraction that links @mentions, #tags, URLs and file paths, explorable in an interactive graph view
- Autonomous consolidation — clustering, compression, association discovery and controlled forgetting — plus confidence-scored beliefs and contradiction handling
- Automatic session capture through Claude Code and Codex hooks, document ingestion for PDF, text and Markdown, and JSON import/export including mem0 exports
- Web dashboard with Dashboard, Search, Browse, Documents, Manage, Analytics, Quality and API Docs tabs, served by the same HTTP server
Getting started
The package is on PyPI and installs a `memory` command. Wire it into an MCP client, or run it as an HTTP server for agent frameworks. The project's Setup Guide walks through choosing a path.

Install from PyPI
pip install mcp-memory-serviceConnect Claude Desktop
Add the server to `claude_desktop_config.json` (on macOS `~/Library/Application Support/Claude/`, on Windows `%APPDATA%\Claude\`, on Linux `~/.config/Claude/`), then restart Claude Desktop.
{
"mcpServers": {
"memory": {
"command": "memory",
"args": ["server"]
}
}
}Or connect Claude Code
Register the server with one command and restart Claude Code; the memory tools appear automatically.
claude mcp add memory -- memory serverServe the REST API for agent pipelines
For LangGraph, CrewAI, AutoGen or any HTTP client, start the HTTP server. Store with `POST /api/memories`, search with `POST /api/search` and filter by tag with `POST /api/search/by-tag`; sending `X-Agent-ID: <id>` on a store tags the memory `agent:<id>`. The live endpoint list is at `/api/docs`.
MCP_ALLOW_ANONYMOUS_ACCESS=true memory server --http
# REST API running at http://localhost:8000Run it in the background and open the dashboard
`memory launch` starts the HTTP server on 127.0.0.1:8000, where the web dashboard lets you search, browse and manage memories. The server binds to localhost by default; the README warns to expose it with `--host 0.0.0.0` only behind authentication, firewall rules, TLS or a VPN.
memory launch # start HTTP server in background (127.0.0.1:8000)
memory launch --port 8192 # custom port
memory info # status and health
memory logs --lines 50 # recent logs
memory stop # stop server
Pick a storage backend (optional)
The source installer lets you choose SQLite (local, single-user), Cloudflare (multi-device sync), Hybrid (local reads with background cloud sync, which the README recommends for production) or Milvus.
git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service
python scripts/installation/install.pyCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Give Claude Desktop or Claude Code memory of your project's architecture and decisions, so a new session starts with that context
- Share one memory store across a LangGraph, CrewAI or AutoGen pipeline over plain HTTP, scoped per agent with the `X-Agent-ID` header
- Reach the same memories from claude.ai and ChatGPT in the browser through a self-hosted Remote MCP endpoint with OAuth
- Replace a hand-managed Redis + Pinecone + glue-code setup with one self-hosted service, and migrate existing mem0 exports into it
How MCP Memory Service compares
MCP Memory Service alongside other open-source agent memory tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Claude-Mem | ★ 121k | Persistent memory layer for coding agents: it captures what an agent does during a session, compresses it into semantic summaries, and injects the relevant parts back into later sessions. |
| Mem0 | ★ 69.7k | A memory layer that you add to existing LLM agents to extract, store, and recall user facts and preferences across sessions using vector, graph, and key-value backends. |
| Hindsight | ★ 64.3k | An agent memory server that stores facts and experiences, consolidates them into observations and mental models, and serves them back through retain, recall, and reflect operations. |
| MemPalace | ★ 60.8k | Local-first agent memory that stores conversations verbatim instead of summarising them, with a structured palace index, pluggable vector backends and an MCP server. |
| OpenViking | ★ 43.1k | A context database that stores an agent's memories, resources, and skills as one browsable viking:// filesystem with three-tier (abstract/overview/details) on-demand loading. |
| Cognee | ★ 33.7k | A graph-native memory engine that turns raw documents and conversations into a queryable knowledge graph for agents that need to build lasting knowledge. |
| Graphiti | ★ 33.2k | A library that builds a temporal knowledge graph from an agent's conversations and data so facts can be tracked and queried as they change over time. |
| MCP Memory Service | ★ 2.2k | One self-hosted memory backend for AI agents, over MCP, a REST API, a CLI and a web dashboard |
