Skip to content
Henry edited this page Jun 10, 2026 · 35 revisions

MCP Memory Service

Persistent semantic memory for AI agents and coding assistants.

MCP Memory Service is a production-ready memory layer accessible via MCP protocol, REST API, and HTTP transport. Store, retrieve, and consolidate memories with local vector search — no cloud lock-in required.

v11.7.0 · ~2,780 tests · Codeberg · PyPI · Apache-2.0 License

📰 In the media: Agents Overdrawn at the Memory Bank — Heavybit's Humans in the Loop interviews maintainer Heinrich Krupp on agent amnesia and why persistent memory is the missing infrastructure layer.

💬 "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


Quick Start

# Install
pip install mcp-memory-service

# Start HTTP server (dashboard + REST API)
memory launch

# Or start MCP server (for Claude Desktop / IDE integrations)
memory server

Dashboard: http://127.0.0.1:8000

Detailed setup: Installation Guide · Platform Setup


What It Does

Capability Details
Semantic search Local ONNX embeddings (all-MiniLM-L6-v2), no API key needed
MCP + REST 28 unified MCP tools · full REST API · SSE real-time updates
Multiple backends SQLite-vec (local) · Hybrid (local + Cloudflare sync) · Milvus · Cloudflare
Memory lifecycle Store → consolidate → quality-score → forget (dream-inspired)
Graph relations Associate memories, infer relationship types, query subgraphs
Plugin system Lifecycle hooks: on_store, on_retrieve, on_delete, on_consolidate
14+ integrations Claude Desktop · Claude Code · OpenCode · LangGraph · CrewAI · AutoGen · VS Code · Cursor · and more
OAuth 2.1 Dynamic Client Registration (RFC 7591) · PKCE · team collaboration

Connect to Your Client

Claude Desktop

Add to ~/.claude/config.json:

{
  "mcpServers": {
    "memory": {
      "command": "python",
      "args": ["-m", "mcp_memory_service.server"],
      "env": { "MCP_MEMORY_STORAGE_BACKEND": "hybrid" }
    }
  }
}

Claude Code / OpenCode

# HTTP transport (recommended for team use)
memory launch

# OpenCode: /memory slash command available natively in v10.65.0+

Integration Guide · Claude.ai Remote MCP

REST API

# Store
curl -X POST http://127.0.0.1:8000/api/memory/store \
  -H "Content-Type: application/json" \
  -d '{"content": "JWT tokens expire after 24h", "tags": ["auth"]}'

# Search
curl "http://127.0.0.1:8000/api/memory/retrieve?query=authentication+tokens"

Storage Backends

Backend Best For Read Speed
SQLite-vec Local / single-user ~5ms
Hybrid Production (local reads + Cloudflare sync) ~5ms
Cloudflare Cloud-only / edge deployment network
Milvus Large-scale / distributed ~5ms
# Set backend
export MCP_MEMORY_STORAGE_BACKEND=hybrid
memory launch

Advanced Configuration · Hybrid Setup


Documentation

Core Guides

Guide Description
Installation Guide All platforms, all backends
Platform Setup Windows, macOS, Linux
Integration Guide Claude Desktop, Claude Code, VS Code, 14+ clients
Claude.ai Remote MCP HTTPS + OAuth for remote access
Web Dashboard Guide Search, analytics, bulk operations
Advanced Configuration Env vars, WAL mode, concurrent access
OAuth 2.1 Setup Dynamic registration, PKCE, team auth

Features & Subsystems

Guide Description
Token-Efficient Retrieval Bounding oversized search responses, and the memory_explore → memory_detail knowledge map
Memory Quality System ONNX local scoring, Groq/Gemini tiers
Memory Consolidation Dream-inspired decay, compression, forgetting
Graph Database Architecture Associations, relationship inference, subgraph queries
Memory Hooks Plugin lifecycle hooks
ONNX Quality Evaluation Local ML ranking without cloud calls
Dashboard UI Guide Web interface walkthrough

Reference

Resource Description
Troubleshooting Common issues, backend diagnostics, lock errors
FAQ Frequently asked questions
Examples Code examples and workflows
Development Reference API reference, hooks, debugging
Performance Optimization Query tuning, caching, scaling
Development Roadmap Upcoming features and milestones

All Wiki Pages

Setup & Backends

Features

Community & Governance


Architecture

┌─────────────────────────┐    ┌──────────────────────────┐    ┌─────────────────┐
│       AI Clients        │    │   MCP Memory Service     │    │ Storage Backend │
│                         │    │         v11.7.0          │    │                 │
│ • Claude Desktop        │◄──►│ • 28 MCP tools           │◄──►│ • Hybrid ⭐     │
│ • Claude Code           │    │ • REST API (port 8000)   │    │   (5ms + sync)  │
│ • OpenCode              │    │ • OAuth 2.1              │    │ • SQLite-vec    │
│ • LangGraph / CrewAI    │    │ • Plugin hooks           │    │ • Cloudflare    │
│ • VS Code / Cursor      │    │ • Memory consolidation   │    │ • Milvus        │
│ • 14+ AI apps           │    │ • Quality scoring (ONNX) │    │                 │
│ • Web Dashboard         │    │ • Graph relations        │    │ WAL mode ✅     │
└─────────────────────────┘    └──────────────────────────┘    └─────────────────┘

What's New

v10.65.1 (2026-05-24)

  • Fix placeholder guard in _prompt_learning_session (issue #998)
  • Audit-log plugin privacy-safe by default (MCP_PLUGIN_AUDIT_LOG_PRIVACY_MODE=safe)

v10.65.0

  • OpenCode plugin: /memory slash command — /memory search <query>, /memory health
  • TUI sidebar widget with live status bridge
  • Session-summary upsert dedup fix

v10.64.x

  • API consolidation stability: 34 tools → 12 with full backward compatibility
  • Hook system and plugin lifecycle improvements

v10.47.x

  • Consolidation schedule defaults changed to disabled — must now set MCP_SCHEDULE_* explicitly
  • Docker slim/quality-cpu dependency fixes

Full history: CHANGELOG ↗


Getting Help

Clone this wiki locally