/ Directory / Playground / mcp-memory-service
● Community doobidoo ⚡ Instant

mcp-memory-service

by doobidoo · doobidoo/mcp-memory-service

Persistent long-term memory for your AI with semantic search, tags, 5ms retrieval, and cloud sync — SQLite local, Cloudflare for multi-device.

doobidoo/mcp-memory-service is a Python MCP that stores semantic memories for agents. Default SQLite-vec backend is fast (5ms), a Cloudflare backend syncs across devices, and a hybrid mode writes locally first and replicates async. Includes a REST API, web dashboard, and OAuth 2.0 for remote access.

Why use it

Key features

Live Demo

What it looks like in practice

memory-service.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "memory-service": {
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "memory-service",
      "command": "uvx",
      "args": [
        "mcp-memory-service"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "memory-service": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp-memory-service"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add memory-service -- uvx mcp-memory-service

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use mcp-memory-service

How to give Claude stable memory of your preferences and context

👤 Daily power users tired of re-explaining themselves ⏱ ~10 min beginner

When to use: Every new chat starts from scratch and you want continuity.

Prerequisites
  • uvx installed — brew install uv
Flow
  1. Seed preferences
    memory_store: 'I work on iOS + Swift projects. Prefer MVVM with @Observable. Always comment in English.' with tags [preference, coding].✓ Copied
    → Stored confirmation
  2. In a future session, retrieve
    memory_search: 'my coding style preferences'.✓ Copied
    → Preferences returned, agent applies them
  3. Decay cleanup
    Show me memories older than 90 days with no recent hits — offer to prune.✓ Copied
    → Stale list for review

Outcome: Claude behaves like it remembers you.

Pitfalls
  • Storing sensitive PII that becomes retrievable forever — Don't — treat memory like a public notebook. Use tags to compartmentalize.

How to share a memory pool across a team via Cloudflare backend

👤 Teams running shared AI workflows ⏱ ~30 min advanced

When to use: You want every engineer's chat to remember the same architectural decisions.

Prerequisites
  • Cloudflare account with Workers KV or D1 — cloudflare.com, set up as per the Cloudflare backend docs
Flow
  1. Switch backend
    Configure MCP_MEMORY_BACKEND=cloudflare with CF creds in env.✓ Copied
    → Memory endpoints point to CF
  2. Seed team-shared memory
    memory_store: 'Our auth lives in services/auth. Always rotate JWT keys via the rotate-keys Make target.' with tag 'team-arch'.✓ Copied
    → Stored
  3. Verify from a second machine
    memory_search 'auth service' — should return the same entry.✓ Copied
    → Cross-device hit

Outcome: Shared institutional memory that survives team turnover.

Pitfalls
  • Sensitive data in shared memory leaks cross-team — Run separate backends per team; don't store secrets

How to auto-harvest learnings at the end of a coding session

👤 Solo devs using agents heavily ⏱ ~5 min beginner

When to use: At the end of a pair-programming chat, before closing.

Flow
  1. Run the harvester
    memory_harvest on this conversation — extract durable facts (API keys patterns, project decisions, known gotchas). Ignore chit-chat.✓ Copied
    → Structured list of candidate memories
  2. Approve + save
    Save items 1, 3, 5 as memories with tag 'project-x'. Drop the rest.✓ Copied
    → Count saved

Outcome: Low-friction capture of what you learned, nothing more.

Combinations

Pair with other MCPs for X10 leverage

memory-service + contextplus

Use Context+ for live repo state, memory-service for durable cross-session facts

Save this architectural decision to memory-service and link it to the relevant files via Context+ memory graph.✓ Copied
memory-service + github

After each merged PR, harvest learnings into memory

Summarize the last 10 merged PRs in org/repo, extract repeat mistakes, and store them as memories with tag 'code-review-lessons'.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
memory_store content: str, tags?: str[] Save a durable fact 1 embedding
memory_search query: str, tags?: str[], limit?: int Retrieve relevant memories 1 vector search (local)
memory_harvest transcript: str End-of-session capture 1 LLM call
memory_store_session session_id, messages Ingest a whole chat N embeddings

Cost & Limits

What this costs to run

API quota
SQLite-vec: unlimited local. ChromaDB: local. Cloudflare: Workers/KV/D1 free tier is generous.
Tokens per call
Store: ~100 tokens for content. Search: ~50 tokens per result.
Monetary
Free (open source). Cloudflare backend: free tier usually enough.
Tip
Start with SQLite-vec. Switch to hybrid only when you need multi-device sync.

Security

Permissions, secrets, blast radius

Minimum scopes: Local filesystem for SQLite mode Cloudflare API token for CF mode
Credential storage: CF creds via env vars
Data egress: Local (SQLite) or your Cloudflare account (CF)
Never grant: Don't let untrusted prompts call memory_store — poisoning attacks

Troubleshooting

Common errors and fixes

ModuleNotFoundError: sqlite_vec

pip/uv install with the sqlite-vec extra: uvx 'mcp-memory-service[sqlite]'

Verify: python -c 'import sqlite_vec'
Cloudflare backend 403

Token lacks Workers/KV permissions. Create a new CF API token with the specific scopes.

Memories returned aren't relevant

Re-embed with a better model — defaults to local MiniLM; upgrade to nomic-embed via env var.

memory_harvest outputs duplicates

Enable the dedup config; harvester will skip items with cosine similarity > 0.95 to existing.

Alternatives

mcp-memory-service vs others

AlternativeWhen to use it insteadTradeoff
mem0You want a hosted memory SaaSPaid beyond free tier; vendor-locked
contextplus memory graphYou want memory tightly integrated with code understandingScoped to a repo, not general-purpose

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills