🔌

Memory MCP

Memory1,300

Knowledge graph-based persistent memory system for AI agents across sessions.

Claude DesktopCursorWindsurf

Overview

Knowledge graph-based persistent memory system for AI agents across sessions.

Setup

Run with npx:

npx -y @modelcontextprotocol/server-memory

Configuration

Added to claude_desktop_config.json

Documentation

Memory MCP Server

Overview

The Memory MCP Server provides AI agents with a knowledge graph-based persistent memory system. It allows agents to store, retrieve, and reason about information across sessions, creating a long-term memory that persists beyond individual conversations.

This is particularly valuable for AI assistants that need to remember user preferences, project context, or important facts over extended periods of time.

Features

  • Knowledge Graph Storage: Information is stored as a graph of entities and relationships, enabling semantic reasoning.
  • Persistent Across Sessions: Memory survives between agent sessions and restarts.
  • Semantic Search: Find relevant memories based on natural language queries.
  • Contextual Retrieval: Returns memories in context, helping agents make connections between related information.
  • Entity Linking: Automatically links related pieces of information together.

Installation

# Run via npx (recommended for MCP)
npx -y @modelcontextprotocol/server-memory

Configuration

To use the Memory MCP server, add it to your claude_desktop_config.json:

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

Available Tools

ToolDescription
memory_addAdd a new memory entry to the knowledge graph.
memory_searchSearch for relevant memories based on a query.
memory_deleteDelete a specific memory entry.
memory_listList all stored memories.
memory_clearClear all stored memories.

Usage Examples

Remembering User Preferences

The agent can use memory_add to store that the user prefers Python for data analysis, and memory_search to retrieve this preference when the user asks for coding recommendations.

Project Context

The agent can build a knowledge graph of a project's architecture, key decisions, and important files, allowing it to maintain context across multiple coding sessions.

Pros

  • True Persistence: Memory survives beyond individual sessions.
  • Semantic Reasoning: Knowledge graph enables finding related information.
  • Structured Storage: Entities and relationships are explicitly modeled.

Cons

  • Additional Dependency: Requires a separate MCP server to be running.
  • Storage Limits: Knowledge graphs can grow large and may need pruning.
  • Query Complexity: Finding the right memory can be challenging with large datasets.

Resources