The memory server is the official reference implementation of persistent agent memory. It keeps a knowledge graph of entities, the relations between them and free-text observations attached to each, stored in a plain JSON file on your machine that you can read and edit yourself.
Bring your own
Claude Sonnet 4.5
Chat with 60+ AI models on the same workflow — switch to a different model mid-conversation and re-run the same prompt, or use Compare mode to put several side-by-side and balance quality vs. cost.
No token required
How models use it and what it is built for.
A model forgets everything between sessions. The memory server fixes that with a deliberately simple data model: entities are named nodes with a type, relations are directed edges stated in the active voice, and observations are short atomic facts attached to an entity. An agent creates entities as it learns about them, adds observations over time, and searches the graph at the start of a later conversation to recall what it knows. Everything is persisted to a single JSON Lines file whose path you control, so the memory is inspectable, diffable and deletable — there is no hosted store and nothing leaves your machine. Because the graph is stored as text, you can also seed it by hand or check it into a repository.
Typical tools an AI model can call. Exact names vary by version.
Taken from the official Memory documentation — see Memory MCP Server — official reference implementation for the full reference.
Environment variables
MEMORY_FILE_PATHAbsolute path to the JSON file holding the graph. Defaults to memory.json next to the server package, which is rarely what you want — set it per project.
Client configuration
npx with a per-project graph file
Point MEMORY_FILE_PATH inside the project so each project keeps its own memory instead of sharing one global graph.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"env": { "MEMORY_FILE_PATH": "/path/to/project/.memory.json" }
}
}
}Copy any of these into MCP Agent Studio after connecting.
Remember that this project uses Postgres 16 and deploys on Fridays.
What do you already know about my team and how we work?
Update what you know about the billing service — it moved to a new repo.
Show me everything in memory related to the migration project.
This is not a single-model product: you get the same MCP connection with 60+ models (Claude, GPT, Gemini, DeepSeek, open-weight, and more), you can switch mid-conversation, and you can open Compare mode to run the same prompt against multiple models at once. The card above is a suggested starting point for this server — not the only choice.
Default pick for Memory
Claude Sonnet 4.5
Memory quality depends entirely on the model choosing to write good atomic observations. Sonnet 4.5 is disciplined about this where cheaper models under-record.
Listing tools proves the server is reachable, not that a model can work with it. Evals go further: they read every tool on the server, write a test suite from its real schemas, and run it — code decides pass/fail on the responses (schema conformance, error codes, pagination, result caps) while a scoring model grades plain-English tasks driven through the tools.
Get a pass/fail report per tool with the evidence behind each verdict — and replay the same suite after every schema change. Destructive tools are excluded from the run.
Run evalsOpen MCP Agent Studio with the connection pre-filled. Add your token, pick any of 60+ models, and start chatting — no install required.
Open Agent StudioCommon questions about connecting, scoping and using it safely.
It is the official reference server for persistent agent memory, published as @modelcontextprotocol/server-memory. It maintains a local knowledge graph of entities, relations and observations that survives between sessions.
In a single JSON Lines file on your own disk, at the path you set in MEMORY_FILE_PATH. Nothing is uploaded anywhere. You can open the file, edit it, delete it or commit it to a repository.
A graph gives explicit, readable relationships — "Alice works_at Acme" is a fact you can audit, not an embedding you have to trust. It also keeps recall cheap, since search_nodes is a text query rather than an embedding round trip. For semantic recall over large unstructured corpora, a vector server like Qdrant or Pinecone is the better fit.
It mostly does not, unless you tell it. In practice you add a line to your system prompt instructing the model to search memory at the start of a conversation and record new facts as it learns them. Without that prompt the tools sit unused.
Yes, unless something prunes it. The delete_entities, delete_relations and delete_observations tools exist for that, but nothing calls them automatically. Reviewing the JSON file occasionally is the practical answer on a long-running project.