Get the FREE Ultimate OpenClaw Setup Guide →

Memory

Official

MCP server for enabling persistent memory through a knowledge graph. Create, update, and query entities and relations.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio modelcontextprotocol-server-memory npx -y @modelcontextprotocol/server-memory

How to use

The Memory MCP server enables developers to implement persistent memory through a sophisticated knowledge graph. With capabilities to create, update, and query entities and their relationships, this server allows for efficient data management and retrieval, making it ideal for applications that require complex data interactions and storage.

Once connected to the Memory MCP server, you can interact with your knowledge graph using the available tools. You can create multiple entities with create_entities, establish connections using create_relations, and retrieve data through read_graph or search_nodes. For best results, use specific queries when searching for nodes, ensuring you target the exact attributes or relationships you need.

How to install

Prerequisites

  • Node.js (version 14.x or higher)
  • npm (Node Package Manager)

Option A: Quick start with npx

To quickly get started without a global installation, you can use:

npx -y @modelcontextprotocol/server-memory  

Option B: Global install alternative

If you prefer to install the package globally, use:

npm install -g @modelcontextprotocol/server-memory  

Additional notes

When configuring the Memory MCP server, ensure that you set the appropriate environment variables for optimal performance. Common variables include GRAPH_DB_URL for your database connection and MAX_CONNECTIONS to manage concurrent requests. Be cautious when deleting entities or relations, as this action is irreversible and can affect data integrity.

Available tools

create_entities

Create multiple new entities in the knowledge graph

create_relations

Create relations between entities

add_observations

Add observations to existing entities

delete_entities

Delete entities and their relations

delete_observations

Delete specific observations from entities

delete_relations

Delete relations between entities

read_graph

Read the entire knowledge graph

search_nodes

Search for nodes by query

open_nodes

Open specific nodes by name

Related MCP Servers

Sponsor this space

Reach thousands of developers