Skip to content

Summary

Self-hosted, open-source persistent memory for AI agents over MCP and REST: semantic plus keyword search with local ONNX embeddings, a shared knowledge graph, consolidation, and SQLite, Cloudflare or Milvus backends.

Features

  • Persistent memory shared across sessions, agents and MCP clients
  • Semantic plus BM25 keyword search with tag, time-range and partition filters
  • Local ONNX embeddings; SQLite, Cloudflare, hybrid or Milvus backends
  • Knowledge graph with typed edges and scheduled memory consolidation
  • REST API for LangGraph, CrewAI and AutoGen, plus dashboard and CLI
  • Self-hosted remote MCP with OAuth 2.0 for claude.ai and ChatGPT

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "MCP Memory Service" tools will be available.
{
  "mcpServers": {
    "mcp-memory-service": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-memory-service[sqlite]",
        "memory",
        "server"
      ]
    }
  }
}

Description

MCP Memory Service is an Apache-2.0 memory backend for AI assistants and agent pipelines. It gives Claude Desktop, Claude Code, Cursor, Codex, OpenCode and other MCP clients a long-term memory that survives new sessions, and exposes the same store over a REST API so LangGraph, CrewAI, AutoGen or any HTTP client can share it.

Agents store decisions, notes and project context and get them back with semantic search combined with BM25 keyword matching, optionally ranked by recency, access frequency and quality, and filtered by tags, natural-language time ranges or store partitions. Embeddings are computed locally with an ONNX model, so memories do not leave your machine unless you choose a cloud backend. Memories can be linked in a knowledge graph with typed edges such as causes, fixes or contradicts, and a scheduled consolidation process clusters, compresses and gradually forgets old entries. It also ingests PDF, text and Markdown documents, can summarise search results when an LLM provider is configured, and ships Claude Code and Codex hooks that load context at the start of a session and save what was learned at the end. A web dashboard, a CLI and server-sent events for memory changes round it out.

It installs from PyPI (pip install "mcp-memory-service[sqlite]", or uvx) and starts with memory server; add --http for the REST API. Storage is SQLite by default, with Cloudflare, a hybrid local-plus-cloud mode and Milvus or Zilliz Cloud for larger setups. For claude.ai and ChatGPT it can run as a self-hosted remote MCP server behind HTTPS with OAuth 2.0 and dynamic client registration; there is no hosted service, you run it yourself.

Self-hosted documentation retrieval for coding agents — index any library's docs from the web, GitHub, npm, PyPI or local files and query them by exact version. An open-source Context7 alternative.

MCP: OKF Agent Memory

by okf-memory

Git-native persistent memory for coding agents — sub-300µs BM25 search over version-controlled plain text, with no embeddings, no database and no API costs.

MCP: Memory

by Model Context Protocol

A knowledge-graph-based persistent memory system that lets an agent remember entities and relations across sessions.

MCP: Engram

by Gentleman Programming

Featured

Persistent memory for coding agents as a single Go binary — SQLite and FTS5 behind MCP, an HTTP API, a CLI and a TUI, with no Node, Python or Docker required.

Browse all MCP servers →