Skip to content
↑↓navigate↵openescclose
Claude+372Whisper+228LangChain+168Codex+223NotebookLM+276DALL-E 3+192DeepL+249n8n+208Topaz Video AI+153LlamaIndex+161
Memory MCP Server logo
#6 · of 449 · by weekly downloadsMCP server

Memory MCP Server

Persistent knowledge graph memory that survives between sessions.

0
SaveVisit website ↗
Rank
#6
of 449 · by weekly downloads
Weekly downloads
293K
+5.6% in 7 days
GitHub stars
92K
Repository on GitHub
Last 30 days

Add it to your client

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

Set up inClaude CodeCursorVS CodeClaude DesktopCodex

Transport
stdio
Runtime
Node
Auth
Not required
Tools
9
License
MIT
Stars
91,854
Tools
create_entitiescreate_relationsadd_observationsdelete_entitiesdelete_observationsdelete_relationsread_graphsearch_nodesopen_nodes

Memory MCP Server lets an agent store facts in a local knowledge graph and retrieve them in later conversations. It represents people, organizations and events as named entities, connects them through directed relations, and attaches individual facts as observations. Install it when a recurring assistant needs to remember preferences, goals or working relationships across chats, with memory stored in a local JSONL file.

When it helps

  • Save a person's preferred language, communication style and meeting preferences for later conversations.
  • Record people and organizations, then connect them with relationships such as works_at.
  • Retrieve stored goals and background before continuing a conversation about ongoing work.
  • Correct outdated memory by removing individual observations or deleting an entity and its connections.
  • Let separate MCP client processes read and update the same memory file on a local filesystem.

Setup

Running through npx or from source requires Node.js 24 or later. Start the server with npx -y @modelcontextprotocol/server-memory. It communicates over stdio and requires no authentication key.

For Claude Desktop, add a memory entry under mcpServers in claude_desktop_config.json. Use npx as command and ["-y","@modelcontextprotocol/server-memory"] as args. On Windows, set command to cmd and use ["/c","npx","-y","@modelcontextprotocol/server-memory"] as the arguments.

For VS Code, run MCP: Open User Configuration from the Command Palette to edit the user-level mcp.json. A workspace can instead keep its configuration in .vscode/mcp.json. VS Code expects the memory entry under servers; the command and arguments follow the same NPX pattern, including the Windows wrapper. The README also provides one-click NPX and Docker installation links for VS Code and VS Code Insiders.

Both documented clients have a Docker configuration using docker as the command and ["run","-i","-v","claude-memory:/app/dist","--rm","mcp/memory"] as the arguments. This mounts the named volume claude-memory at /app/dist. To build the image from the repository, the documented command is docker build -t mcp/memory -f src/memory/Dockerfile ..

Memory behavior also depends on the model's instructions. The README includes an example prompt that retrieves memory at the start of a chat and records identity, habits, preferences, goals and relationships. Adapt those categories and the frequency of updates to the assistant's task.

Tools it exposes

  • create_entities: Creates named entities with types and initial observations.
  • create_relations: Adds directed connections between existing entities.
  • add_observations: Appends facts to existing entities.
  • delete_entities: Removes entities and their associated relations.
  • delete_observations: Removes specified facts from entities.
  • delete_relations: Removes specified connections between entities.
  • read_graph: Returns all entities and relations without input.
  • search_nodes: Finds entities by name, type or observation content.
  • open_nodes: Retrieves named entities and relations between those entities.

Each entity has a unique name, an entityType and an array of observation strings. Keep one fact per observation so it can be added or removed independently. Relations use from, to and relationType; the relationship label should describe the connection in active voice, such as works_at.

The server also exposes memory://knowledge-graph as an application/json MCP resource with the same graph structure as read_graph. Mutation tools emit notifications/resources/updated for subscribed clients. Resource subscription handling differs between protocol eras, but the tools and resource are available through both supported stdio handshakes.

Configuration

  • MEMORY_FILE_PATH: Sets the JSONL storage path. Add it to the server entry's env object, for example with /path/to/custom/memory.jsonl. The default is memory.jsonl in the server directory, which is an NPX cache location when launched that way.
  • -v claude-memory:/app/dist: Selects the named volume mount used in the documented Docker configuration.

Point client configurations at the same MEMORY_FILE_PATH to share memory. Each client starts a separate server process, so the containing directory must permit both graph saves and lock-file creation.

Security and limits

The README describes this as a basic implementation, with the graph kept in one local file. search_nodes uses case-insensitive text matching across names, types and observations; it does not perform semantic search. The exposed tools can read the entire graph and delete stored entities, observations and relations.

Writes take an exclusive <memory file>.lock while reading, modifying and saving the graph. Competing processes wait their turn. A write fails with a tool error if it cannot acquire the lock within 60 seconds. Stale locks are removed automatically, but safe sharing depends on exclusive file creation; network filesystems that do not honor it cannot safely share the file this way.

Existing entity names are skipped by create_entities, including duplicates within a call, and their observations are not merged. Use add_observations to extend them. Creating relations requires both endpoints to exist, and adding observations requires an existing entity. open_nodes silently skips missing names. Deleting an entity also deletes its relations.

For Docker upgrades, the README warns that an older volume may contain index.js and instructs removing that file from the old volume before starting the new container.

Compared with similar servers

Choose Memory MCP Server for a local entity-and-relation graph with explicit observation editing and text search. Mem0 MCP Server offers semantic retrieval of stored facts and preferences. MCP Memory Service fits a self-hosted backend where several agents share a knowledge graph over MCP or REST. Filesystem MCP Server fits tasks that need scoped reading and writing of local folders.

Comments(0)

Sign in to comment

No comments yet — be the first.

Featured in

Similar MCP servers

Report this comment

Why are you reporting this?