Memory MCP server

OfficialAnthropic (reference)86,581Config last verified Jun 1, 2026

Reference MCP server giving an agent a persistent local knowledge graph of entities, relations, and observations.

Memory is one of the active reference servers maintained in the official Model Context Protocol repository. It implements a simple but durable knowledge graph that an agent can read from and write to across a conversation, so facts the model learns in one turn survive into later ones. The graph has three primitives: entities (named nodes with a type and a list of observations), relations (directed, active-voice links between entities like "works_at" or "manages"), and observations (atomic facts attached to an entity).

The agent creates and deletes entities and relations, adds and removes observations on existing entities, reads the whole graph, searches nodes by query, and opens specific nodes by name. The graph is persisted to a JSONL file on disk, whose location you control with MEMORY_FILE_PATH, so the agent's accumulated knowledge of a user, a project, or a domain carries over between sessions. It runs locally over stdio via npx. It is the canonical reference for giving an agent long-term memory, and a useful baseline to compare against a managed memory backend like Glen when you need org-shared, multi-user recall rather than a single local file.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ],
      "env": {
        "MEMORY_FILE_PATH": "<MEMORY_FILE_PATH>"
      }
    }
  }
}
Or via CLI
bash
claude mcp add memory -- npx -y @modelcontextprotocol/server-memory

Available tools

ToolDescription
create_entitiesCreate multiple new entities in the knowledge graph, each with a name, entity type, and observations.
create_relationsCreate multiple new directed relations between existing entities, expressed in active voice.
add_observationsAdd new observations (atomic facts) to one or more existing entities.
delete_entitiesRemove entities and all of their associated relations from the graph.
delete_observationsRemove specific observations from existing entities.
delete_relationsRemove specific relations from the knowledge graph.
read_graphRead the entire knowledge graph, returning all entities and relations.
search_nodesSearch for nodes in the graph that match a query string.
open_nodesRetrieve specific nodes by their exact names.

Required configuration

  • MEMORY_FILE_PATHOptional

    Path to the JSONL file the knowledge graph is persisted to. Defaults to memory.jsonl in the server directory.

What you can do with it

Remember facts about a user

The agent stores stable preferences, names, and project details as entities and observations, then recalls them in future sessions instead of asking again.

Build a working model of a codebase or domain

As the agent learns how services relate, it records entities and relations, then queries the graph to reason about the system on later turns.

FAQ

Is it free?
Yes. It is an open-source reference server in the official Model Context Protocol repository, licensed MIT, with no paid tier.
Does it support remote/OAuth?
No. It runs locally over stdio via npx and persists the graph to a JSONL file on the same machine; there is no hosted endpoint or login.
How does it compare to a managed memory service?
The reference server keeps a single JSON-lines graph on local disk for one agent. A managed backend like Glen adds org-shared, multi-user memory with server-side relevance retrieval and access scoping, which the local file does not provide.
← Browse all dev-tools servers