Skip to content
Back to search

mcp-memory-service

Open-source persistent memory for AI agent pipelines (LangGraph, CrewAI, AutoGen) and Claude. REST API + knowledge graph + autonomous consolidation.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/doobidoo/mcp-memory-service with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/doobidoo/mcp-memory-service'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/doobidoo--mcp-memory-service/badge.svg)](/listings/doobidoo--mcp-memory-service)

HTML

<a href="/listings/doobidoo--mcp-memory-service"><img src="/api/listings/doobidoo--mcp-memory-service/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 11 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "mcp-memory-service",
  3. "owner": { "name": "doobidoo", "url": "https://github.com/doobidoo" },
  4. "plugins": [
  5. {
  6. "name": "mcp-memory-service",
  7. "source": "./claude-hooks",
  8. "description": "Semantic memory for Claude Code sessions"
  9. }
  10. ]
  11. }
README.md · README · 372 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # mcp-memory-service
  2. ## Persistent Shared Memory for AI Agent Pipelines
  3. Open-source memory backend for AI agents — **REST API, MCP, OAuth, CLI, dashboard**. One self-hosted service, every transport.
  4. Agents store decisions, share causal knowledge graphs, and retrieve
  5. context in 5ms — without cloud lock-in or API costs.
  6. **Works with LangGraph · CrewAI · AutoGen · any HTTP client · Claude Desktop · OpenCode**
  7. ---
  8. [![Website](https://img.shields.io/badge/Website-mcpmemory.services-00e5ff?logo=cloudflare&logoColor=white)](https://mcpmemory.services)
  9. [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
  10. [![PyPI version](https://img.shields.io/pypi/v/mcp-memory-service?color=blue&logo=pypi&logoColor=white)](https://pypi.org/project/mcp-memory-service/)
  11. [![Python](https://img.shields.io/pypi/pyversions/mcp-memory-service?logo=python&logoColor=white)](https://pypi.org/project/mcp-memory-service/)
  12. [![PyPI Downloads](https://static.pepy.tech/personalized-badge/mcp-memory-service?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/mcp-memory-service)
  13. [![Docker Pulls](https://img.shields.io/docker/pulls/doobidoo/mcp-memory-service?logo=docker&logoColor=white)](https://hub.docker.com/r/doobidoo/mcp-memory-service)
  14. [![CI](https://img.shields.io/github/actions/workflow/status/doobidoo/mcp-memory-service/ci.yml?branch=main&logo=github&label=CI)](https://github.com/doobidoo/mcp-memory-service/actions/workflows/ci.yml)
  15. [![GitHub stars](https://img.shields.io/github/stars/doobidoo/mcp-memory-service?logo=github&label=stars)](https://github.com/doobidoo/mcp-memory-service)
  16. [![Contributors](https://img.shields.io/github/contributors/doobidoo/mcp-memory-service)](https://github.com/doobidoo/mcp-memory-service/graphs/contributors)
  17. [![Remote MCP](https://img.shields.io/badge/MCP-Remote%20Support-blue?logo=anthropic)](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/remote-mcp-setup.md)
  18. [![OAuth 2.0](https://img.shields.io/badge/Auth-OAuth%202.0%20%2B%20DCR-green)](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/oauth-setup.md)
  19. [![Ask DeepWiki](https://img.shields.io/badge/DeepWiki-Ask-0969da)](https://deepwiki.com/doobidoo/mcp-memory-service)
  20. [![Glama score](https://glama.ai/mcp/servers/doobidoo/mcp-memory-service/badges/score.svg)](https://glama.ai/mcp/servers/doobidoo/mcp-memory-service)
  21. Getting started: [English](https://mcpmemory.services/) · [Deutsch](https://mcpmemory.services/de/) · [Español](https://mcpmemory.services/es/) · [日本語](https://mcpmemory.services/ja/) · [简体中文](https://mcpmemory.services/zh-cn/) · [繁體中文](https://mcpmemory.services/zh-tw/) · [Français](https://mcpmemory.services/fr/) · [Português (Brasil)](https://mcpmemory.services/pt-br/) · [한국어](https://mcpmemory.services/ko/)
  22. ---
  23. <div align="center">
  24. <video src="https://mcpmemory.services/assets/videos/knowledge-graph-3d.mp4" poster="https://mcpmemory.services/assets/images/knowledge-graph-3d-poster.png" width="820" autoplay loop muted playsinline controls>
  25. <a href="https://mcpmemory.services/"><img src="https://mcpmemory.services/assets/images/knowledge-graph-3d.png" alt="3D knowledge graph — memories as a glowing, interactive galaxy" width="820"></a>
  26. </video>
  27. <p><em>▶ <a href="https://mcpmemory.services/">The 3D knowledge graph in motion</a></em> — every memory a glowing node, every relationship a curved edge.</p>
  28. </div>
  29. ---
  30. ## Why Agents Need This
  31. Your AI assistant forgets everything when you start a new chat. You spend 10 minutes re-explaining your architecture. **Again.** MCP Memory Service captures project context, architecture decisions, and code patterns automatically — new sessions start with everything already known.
  32. | Without mcp-memory-service | With mcp-memory-service |
  33. |---|---|
  34. | Each agent run starts from zero | Agents retrieve prior decisions in 5ms |
  35. | Memory is local to one graph/run | Memory is shared across all agents and runs |
  36. | You manage Redis + Pinecone + glue code | One self-hosted service, zero cloud cost |
  37. | No causal relationships between facts | Knowledge graph with typed edges (causes, fixes, contradicts) |
  38. | Context window limits create amnesia | Autonomous consolidation compresses old memories |
  39. **Key capabilities for agent pipelines:**
  40. - **Framework-agnostic REST API** — no MCP client library needed; the live endpoint list is at `/api/docs`
  41. - **Knowledge graph** — agents share causal chains, not just facts
  42. - **`X-Agent-ID` header** — auto-tag memories by agent identity for scoped retrieval
  43. - **`conversation_id`** — bypass deduplication for incremental conversation storage
  44. - **SSE events** — real-time notifications when any agent stores or deletes a memory
  45. - **Embeddings run locally via ONNX** — memory never leaves your infrastructure
  46. ---
  47. ## 🚀 Get Started in 60 Seconds
  48. > Not sure which setup fits? The **[Setup Guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/setup-guide.md)** walks you to the right path in under a minute.
  49. **1. Install:**
  50. ```bash
  51. pip install "mcp-memory-service[sqlite]"
  52. ```
  53. The `[sqlite]` extra brings the local ONNX embedding model. Without it, semantic
  54. search falls back to hash embeddings.
  55. <details>
  56. <summary><strong>Using uv instead of pip</strong></summary>
  57. Install the `memory` command into its own environment:
  58. ```bash
  59. uv tool install "mcp-memory-service[sqlite]"
  60. ```
  61. Or skip the install and let your client start the server through `uvx`:
  62. ```json
  63. {
  64. "mcpServers": {
  65. "memory": {
  66. "command": "uvx",
  67. "args": ["--from", "mcp-memory-service[sqlite]", "memory", "server"]
  68. }
  69. }
  70. }
  71. ```
  72. </details>
  73. **2. Configure your AI client:**
  74. <details open>
  75. <summary><strong>Claude Desktop</strong></summary>
  76. Add to your config file:
  77. - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
  78. - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
  79. - **Linux**: `~/.config/Claude/claude_desktop_config.json`
  80. ```json
  81. {
  82. "mcpServers": {
  83. "memory": {
  84. "command": "memory",
  85. "args": ["server"]
  86. }
  87. }
  88. }
  89. ```
  90. Restart Claude Desktop. Your AI now remembers everything across sessions.
  91. </details>
  92. <details>
  93. <summary><strong>Claude Code</strong></summary>
  94. ```bash
  95. claude mcp add memory -- memory server
  96. ```
  97. Restart Claude Code. Memory tools will appear automatically.
  98. </details>
  99. <details>
  100. <summary><strong>Agent pipelines (REST API — LangGraph, CrewAI, AutoGen, any HTTP client)</strong></summary>
  101. ```bash
  102. MCP_ALLOW_ANONYMOUS_ACCESS=true memory server --http
  103. # REST API running at http://localhost:8000
  104. ```
  105. Store a memory with `POST /api/memories`, search with `POST /api/search`, retrieve by tag
  106. with `POST /api/search/by-tag`. Send `X-Agent-ID: <id>` on a store request and the server
  107. tags the memory `agent:<id>`, which a tag search then scopes retrieval by.
  108. Worked examples per framework, the tag conventions and the async patterns:
  109. **[docs/agents/](https://github.com/doobidoo/mcp-memory-service/tree/main/docs/agents)**
  110. </details>
  111. <details>
  112. <summary><strong>OpenCode</strong></summary>
  113. ```bash
  114. MCP_ALLOW_ANONYMOUS_ACCESS=true memory server --http
  115. ```
  116. The plugin ships as repository files for the local plugin directory, so clone the
  117. repository once even if you installed from PyPI. Install steps, the `/memory` slash
  118. command and the endpoint override:
  119. **[opencode/README.md](https://github.com/doobidoo/mcp-memory-service/blob/main/opencode/README.md)**
  120. </details>
  121. <details>
  122. <summary><strong>Codex (automatic memory hooks)</strong></summary>
  123. Start the Memory Service HTTP API, then install the hooks from this repository:
  124. ```bash
  125. python3 codex/install_hooks.py
  126. ```
  127. Restart Codex and review the hooks with `/hooks`. They retrieve project context,
  128. capture new learnings, and checkpoint outcomes before compaction and at session end.
  129. See [Codex hook setup](codex/README.md) for prerequisites, authentication, and project-local installation.
  130. </details>
  131. <details>
  132. <summary><strong>claude.ai and ChatGPT (browser — Remote MCP)</strong></summary>
  133. Remote MCP puts persistent memory in the browser on any device, no desktop app required:
  134. OAuth 2.0 over HTTPS, self-hosted or cloud-hosted. Both claude.ai and ChatGPT
  135. (Developer Mode) connect to the same endpoint.
  136. Cloudflare Tunnel quick start, Let's Encrypt, nginx, Caddy and Docker production setups:
  137. **[Remote MCP Setup](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/remote-mcp-setup.md)** ·
  138. [5-minute tutorial](https://mcpmemory.services/blog/remote-mcp-tutorial.html)
  139. </details>
  140. <details>
  141. <summary><strong>Advanced: custom backends and team setup</strong></summary>
  142. ```bash
  143. git clone https://github.com/doobidoo/mcp-memory-service.git
  144. cd mcp-memory-service
  145. python scripts/installation/install.py
  146. ```
  147. Choose from **SQLite** (local, fast, single-user), **Cloudflare** (cloud, multi-device
  148. sync), **Hybrid** (5ms local reads with background cloud sync — recommended for
  149. production) or **Milvus** (dedicated vector DB: Lite file, self-hosted, or Zilliz Cloud).
  150. For self-hosted team setups, the Hybrid backend can sync to another **HTTP MCP Memory Service**
  151. instead of Cloudflare using `MCP_HYBRID_SECONDARY_BACKEND=http`.
  152. For long-lived services, prefer Docker Milvus or Zilliz Cloud over Milvus Lite —
  153. [why](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/milvus-backend.md#which-uri-to-use).
  154. </details>
  155. ---
  156. ## ⚡ Works With Your Favorite AI Tools
  157. - **Agent frameworks (REST):** LangGraph · CrewAI · AutoGen · OpenClaw/Nanobot · any HTTP client
  158. - **CLI and terminal (MCP):** Claude Code · Gemini CLI · OpenCode · Codex CLI · Goose · Aider · Amp
  159. - **Desktop and IDE (MCP):** Claude Desktop · VS Code · Cursor · Windsurf · Raycast · JetBrains · Zed
  160. - **Chat (MCP):** ChatGPT (Developer Mode) · claude.ai (Remote MCP over HTTPS)
  161. Full list, plus clients without OAuth such as Home Assistant:
  162. **[docs/integrations.md](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/integrations.md)**
  163. ---
  164. ## ✨ Features
  165. ### Store and retrieve context
  166. - 🧠 **Persistent memory** — Keep decisions, notes, and project context across sessions and agents.
  167. - 🔍 **Semantic and keyword search** — Combine vector search with BM25; use `mode="ranked"`
  168. to weigh recency, access frequency, and quality. An optional fallback cascade tries
  169. exact and tag matching when semantic results are sparse.
  170. - 🏷️ **Scoped retrieval** — Filter by tags with AND/OR matching, natural-language time
  171. ranges, and store partitions (`default`, `docs`, or `all` for cross-store search).
  172. - 📝 **Optional search summaries** — Request `summarize=true` for query-aware summaries
  173. with validated source references. Requires `MCP_SEARCH_SUMMARIZE_ENABLED=true`
  174. and a configured LLM provider; unavailable summaries fall back to raw results.
  175. [Search API and examples](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/mastery/api-reference.md)
  176. - 📄 **Document ingestion** — Import PDF, text, and Markdown with chunking for retrieval.
  177. Additional formats such as DOCX and PPTX require optional parsing tools.
  178. [Document ingestion guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/document-ingestion.md)
  179. ### Capture and maintain knowledge
  180. - ⚡ **Automatic session capture** — Configurable Claude Code hooks retrieve context and
  181. save session learnings; the local `memory_harvest` tool extracts decisions, bugs,
  182. conventions, and lessons from transcripts.
  183. [Hooks setup](https://github.com/doobidoo/mcp-memory-service/blob/main/claude-hooks/README.md) ·
  184. [Harvest configuration](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/mastery/configuration-guide.md)
  185. - 💡 **Autonomous consolidation** — Schedule clustering, compression, association discovery,
  186. and controlled forgetting. Insight cards surface patterns, trends, and knowledge gaps.
  187. [Consolidation guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/guides/memory-consolidation-guide.md)
  188. - 💭 **Beliefs and contradiction handling** — Derive confidence-scored beliefs from
  189. observations. Heuristic contradiction detection can mark older memories as superseded,
  190. hiding them from default retrieval while retaining them for explicit lookup.
  191. - 🤖 **Agent bootstrap profiles** — `memory_bootstrap_profile` assembles behavioral context
  192. for a new agent within a token budget, with optional task-aware retrieval.
  193. Requires `MCP_BOOTSTRAP_ENABLED=true`; profiles are not isolated by project.
  194. - 🧬 **Knowledge graph and entities** — Explore typed causal relationships in the interactive
  195. graph. 🔗 Entity extraction links @mentions, #tags, URLs, and file paths to a queryable entity graph.
  196. [Knowledge graph guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/features/knowledge-graph-dashboard.md)
  197. - 🏠 **Quality scoring** — Use your own OpenAI-compatible endpoint, including Ollama,
  198. LiteLLM, or vLLM.
  199. [Configuration guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/mastery/configuration-guide.md)
  200. ### Run locally and share across devices
  201. - 🔒 **Local-first storage** — Local ONNX embeddings and SQLite storage keep core memory
  202. operations on your infrastructure. Optional LLM features use the providers you configure.
  203. - ☁️ **Cloud or self-hosted sync** — Use Cloudflare or another MCP Memory Service instance
  204. as a Hybrid secondary. Separately enabled delta-sync exchanges changes between hosts;
  205. it is off by default.
  206. [Self-hosted sync guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/guides/self-hosted-sync-hub.md)
  207. - 📦 **Import, export, and migration** — Move memories through JSON import/export, including
  208. conversion of mem0 exports.
  209. [Import/export tools](https://github.com/doobidoo/mcp-memory-service/blob/main/scripts/sync/README.md) ·
  210. [mem0 migration guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/guides/mem0-import.md)
  211. - 💾 **Database backups** — Configure scheduled backups or trigger one manually through
  212. the HTTP API. Inspect backup status and available snapshots through the backup endpoints
  213. in the live API reference at `/api/docs`.
  214. - 📊 **Web dashboard** — Search, browse, visualize, and manage memories at `http://localhost:8000`.
  215. The dashboard has eight tabs — Dashboard, Search, Browse, Documents, Manage, Analytics,
  216. Quality, API Docs. [Two-minute walkthrough on YouTube](https://youtu.be/W34r8VFoSdQ) ·
  217. [Web Dashboard Guide](https://github.com/doobidoo/mcp-memory-service/wiki/Web-Dashboard-Guide)
  218. How it compares to Mem0, Zep and the MCP-native alternatives, benchmark results, and
  219. deployments people run in production: **[mcpmemory.services](https://mcpmemory.services)**
  220. ---
  221. ## 🛠️ Configuration Highlights
  222. ```bash
  223. memory launch # Start HTTP server in background (127.0.0.1:8000)
  224. memory launch --port 8192 # Custom port
  225. memory info # Status and health
  226. memory logs --lines 50 # Recent logs
  227. memory stop # Stop server
  228. ```
  229. These commands are optimized for fast startup and avoid loading heavy ML dependencies
  230. unless needed.
  231. > ⚠️ **Security note:** the server binds to `127.0.0.1` (localhost only) by default.
  232. > `--host 0.0.0.0` / `MCP_HTTP_HOST=0.0.0.0` exposes the API to your network — do that
  233. > only in trusted environments with authentication and firewall rules, or behind TLS
  234. > termination or a VPN overlay.
  235. Backends, embedding models, quality scoring and every environment variable:
  236. **[Configuration Guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/mastery/configuration-guide.md)**
  237. ---
  238. ## 📚 Documentation
  239. - **[Setup Guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/setup-guide.md)** – Decision tree and step-by-step paths
  240. - **[Agent Integration Guides](https://github.com/doobidoo/mcp-memory-service/tree/main/docs/agents)** – LangGraph, CrewAI, AutoGen, HTTP generic
  241. - **[Remote MCP Setup](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/remote-mcp-setup.md)** – claude.ai and ChatGPT via HTTPS + OAuth
  242. - **[Configuration Guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/mastery/configuration-guide.md)** – Backend options and customization
  243. - **[Architecture Overview](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/architecture.md)** – How it works under the hood
  244. - **[Knowledge Graph Dashboard](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/features/knowledge-graph-dashboard.md)** – Interactive graph visualization
  245. - **[Benchmarks](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/BENCHMARKS.md)** – LongMemEval, DevBench, LoCoMo, xerj agent-memory, with run commands
  246. - **[Migration Guide](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/MIGRATION.md)** – Upgrading between major versions
  247. - **[Troubleshooting](https://github.com/doobidoo/mcp-memory-service/tree/main/docs/troubleshooting)** – Common issues and solutions
  248. - **[Wiki](https://github.com/doobidoo/mcp-memory-service/wiki)** – Long-form guides and API reference
  249. - **[Full documentation index](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/README.md)** – Everything else
  250. Also listed on [Glama](https://glama.ai/mcp/servers/doobidoo/mcp-memory-service) and
  251. [Spark](https://spark.entire.vc/mcps/vb-mcp-memory-service).
  252. ---
  253. ## 📦 Releases
  254. Every release, with upgrade notes:
  255. [CHANGELOG.md](https://github.com/doobidoo/mcp-memory-service/blob/main/CHANGELOG.md) ·
  256. [GitHub Releases](https://github.com/doobidoo/mcp-memory-service/releases) ·
  257. [archived history](https://github.com/doobidoo/mcp-memory-service/blob/main/docs/archive/CHANGELOG-HISTORIC.md)
  258. ---
  259. ## 🤝 Contributing
  260. We welcome contributions! See [CONTRIBUTING.md](https://github.com/doobidoo/mcp-memory-service/blob/main/CONTRIBUTING.md) for guidelines
  261. and [SECURITY.md](https://github.com/doobidoo/mcp-memory-service/blob/main/SECURITY.md) for reporting a vulnerability.
  262. Releases, good first issues and new Discussions are announced on our
  263. [Discord server](https://discord.gg/zrsNMEzmCj), which is also the place for informal chat.
  264. Claiming an issue, decisions and reviews stay on GitHub.
  265. Who authors this project, who holds copyright, and what every change passes before
  266. it reaches `main`: [AUTHORSHIP.md](https://github.com/doobidoo/mcp-memory-service/blob/main/AUTHORSHIP.md).
  267. **Quick Development Setup:**
  268. ```bash
  269. git clone https://github.com/doobidoo/mcp-memory-service.git
  270. cd mcp-memory-service
  271. pip install -e . # Editable install
  272. pytest tests/ # Run test suite
  273. ```
  274. ---
  275. ## Supporting the Project
  276. MCP Memory Service is maintained by one person. If it saves you or your company time,
  277. you can support its development via Ko-fi, Buy Me a Coffee or PayPal:
  278. [SPONSORS.md](https://github.com/doobidoo/mcp-memory-service/blob/main/SPONSORS.md).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.