MCP Memory Service MCP server

Officialdoobidoo (Henry Krupp)2,111Config last verified Nov 10, 2026

Self-hosted Python memory server with hybrid vector and BM25 search, an entity graph, scheduled consolidation, and an OAuth-protected remote mode.

MCP Memory Service stores each memory as text with tags, a memory type and a content hash, embeds it locally with an ONNX model, and keeps it in SQLite with sqlite-vec by default. Cloudflare, a hybrid of local SQLite with background sync to Cloudflare or another instance, and Milvus are the other backends. Search mixes vector similarity with BM25, can rank by recency, access frequency and quality score, and filters by tags, natural-language time ranges and store partitions. On top of the store it extracts entities into a graph with typed associations, runs scheduled consolidation (clustering, compression, controlled forgetting), and marks older memories superseded when it detects a contradiction.

The server is the mcp-memory-service package on PyPI, started with memory server, and over stdio it exposes 28 tools: storing single memories or whole sessions, search and listing, updates and deletes, document ingestion, harvesting decisions and bugs from Claude Code transcripts, quality ratings, graph traversal, conflict resolution, mistake notes, quarantine review and bootstrap profiles for short-lived agents. With MCP_STREAMABLE_HTTP_MODE=1 the same install serves Streamable HTTP at /mcp with OAuth 2.0 and dynamic client registration for claude.ai and ChatGPT, and memory server --http runs a REST API and web dashboard on port 8000; over remote transports memory_ingest and memory_harvest are withheld because they read local files. Several agents can share one instance, each tagging its writes with an X-Agent-ID header. It is Apache 2.0, self-hosted, with no paid tier.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "mcp-memory-service": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-memory-service[sqlite]",
        "memory",
        "server"
      ],
      "env": {
        "MCP_MEMORY_STORAGE_BACKEND": "<MCP_MEMORY_STORAGE_BACKEND>",
        "MCP_MEMORY_SQLITE_PATH": "<MCP_MEMORY_SQLITE_PATH>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add mcp-memory-service -- uvx --from mcp-memory-service[sqlite] memory server

Available tools

ToolDescription
memory_storeStore a memory with optional tags and type; a conversation_id skips semantic deduplication for incremental saves.
memory_store_sessionStore a multi-turn conversation as a single memory unit.
memory_searchSearch memories in semantic, exact or time-based mode with tag, type and time filters.
memory_listBrowse memories with pagination, filtered by tag or memory type.
memory_deleteDelete memories by content hash, tags or time range, with a dry-run preview.
memory_cleanupFind and remove duplicate memories.
memory_healthCheck database health and return storage statistics.
memory_statsReturn the server's storage and service cache statistics.
memory_updateUpdate a memory's tags, type or metadata without re-storing its content.
memory_consolidateRun, schedule, pause, resume or check the status of memory consolidation.
memory_ingestIngest a PDF, text, Markdown or JSON file, or a whole directory, as chunked memories. Local stdio only.
memory_harvestExtract decisions, bugs, conventions and learnings from Claude Code session transcripts, dry-run by default. Local stdio only.
memory_qualityRate a memory, read its quality metrics, analyze the distribution, or run a maintenance cycle.
memory_graphTraverse memory associations: connected memories, shortest path, subgraph, entity extraction and listing.
memory_conflictsList unresolved conflicts between contradictory memories.
memory_resolveResolve a memory conflict by choosing the winning memory.
mistake_note_addRecord a mistake pattern with the wrong and correct action, counting repeats.
mistake_note_searchSemantic search over mistake notes before starting a task.
mistake_note_updateUpdate fields of an existing mistake note.
mistake_note_deleteDelete a mistake note by content hash.
get_quarantined_memoriesList memories quarantined for contradicting active beliefs.
unquarantine_memoryRelease a quarantined memory back into retrieval.
commit_session_legacyRecord an ephemeral agent's end-of-session decisions, errors and corrections as observations.
get_bootstrap_profileBuild a behavioral context profile for a new ephemeral agent within a token budget.
get_onboarding_guideReturn the integration guide for a client type such as Claude Code or Kiro.
memory_distillBatch-extract insights from existing memories with an LLM rewriter, dry-run by default.
memory_exploreReturn a knowledge map of entities with query-scoped chunks for each, without an LLM call.
memory_detailReturn the ranked chunks and related entities for one entity.

Required configuration

  • MCP_MEMORY_STORAGE_BACKENDOptional

    Storage backend: sqlite_vec (default), cloudflare, hybrid or milvus.

  • MCP_MEMORY_SQLITE_PATHOptional

    Path to the SQLite database for the sqlite_vec and hybrid backends.

What you can do with it

Keep Claude Code decisions across sessions

memory_harvest reads the session transcripts on disk and proposes decisions, bugs and conventions to store; the repo's Claude Code hooks then pull the relevant ones back into the next session.

One memory backend for an agent pipeline

LangGraph, CrewAI or AutoGen agents write over the REST API with an X-Agent-ID header, while Claude Desktop or Cursor reads the same store through MCP.

Memory in claude.ai or ChatGPT

Run the service behind HTTPS (the docs cover Cloudflare Tunnel, nginx and Caddy) and add it as a remote connector; OAuth with dynamic client registration handles sign-in.

FAQ

Is it free?
Yes. It is open source under Apache 2.0 and self-hosted. The only costs are your own infrastructure and any LLM or Cloudflare accounts you choose to configure for optional features.
Does it support remote or OAuth?
Yes, self-hosted. Set MCP_STREAMABLE_HTTP_MODE=1 and MCP_OAUTH_ENABLED=true and the server answers Streamable HTTP at /mcp with OAuth 2.0 and dynamic client registration, which claude.ai and ChatGPT developer mode use. There is no vendor-hosted endpoint; you run the server and put it behind HTTPS.
Can a team share it, and how does that compare to Glen?
Several agents and machines can point at one instance or sync through the hybrid backend, and writes can be tagged per agent. Glen captures agent sessions, Slack, GitHub, tickets, docs and calls into managed org memory without anyone running a server, and filters every recall to what the asking user is cleared to see.
Compare MCP Memory Service alternatives →← Browse all agent-memory servers