Skip to content

Memory (reference server)

Official MCP reference server that gives a model persistent memory as a local knowledge graph of entities and relations.

Reviewed by Sheela · Updated

Setup docs Source codeOpen source

Our rating

3.5/5

A readable local file and a substring search make this a decent notebook for one agent, and a weak long-term memory once the graph grows.

What it is

Memory is one of the seven reference servers still maintained in modelcontextprotocol/servers; it has not been moved to servers-archived. It stores what a model learns as a small knowledge graph: entities (a person, a project), directed relations between them, and short text observations attached to each entity. Nine tools create, read, search and delete those records, and the whole graph is also exposed as the memory://knowledge-graph resource.

The graph lives in one local JSONL file, set with MEMORY_FILE_PATH; by default it sits in the server's own install directory. Run it with npx -y @modelcontextprotocol/server-memory, which needs Node.js 24 or later since version 2.0.0 (19 October 2026), or the mcp/memory Docker image with a named volume. No account or key is involved.

Install

npx -y @modelcontextprotocol/server-memory

Our review

Memory is a sound, inspectable starting point for personal agent memory, and a poor fit once the graph outgrows what a model can skim. Its strength is that nothing is hidden: the memory is a text file you can open, diff, back up or delete, and nothing leaves the machine.

Retrieval is the weak part. In the source, search_nodes is a case-insensitive substring match over names, types and observation text, with queries capped at 2,048 characters, and no embeddings or ranking. Ask for 'my manager' when the observation reads 'reports to Priya' and nothing comes back. read_graph avoids that by returning everything, which is fine for a few dozen entities and turns into a context bill as the file grows. Dedicated memory services, and the memory built into many chat apps and coding agents, attempt the semantic recall this server does not.

Recent releases fixed the data-loss problems that made sharing it risky. Since version 1.0.0, every write tool takes a lock file, so two clients pointed at one file no longer discard each other's changes; lines the server cannot parse are kept rather than deleted on the next save; and the file keeps 0600 permissions. The lock depends on exclusive file creation, so the README warns that a network filesystem still cannot be shared safely.

The model decides what to remember, which is both the design and the risk. Without a system prompt telling it when to store and look things up, recall is erratic, and text the agent has read in an email or web page can be written in as an observation and replayed in every later session. Issue #4117 asks for quotas, redaction and guardrails on destructive operations; none have shipped.

Where it earns its place

  • A solo developer using Claude Desktop and Claude Code on one laptop

    Have both clients remember project conventions and people between sessions

    Point both at the same MEMORY_FILE_PATH; the lock file serialises writes so neither loses the other's changes. It is free and local, but recall depends on a system prompt telling the model to search memory at the start of each chat.

  • A platform engineer prototyping an agent memory layer

    Try an entity-and-relation memory model before committing to a vector store

    The JSONL format is easy to inspect and migrate, so experiments cost nothing but time. Expect to replace it once queries need to match meaning rather than exact words, or once several users share one memory.

  • A security reviewer approving MCP servers for a 50-person engineering team

    Decide whether staff may run a memory server on work laptops

    Everything stays in a file on the laptop, so there is no third-party processor to assess. The risks to weigh are injected text persisting across sessions and the default file location; requiring MEMORY_FILE_PATH on an encrypted, backed-up path covers the second.

Before you commit

Setup
Add npx -y @modelcontextprotocol/server-memory to the client config (the README has Claude Desktop and VS Code snippets) and set MEMORY_FILE_PATH; Node.js 24+ is needed from 2.0.0. Tools work on restart, but useful recall needs a system prompt telling the model when to read and write.
Integrations
Nine tools: create_entities, create_relations, add_observations, delete_entities, delete_observations, delete_relations, read_graph, search_nodes and open_nodes. Six of the nine write; the graph is also a subscribable MCP resource.
Data and privacy
Reads and writes only its JSONL file; no network or credentials. Anything the agent has read can be saved as an observation and fed back in later chats, so a prompt injection can outlive the session that carried it.
Cost at scale
Free, with no rate limits. The cost is context: read_graph returns the entire graph, so its token cost grows with every entity and observation stored.
Limits
Substring search, 2,048-character query cap; no embeddings, ranking, multi-user access or quotas. Unsafe on network filesystems; a single JSON-RPC message over 10 MiB closes the stdio connection in 2.0.0.

What's good

  • Memory is one local JSONL file you can read and edit
  • Write locking since 1.0.0 stops lost updates between clients
  • No account, key or network access

What's not

  • Substring search only, no semantic recall
  • Relies on prompting the model to store and search
  • No quotas or redaction; injected text can persist

Best for

Hobbyists and developers learning how persistent memory over MCP works.

Alternatives

Memory (reference server): common questions

Is Memory (reference server) worth it?
A readable local file and a substring search make this a decent notebook for one agent, and a weak long-term memory once the graph grows. We rate it 3.5 out of 5.
How much does Memory (reference server) cost?
Free and open source.
What are the downsides of Memory (reference server)?
Substring search only, no semantic recall; relies on prompting the model to store and search; no quotas or redaction; injected text can persist.
Who is Memory (reference server) best for?
Hobbyists and developers learning how persistent memory over MCP works.
How much does Memory (reference server) cost for a team or in production?
Free, with no rate limits. The cost is context: read_graph returns the entire graph, so its token cost grows with every entity and observation stored.
Is Memory (reference server) safe for company data?
Reads and writes only its JSONL file; no network or credentials. Anything the agent has read can be saved as an observation and fed back in later chats, so a prompt injection can outlive the session that carried it.
What are the best Memory (reference server) alternatives?
The closest alternatives we have reviewed are Sequential Thinking (reference server) and Filesystem (reference server).

Answers checked Oct 23, 2026.