-
-
Notifications
You must be signed in to change notification settings - Fork 289
Home
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
# Install
pip install mcp-memory-service
# Start HTTP server (dashboard + REST API)
memory launch
# Or start MCP server (for Claude Desktop / IDE integrations)
memory serverDashboard: http://127.0.0.1:8000
Detailed setup: Installation Guide · Platform Setup
| 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 |
Add to ~/.claude/config.json:
{
"mcpServers": {
"memory": {
"command": "python",
"args": ["-m", "mcp_memory_service.server"],
"env": { "MCP_MEMORY_STORAGE_BACKEND": "hybrid" }
}
}
}# HTTP transport (recommended for team use)
memory launch
# OpenCode: /memory slash command available natively in v10.65.0+→ Integration Guide · Claude.ai Remote MCP
# 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"| 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
| 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 |
| 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 |
| 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 |
Setup & Backends
- Hybrid Setup Configuration
- Cloudflare Backup Sync
- Backend Synchronization Guide
- Windows Hybrid Setup
Features
- Complete Feature List
- Natural Memory Triggers
- Metadata Compression System
- Quality Hooks Integration
- Context Provider Workflow
- AppleScript Integration
- Screenshot Automation
Community & Governance
- Agent Integrations Guide
- Using Agents in Other Repos
- Contributor Promotion
- Issue Templates
- Pull Request Templates
- CONTRIBUTING ↗
┌─────────────────────────┐ ┌──────────────────────────┐ ┌─────────────────┐
│ 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 ✅ │
└─────────────────────────┘ └──────────────────────────┘ └─────────────────┘
- Fix placeholder guard in
_prompt_learning_session(issue #998) - Audit-log plugin privacy-safe by default (
MCP_PLUGIN_AUDIT_LOG_PRIVACY_MODE=safe)
-
OpenCode plugin:
/memoryslash command —/memory search <query>,/memory health - TUI sidebar widget with live status bridge
- Session-summary upsert dedup fix
- API consolidation stability: 34 tools → 12 with full backward compatibility
- Hook system and plugin lifecycle improvements
- Consolidation schedule defaults changed to
disabled— must now setMCP_SCHEDULE_*explicitly - Docker slim/quality-cpu dependency fixes
Full history: CHANGELOG ↗
- Bug? → Codeberg Issues
- Question? → Codeberg Issues (Codeberg has no separate Discussions feature)
- Not working? → Troubleshooting
- Contribute → CONTRIBUTING ↗ · Contributor Promotion