A2A MCP News
memory mcp logo
mcp-server4

memory mcp

Memory MCP is the official reference Model Context Protocol server providing a knowledge graph-based persistent memory system. It enables AI agents like Claude and Cursor to store, retrieve, and remember user preferences, project details, and conversation context across sessions.

Overview

Memory MCP is the official reference Model Context Protocol (MCP) server for persistent memory. It implements a lightweight knowledge graph that allows AI agents to store and retrieve structured information across conversations and sessions.

Developed as part of the official MCP servers repository by the Model Context Protocol team, it solves one of the biggest limitations of LLMs: statelessness. Instead of repeating context every time, agents can save facts, user preferences, project details, decisions, and observations — then recall them on demand.

It serves as the foundation for many community memory implementations and is directly supported in tools like Claude Desktop, Claude Code, Cursor, and other MCP clients.

Features

  • Knowledge Graph Storage: Entities with observations, relationships, and attributes stored persistently.
  • Add / Retrieve / Search Memories: Tools to create entities, add observations, search by keywords or semantics, and fetch relevant context.
  • Persistent Across Sessions: Data survives restarts and is available in new conversations.
  • Scoped & Structured: Supports user-level, project-level, or conversation-level memory with clean entity-relationship modeling.
  • Lightweight & Local-First: Runs via npx, Docker, or local installation with minimal dependencies.
  • MCP Standard Compliance: Full tool discovery, JSON-RPC interface, and seamless integration with any MCP client.
  • Extensible Foundation: Serves as a starting point for advanced implementations (vector search, graph databases like Neo4j, or hybrid systems).

Use Cases

  • Cross-Session Continuity: Claude or Cursor remembers project architecture, coding preferences, and past decisions without re-explaining.
  • User Preference Tracking: Store style preferences, tool choices, or workflow habits for personalized assistance.
  • Project Knowledge Base: Build a living graph of codebase facts, bug resolutions, and design choices.
  • Multi-Agent Collaboration: Share memory between different AI agents or sessions in complex workflows.
  • Long-Term Learning: Agents accumulate knowledge over weeks or months, improving efficiency and reducing context window waste.

Installation & Quick Start

Using npx (Easiest)

npx -y @modelcontextprotocol/server-memory

Configuration for Claude Desktop / Cursor

Add to your MCP configuration file (e.g. claude_desktop_config.json or .cursor/mcp.json):

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

Docker Option

docker run -i -v claude-memory:/app/dist --rm mcp/memory

Once running, AI agents can use tools such as create_entity, add_observation, search_memories, and get_graph to interact with the persistent memory store.

Why Memory MCP?

LLMs are powerful but forgetful between sessions. Memory MCP turns them into stateful partners by providing a standardized, secure, and discoverable way to maintain long-term context. It reduces token usage dramatically (no need to paste history every time) and enables more natural, continuous workflows.

The official implementation uses a simple local knowledge graph, making it fast, private, and easy to self-host. Community extensions add vector search, Neo4j backends, or hybrid semantic + graph capabilities for even richer memory systems.

Advanced Tips & Ecosystem

  • Combine with Claude Thread Continuity or other MCP servers for full conversation + project memory.
  • For production or multi-user setups, consider community forks with SQLite, MongoDB, Qdrant, or Neo4j backends.
  • Use in conjunction with tools like uv-mcp, playwright-mcp, or postgres-mcp for complete agentic workflows that both act and remember.
  • Monitor storage growth and implement cleanup policies for large-scale use.

Links

Memory MCP is a foundational building block for truly persistent and intelligent AI agents in the MCP ecosystem.

Tags

mcpmemorypersistent-memoryknowledge-graphmcp-serverai-agentclaudecursorlong-term-memory