JUHE API Marketplace
doobidoo avatar
MCP Server

MCP Memory Service

Provides semantic memory and persistent storage for Claude, leveraging ChromaDB and sentence transformers for enhanced search and retrieval capabilities.

1489
GitHub Stars
3/10/2026
Last Updated
MCP Server Configuration
1{
2 "name": "memory",
3 "command": "memory",
4 "args": [
5 "server"
6 ]
7}
JSON7 lines
  1. Home
  2. MCP Servers
  3. mcp-memory-service

README Documentation

mcp-memory-service

Persistent Shared Memory for AI Agent Pipelines

Open-source memory backend for multi-agent systems. Agents store decisions, share causal knowledge graphs, and retrieve context in 5ms — without cloud lock-in or API costs.

Works with LangGraph · CrewAI · AutoGen · any HTTP client · Claude Desktop



🌐 Works with claude.ai (Browser)

Unlike desktop-only MCP servers, mcp-memory-service supports Remote MCP for native claude.ai integration.

What this means:

  • ✅ Use persistent memory directly in your browser (no Claude Desktop required)
  • ✅ Works on any device (laptop, tablet, phone)
  • ✅ Enterprise-ready (OAuth 2.0 + HTTPS + CORS)
  • ✅ Self-hosted OR cloud-hosted (your choice)

5-Minute Setup:

# 1. Start server with Remote MCP enabled
MCP_STREAMABLE_HTTP_MODE=1 \
MCP_SSE_HOST=0.0.0.0 \
MCP_SSE_PORT=8765 \
MCP_OAUTH_ENABLED=true \
python -m mcp_memory_service.server

# 2. Expose via Cloudflare Tunnel (or your own HTTPS setup)
cloudflared tunnel --url http://localhost:8765
# → Outputs: https://random-name.trycloudflare.com

# 3. In claude.ai: Settings → Connectors → Add Connector
# Paste the URL: https://random-name.trycloudflare.com/mcp
# OAuth flow will handle authentication automatically

Production Setup: See Remote MCP Setup Guide for Let's Encrypt, nginx, and firewall configuration. Step-by-Step Tutorial: Blog: 5-Minute claude.ai Setup | Wiki Guide


Why Agents Need This

Without mcp-memory-serviceWith mcp-memory-service
Each agent run starts from zeroAgents retrieve prior decisions in 5ms
Memory is local to one graph/runMemory is shared across all agents and runs
You manage Redis + Pinecone + glue codeOne self-hosted service, zero cloud cost
No causal relationships between factsKnowledge graph with typed edges (causes, fixes, contradicts)
Context window limits create amnesiaAutonomous consolidation compresses old memories

Key capabilities for agent pipelines:

  • Framework-agnostic REST API — 15 endpoints, no MCP client library needed
  • Knowledge graph — agents share causal chains, not just facts
  • X-Agent-ID header — auto-tag memories by agent identity for scoped retrieval
  • conversation_id — bypass deduplication for incremental conversation storage
  • SSE events — real-time notifications when any agent stores or deletes a memory
  • Embeddings run locally via ONNX — memory never leaves your infrastructure

Agent Quick Start

pip install mcp-memory-service
MCP_ALLOW_ANONYMOUS_ACCESS=true memory server --http
# REST API running at http://localhost:8000
import httpx

BASE_URL = "http://localhost:8000"

# Store — auto-tag with X-Agent-ID header
async with httpx.AsyncClient() as client:
    await client.post(f"{BASE_URL}/api/memories", json={
        "content": "API rate limit is 100 req/min",
        "tags": ["api", "limits"],
    }, headers={"X-Agent-ID": "researcher"})
    # Stored with tags: ["api", "limits", "agent:researcher"]

# Search — scope to a specific agent
    results = await client.post(f"{BASE_URL}/api/memories/search", json={
        "query": "API rate limits",
        "tags": ["agent:researcher"],
    })
    print(results.json()["memories"])

Framework-specific guides: docs/agents/

Comparison with Alternatives

Mem0ZepDIY Redis+Pineconemcp-memory-service
LicenseProprietaryEnterprise—Apache 2.0
CostPer-call APIEnterpriseInfra costs$0
🌐 claude.ai Browser❌ Desktop only❌ Desktop only❌✅ Remote MCP
OAuth 2.0 + DCR❓ Unknown❓ Unknown❌✅ Enterprise-ready
Streamable HTTP❌❌❌✅ (SSE deprecated)
Framework integrationSDKSDKManualREST API (any HTTP client)
Knowledge graphNoLimitedNoYes (typed edges)
Auto consolidationNoNoNoYes (decay + compression)
On-premise embeddingsNoNoManualYes (ONNX, local)
PrivacyCloudCloudPartial100% local
Hybrid searchNoYesManualYes (BM25 + vector)
MCP protocolNoNoNoYes
REST APIYesYesManualYes (15 endpoints)

Stop Re-Explaining Your Project to AI Every Session

MCP Memory Service

Your AI assistant forgets everything when you start a new chat. After 50 tool uses, context explodes to 500k+ tokens—Claude slows down, you restart, and now it remembers nothing. You spend 10 minutes re-explaining your architecture. Again.

MCP Memory Service solves this.

It automatically captures your project context, architecture decisions, and code patterns. When you start fresh sessions, your AI already knows everything—no re-explaining, no context loss, no wasted time.

🎥 2-Minute Video Demo

MCP Memory Service Demo

Technical showcase: Performance, Architecture, AI/ML Intelligence & Developer Experience

⚡ Works With Your Favorite AI Tools

🤖 Agent Frameworks (REST API)

LangGraph · CrewAI · AutoGen · Any HTTP Client · OpenClaw/Nanobot · Custom Pipelines

🖥️ CLI & Terminal AI (MCP)

Claude Code · Gemini CLI · Gemini Code Assist · OpenCode · Codex CLI · Goose · Aider · GitHub Copilot CLI · Amp · Continue · Zed · Cody

🎨 Desktop & IDE (MCP)

Claude Desktop · VS Code · Cursor · Windsurf · Kilo Code · Raycast · JetBrains · Replit · Sourcegraph · Qodo

💬 Chat Interfaces (MCP)

ChatGPT (Developer Mode) · claude.ai (Remote MCP via HTTPS)

Works seamlessly with any MCP-compatible client or HTTP client - whether you're building agent pipelines, coding in the terminal, IDE, or browser.

💡 NEW: ChatGPT now supports MCP! Enable Developer Mode to connect your memory service directly. See setup guide →


🚀 Get Started in 60 Seconds

1. Install:

pip install mcp-memory-service

2. Configure your AI client:

Claude Desktop

Add to your config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "memory": {
      "command": "memory",
      "args": ["server"]
    }
  }
}

Restart Claude Desktop. Your AI now remembers everything across sessions.

Claude Code
claude mcp add memory -- memory server

Restart Claude Code. Memory tools will appear automatically.

🌐 claude.ai (Browser — Remote MCP)

No local installation required on the client — works directly in your browser:

# 1. Start server with Remote MCP
MCP_STREAMABLE_HTTP_MODE=1 python -m mcp_memory_service.server

# 2. Expose publicly (Cloudflare Tunnel)
cloudflared tunnel --url http://localhost:8765

# 3. Add connector in claude.ai Settings → Connectors with the tunnel URL

See Remote MCP Setup Guide for production deployment with Let's Encrypt, nginx, and Docker.

🔧 Advanced: Custom Backends & Team Setup

For production deployments, team collaboration, or cloud sync:

git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service
python scripts/installation/install.py

Choose from:

  • SQLite (local, fast, single-user)
  • Cloudflare (cloud, multi-device sync)
  • Hybrid (best of both: 5ms local + background cloud sync)

💡 Why You Need This

The Problem

Session 1Session 2 (Fresh Start)
You: "We're building a Next.js app with Prisma and tRPC"AI: "What's your tech stack?" ❌
AI: "Got it, I see you're using App Router"You: Explains architecture again for 10 minutes 😤
You: "Add authentication with NextAuth"AI: "Should I use Pages Router or App Router?" ❌

The Solution

Session 1Session 2 (Fresh Start)
You: "We're building a Next.js app with Prisma and tRPC"AI: "I remember—Next.js App Router with Prisma and tRPC. What should we build?" ✅
AI: "Got it, I see you're using App Router"You: "Add OAuth login"
You: "Add authentication with NextAuth"AI: "I'll integrate NextAuth with your existing Prisma setup." ✅

Result: Zero re-explaining. Zero context loss. Just continuous, intelligent collaboration.


🌐 SHODH Ecosystem Compatibility

MCP Memory Service is fully compatible with the SHODH Unified Memory API Specification v1.0.0, enabling seamless interoperability across the SHODH ecosystem.

Compatible Implementations

ImplementationBackendEmbeddingsUse Case
shodh-memoryRocksDBMiniLM-L6-v2 (ONNX)Reference implementation
shodh-cloudflareCloudflare Workers + VectorizeWorkers AI (bge-small)Edge deployment, multi-device sync
mcp-memory-service (this)SQLite-vec / HybridMiniLM-L6-v2 (ONNX)Desktop AI assistants (MCP)

Unified Schema Support

All SHODH implementations share the same memory schema:

  • ✅ Emotional Metadata: emotion, emotional_valence, emotional_arousal
  • ✅ Episodic Memory: episode_id, sequence_number, preceding_memory_id
  • ✅ Source Tracking: source_type, credibility
  • ✅ Quality Scoring: quality_score, access_count, last_accessed_at

Interoperability Example: Export memories from mcp-memory-service → Import to shodh-cloudflare → Sync across devices → Full fidelity preservation of emotional_valence, episode_id, and all spec fields.


✨ Quick Start Features

🧠 Persistent Memory – Context survives across sessions with semantic search 🔍 Smart Retrieval – Finds relevant context automatically using AI embeddings ⚡ 5ms Speed – Instant context injection, no latency 🔄 Multi-Client – Works across 20+ AI applications ☁️ Cloud Sync – Optional Cloudflare backend for team collaboration 🔒 Privacy-First – Local-first, you control your data 📊 Web Dashboard – Visualize and manage memories at http://localhost:8000 🧬 Knowledge Graph – Interactive D3.js visualization of memory relationships 🆕

🖥️ Dashboard Preview (v9.3.0)

MCP Memory Dashboard Tour

8 Dashboard Tabs: Dashboard • Search • Browse • Documents • Manage • Analytics • Quality (NEW) • API Docs

📖 See Web Dashboard Guide for complete documentation.


Latest Release: v10.26.2 (March 8, 2026)

Patch release: OAuth public PKCE client fix + automated CHANGELOG housekeeping

What's New:

  • [#576] OAuth 500 fixed for public PKCE clients: claude.ai and other MCP clients using PKCE without client_secret now complete token exchange correctly. The endpoint detects public clients and uses the PKCE code_verifier as identity proof per OAuth 2.1 §2.1.
  • /.well-known/oauth-protected-resource endpoint added (RFC 9728): Previously returning 404, breaking OAuth discovery for compliant MCP clients.
  • Improved OAuth error logging: exc_info=True added to token/authorization exception handlers for full tracebacks in logs.
  • Automated CHANGELOG housekeeping: Monthly GitHub Actions workflow keeps CHANGELOG.md lean by archiving entries older than the 8 most recent versions. Supports --dry-run preview.

Previous Releases:

  • v10.26.1 - Hybrid backend correctly reported in MCP health checks (HealthCheckFactory structural detection fix for wrapped/delegated backends, issue #570)
  • v10.26.0 - Credentials tab + Settings restructure + Sync Owner selector in dashboard; MCP_HYBRID_SYNC_OWNER=http recommended for hybrid mode
  • v10.25.3 - Patch release: stdio handshake timeout cap, syntax fixes, hybrid sync fix, dashboard version badge fix
  • v10.25.2 - Patch fix: update_and_restart.sh health check reads status field instead of removed version field
  • v10.25.1 - Security: CORS wildcard default changed to localhost-only, soft-delete leak in search_by_tag_chronological() fixed (GHSA-g9rg-8vq5-mpwm)
  • v10.25.0 - Embedding migration script, 5 soft-delete leak fixes, cosine distance formula fix, substring tag matching fix, O(n²) association sampling fix — 23 new tests, 1,420 total
  • v10.24.0 - External embedding API silent fallback fixed: raises RuntimeError on API failure instead of mixing embedding spaces (#551) — 10 new tests, 1,397 total
  • v10.23.0 - Quality scorer fix, consolidator improvements, two new opt-out flags: fix asyncio NameError in ai_evaluator.py (#544), fix consolidator invalid memory_type and dedup bug (#545), MCP_TYPED_EDGES_ENABLED opt-out (#546), MCP_CONSOLIDATION_STORE_ASSOCIATIONS opt-out (#547) — 14 new tests

Full version history: CHANGELOG.md | Older versions (v10.22.0 and earlier) | All Releases


Migration to v9.0.0

⚡ TL;DR: No manual migration needed - upgrades happen automatically!

Breaking Changes:

  • Memory Type Ontology: Legacy types auto-migrate to new taxonomy (task→observation, note→observation)
  • Asymmetric Relationships: Directed edges only (no longer bidirectional)

Migration Process:

  1. Stop your MCP server
  2. Update to latest version (git pull or pip install --upgrade mcp-memory-service)
  3. Restart server - automatic migrations run on startup:
    • Database schema migrations (009, 010)
    • Memory type soft-validation (legacy types → observation)
    • No tag migration needed (backward compatible)

Safety: Migrations are idempotent and safe to re-run


Breaking Changes

1. Memory Type Ontology

What Changed:

  • Legacy memory types (task, note, standard) are deprecated
  • New formal taxonomy: 5 base types (observation, decision, learning, error, pattern) with 21 subtypes
  • Type validation now defaults to 'observation' for invalid types (soft validation)

Migration Process: ✅ Automatic - No manual action required!

When you restart the server with v9.0.0:

  • Invalid memory types are automatically soft-validated to 'observation'
  • Database schema updates run automatically
  • Existing memories continue to work without modification

New Memory Types:

  • observation: General observations, facts, and discoveries
  • decision: Decisions and planning
  • learning: Learnings and insights
  • error: Errors and failures
  • pattern: Patterns and trends

Backward Compatibility:

  • Existing memories will be auto-migrated (task→observation, note→observation, standard→observation)
  • Invalid types default to 'observation' (no errors thrown)
2. Asymmetric Relationships

What Changed:

  • Asymmetric relationships (causes, fixes, supports, follows) now store only directed edges
  • Symmetric relationships (related, contradicts) continue storing bidirectional edges
  • Database migration (010) removes incorrect reverse edges

Migration Required: No action needed - database migration runs automatically on startup.

Code Changes Required: If your code expects bidirectional storage for asymmetric relationships:

# OLD (will no longer work):
# Asymmetric relationships were stored bidirectionally
result = storage.find_connected(memory_id, relationship_type="causes")

# NEW (correct approach):
# Use direction parameter for asymmetric relationships
result = storage.find_connected(
    memory_id,
    relationship_type="causes",
    direction="both"  # Explicit direction required for asymmetric types
)

Relationship Types:

  • Asymmetric: causes, fixes, supports, follows (A→B ≠ B→A)
  • Symmetric: related, contradicts (A↔B)

Performance Improvements

  • ontology validation: 97.5x faster (module-level caching)
  • Type lookups: 35.9x faster (cached reverse maps)
  • Tag validation: 47.3% faster (eliminated double parsing)

Testing

  • 829/914 tests passing (90.7%)
  • 80 new ontology tests with 100% backward compatibility
  • All API/HTTP integration tests passing

Support

If you encounter issues during migration:

  • Check Troubleshooting Guide
  • Review CHANGELOG.md for detailed changes
  • Open an issue: https://github.com/doobidoo/mcp-memory-service/issues

📚 Documentation & Resources

  • Agent Integration Guides 🆕 – LangGraph, CrewAI, AutoGen, HTTP generic
  • Remote MCP Setup (claude.ai) 🆕 – Browser integration via HTTPS + OAuth
  • Installation Guide – Detailed setup instructions
  • Configuration Guide – Backend options and customization
  • Architecture Overview – How it works under the hood
  • Team Setup Guide – OAuth and cloud collaboration
  • Knowledge Graph Dashboard 🆕 – Interactive graph visualization guide
  • Troubleshooting – Common issues and solutions
  • API Reference – Programmatic usage
  • Wiki – Complete documentation
  • Ask DeepWiki – AI-powered documentation assistant
  • MCP Starter Kit – Build your own MCP server using the patterns from this project

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Quick Development Setup:

git clone https://github.com/doobidoo/mcp-memory-service.git
cd mcp-memory-service
pip install -e .  # Editable install
pytest tests/      # Run test suite

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.aiFeatured on ShowMeBestAI
Copyright © 2026 JUHEDATA HK LIMITED - All rights reserved