▌BestMCPTools.org
Memory MCP logo

Memory MCP

server-memory: local knowledge graph memory for Claude and other MCP clients

AI & LLMOpen SourceClaude DesktopVS CodeEasy✦ Featured

Last verified: October 8, 2026

Maintenance status

Active
Last code update: September 27, 2026Checked September 28, 2026

Reference server maintained in the official modelcontextprotocol/servers repository.

How to Install Memory MCP

$npx -y @modelcontextprotocol/server-memory

Requires Claude Desktop, Cursor, Windsurf, or another MCP-compatible client.

Setup by client

Claude Desktop (claude_desktop_config.json)

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

Cursor (~/.cursor/mcp.json)

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

VS Code (.vscode/mcp.json)

{
  "servers": {
    "memory-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}

Claude Code (terminal)

claude mcp add memory-mcp -- npx -y @modelcontextprotocol/server-memory

Add any API keys or environment variables the server's README lists.

About Memory MCP

Memory MCP on this page means the Knowledge Graph Memory Server, the reference memory server in the official modelcontextprotocol/servers repository (folder src/memory), published on npm as @modelcontextprotocol/server-memory. If you searched for "server-memory mcp" or "mcp server-memory", this is that package. Its README describes it as "a basic implementation of persistent memory using a local knowledge graph" that "lets Claude remember information about the user across chats." It runs on your machine over stdio, stores everything in one local file, needs no API key and is free.

Other projects also call themselves "memory" servers, including hosted memory services and vector database servers. They are separate products with their own setup. This page covers only the reference server from the MCP repository.

Quick facts (as of October 8, 2026)

Knowledge Graph Memory Server
MakerThe MCP project. The npm author since July 2026 is "Model Context Protocol a Series of LF Projects, LLC." (earlier releases list Anthropic, PBC)
TypeLocal stdio server, started by your MCP client
npm package@modelcontextprotocol/server-memory, latest version 2026.8.31, published August 31, 2026
Binary namemcp-server-memory
Docker imagemcp/memory on Docker Hub, latest tag last pushed May 2, 2025
Installnpx -y @modelcontextprotocol/server-memory
AuthNone in the documented setup
Tools9 (our count from the README), plus one resource, memory://knowledge-graph
AccessRead and write to a local file
StorageOne JSONL file, memory.jsonl in the server directory by default, set with MEMORY_FILE_PATH
LicenseServer README says MIT. The repository LICENSE describes a move from MIT to Apache 2.0
PriceFree, open source. No paid tier is listed

How the knowledge graph works

The README defines three building blocks.

Entities are the nodes. Each has a unique name, an entity type such as "person", "organization" or "event", and a list of observations:

{
  "name": "John_Smith",
  "entityType": "person",
  "observations": ["Speaks fluent Spanish"]
}

Relations are directed links between two entities. The README says they are "always stored in active voice":

{
  "from": "John_Smith",
  "to": "Anthropic",
  "relationType": "works_at"
}

Observations are short strings attached to one entity. The README says they can be added or removed independently and "should be atomic (one fact per observation)."

The model decides what to save. The server only stores and returns what the model sends through the tools below.

Tools

Nine tools, from the README. Our count from the README matches the nine tool registrations in the published 2026.8.31 package.

ToolWhat it does
create_entitiesCreates new entities with a name, type and observations. Ignores entities whose name already exists
create_relationsCreates directed relations between entities. Skips duplicates. The main branch also rejects relations whose entities do not exist, a check that is not in the 2026.8.31 package
add_observationsAdds observation strings (contents) to existing entities. Fails if the entity does not exist
delete_entitiesRemoves entities and, by cascade, their relations. Does not fail on missing names. The main branch also reports which names were not found, but the 2026.8.31 package just returns a success message
delete_observationsRemoves specific observations from an entity. On the main branch it reports how many were deleted. The 2026.8.31 package returns a fixed success message
delete_relationsRemoves specific relations. On the main branch it reports how many were deleted. The 2026.8.31 package returns a fixed success message
read_graphReturns the whole graph: every entity and relation
search_nodesTakes a query string and matches it against entity names, entity types and observation text. Returns matching entities and their relations
open_nodesReturns specific entities by name and their relations. Silently skips names that do not exist

The README also lists a resource, memory://knowledge-graph (application/json), which returns the same shape as read_graph. The six mutation tools send notifications/resources/updated for it, so a client that subscribes can see changes as they happen.

In the source, the three read tools are marked readOnlyHint: true, and the three delete tools are marked destructiveHint: true.

Setup

The README gives configs for Claude Desktop and VS Code.

Claude Desktop with npx

Add this to claude_desktop_config.json:

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

On Windows the README uses "command": "cmd" with args starting "/c", "npx".

Choosing where memory is saved

Set MEMORY_FILE_PATH to control the storage file. The README describes it as the "path to the memory storage JSONL file (default: memory.jsonl in the server directory)":

{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"],
      "env": {
        "MEMORY_FILE_PATH": "/path/to/custom/memory.jsonl"
      }
    }
  }
}

With plain npx, the "server directory" is wherever npx unpacked the package, so setting an absolute path you control is the simplest way to know where your memory lives and to back it up. In the published 2026.8.31 code, a relative path is resolved against the package directory. The main branch adds expansion of a leading ~ to your home folder, but that change was not in the 2026.8.31 build we read, so use a full absolute path for now.

If MEMORY_FILE_PATH is not set and an older memory.json file exists in the server directory and no memory.jsonl does, the server renames it to memory.jsonl on start.

Docker

{
  "mcpServers": {
    "memory": {
      "command": "docker",
      "args": ["run", "-i", "-v", "claude-memory:/app/dist", "--rm", "mcp/memory"]
    }
  }
}

The named volume claude-memory is mounted at /app/dist, the folder that holds the server code and the default memory file, so your graph survives container restarts. The README warns that an old mcp/memory volume contains an index.js that can overwrite the new container's code, and says to delete that file from the volume before starting a new image.

VS Code

The README offers one-click install buttons, or a manual entry in your user mcp.json (Command Palette, MCP: Open User Configuration) or a workspace .vscode/mcp.json. VS Code uses a servers key instead of mcpServers, with the same command and args.

The suggested system prompt

The README says the prompt "depends on the use case" and gives an example for chat personalization, which it suggests pasting into the custom instructions of a Claude.ai Project. In short, it tells the model to:

  1. Assume it is talking to default_user and try to identify them.
  2. Start each chat by saying only "Remembering..." and retrieve relevant information from the graph, which it should call its "memory".
  3. Watch for new facts in five categories: basic identity, behaviors, preferences, goals, and relationships up to three degrees of separation.
  4. Save them by creating entities for recurring people, organizations and events, linking them with relations, and storing facts as observations.

Without a prompt like this, most clients will not call the memory tools on their own very often. Editing the prompt is how you control what gets saved.

Limitations and things to watch

  • Search is simple substring matching. In the source, search_nodes lowercases the query and checks whether it appears in names, types or observations. There is no ranking, no fuzzy matching and no semantic or vector search. A query for "car" will not find "vehicle".
  • Everything is one local file. Each change reads the file and writes the whole graph back. The README does not state any size limit, but read_graph returns everything, which can use a lot of context once the graph grows.
  • No accounts, no sync, no encryption. The file is plain JSON lines on your disk. Anything the model saves about you is readable by anyone who can read that file.
  • Concurrent writes. The main branch adds a queue so that several write calls in one turn do not overwrite each other, citing issue #1819. That fix was not in the 2026.8.31 package we read.
  • The prebuilt Docker image is old. Docker Hub shows the latest tag was last pushed on May 2, 2025, well before the 2026 npm releases. The README also gives a build command: docker build -t mcp/memory -f src/memory/Dockerfile .
  • It is a reference implementation. The repository says its servers are "educational examples for developers building their own MCP servers, not as production-ready solutions."
  • The model can delete memories. Three tools remove data. If you want a read-only setup, use your client's tool permissions to block them.

Pros and cons

Pros

  • Free, no API key, one npx line to install.
  • Memory is a plain file you can open, back up, edit or delete.
  • Structured graph of people, things and links, not just loose notes.
  • Small, readable source in the official MCP repository, with an npm release on August 31, 2026.
  • Exposes the graph as a subscribable MCP resource.

Cons

  • Keyword substring search only, with no ranking or semantic recall.
  • Quality depends on the model and your prompt deciding what to save.
  • read_graph returns the full graph, which grows with use.
  • Prebuilt Docker image dates from May 2025.
  • Described by its own repository as not production-ready.

Who it is for

A good fit if:

  • You want Claude Desktop, VS Code or another MCP client to remember facts about you and your projects between chats, stored on your own machine.
  • You want to see and edit exactly what was remembered.
  • You are learning MCP and want a small server with resources, annotations and file storage to study. It sits next to the Sequential Thinking server, which handles in-task reasoning and saves nothing.

Not the right tool if:

  • You need semantic recall over many memories. A vector or managed memory service such as Mem0 is built for that.
  • You need shared memory across devices or a team.
  • You want the model to read notes you already keep. Connecting Obsidian gives access to an existing notes vault instead of a separate graph.

What we could not verify

  • The exact license for this package. The server README says MIT, npm says "SEE LICENSE IN LICENSE", and the repository LICENSE describes a transition from MIT to Apache 2.0, with some older code still under MIT.
  • What the May 2025 Docker image contains. We did not pull it. It may predate the switch to JSONL storage and the resource feature.
  • The minimum Node.js version. npm lists no engines field. The Dockerfile uses Node 22 images.
  • Any size or performance limit. The README gives none, and we did not measure one.
  • Setup in clients other than Claude Desktop and VS Code. The README does not cover them.
  • How the server behaves in practice. This page comes from reading the documentation and code, not from running it.

How this page was put together

We read the server README and source on the main branch, the published 2026.8.31 npm package and registry entry, the repository README and LICENSE, the Dockerfile and the Docker Hub tag data on October 8, 2026. We did not run the server.

Sources

Pricing

Open Source: from Free (open source, as of October 2026)

Our Take on Memory MCP

A free, easy way to give Claude Desktop, VS Code or another MCP client a memory that lives in a plain file on your own machine. It suits personal use and learning how MCP memory works. Search is simple keyword matching with no ranking, and the repository itself calls its servers reference examples rather than production-ready, so look at a vector or hosted memory service if you need semantic recall or shared memory.

Alternatives to Memory MCP

Chroma MCPDatabase

Give AI agents a vector memory store for semantic search over your documents

View Chroma MCP →
Mem0 MCPAI & LLM

Give AI agents persistent long-term memory that improves with every interaction

View Mem0 MCP →
Neo4j MCPDatabase

Official Neo4j server giving agents structured access to a graph database

View Neo4j MCP →

Frequently Asked Questions

Tags