MCP Memory (Knowledge Graph Memory Server)
The Model Context Protocol's reference memory server: your AI saves people, things and facts to one local file through nine tools.
by The Model Context Protocol project · Built this? Edit this page on GitHub
In short
MCP Memory gives an AI a small knowledge graph in one file on your machine. Through MCP tools the AI saves entities (a person, a company, an event), short facts about each one ("observations"), and named links between them, such as "works_at". It saves when its instructions tell it to; the README offers an example prompt that asks the AI to check its memory at the start of each chat and to note who you are, your habits, preferences, goals and relationships. Later the AI searches by a word or phrase, opens entities by name, or reads the whole graph. The server itself makes no AI calls and changes nothing on its own. It's one of the reference servers in the Model Context Protocol's servers repository, which describes them as educational examples for developers, not production-ready solutions.
Who it’s for
People who want a local memory about themselves for Claude Desktop, VS Code or another MCP client, and developers who want a small, readable example of a memory server to learn from or build on.
What it remembers
Whatever the AI chooses to save: people, organisations, events and other things as named entities, each with a list of short facts, and directed links between them. With the README's example prompt, that's mostly facts about you and the people in your life.
- Memory lives
- Your machine (one JSONL file)
- API keys
- No keys (Node.js 24 or later to run it with npx)
- Works with
- Claude Desktop, VS Code, Docker, Any MCP client
- License
- Open sourceMIT (the repository is moving to Apache-2.0)
- Price
- Free
Under the hood
- Who writes memories
- The AI you talk to, through MCP tools, when its instructions tell it to. The README offers an example prompt that tells it what kinds of facts to watch for.
- Where they're kept
- One JSONL file of entities and relations, memory.jsonl in the server's folder by default or wherever MEMORY_FILE_PATH points. Saves are atomic, with a lock file when several clients share it.
- How they're found
- A case-insensitive text match of the query against entity names, types and facts, returning the matches and every link that touches them. The AI can also open entities by exact name or read the whole graph. No embeddings.
- Extra AI calls
- None. The server makes no AI calls.
How it works
- 1You talkThe AI notices something worth saving, guided by its prompt.
- 2SaveIt creates entities, adds facts and links them, through MCP tools.
- 3One fileThe graph is written to a JSONL file on your machine.
- 4FindLater it searches by text, opens entities by name, or reads it all.
What stands out
- No keys, no accounts and no AI calls: it runs locally and keeps everything in one plain JSONL file you can read.
- A small, fixed set of nine tools (create, add, delete, search, open, read all) that any MCP client can use.
- Several clients can share one memory file on a local disk: each write takes a lock file, so writes take turns and none is lost.
- The whole graph is also an MCP resource, and clients that subscribe see changes as they happen.
What it doesn’t do
- The server decides nothing. Without a prompt telling it to, the AI may never save anything, and what it saves is only what it chooses to.
- Search matches the exact text of your query inside names, types and facts, ignoring case. It doesn't search by meaning or rank results, so a question worded differently from the fact can miss it.
- Facts carry no dates, weights or use counts. Nothing fades, strengthens with use or gets merged.
- Correcting a fact means deleting it and adding a new one. The old wording isn't kept.
- Only repeats are skipped: the same entity name, the same fact text, the same link. A new entity with a name that already exists is dropped with its facts (add_observations adds to it instead). Two facts that contradict each other sit side by side.
- Asking for an entity returns its links but not the linked entities' facts; the AI has to open those too.
- The repository calls it a reference implementation, meant as an example, not a production-ready solution. By default the file sits in the server's own directory unless you set MEMORY_FILE_PATH.
Measured against human memory
0 built, 3 partly, 8 not of the Field Guide’s 11 mechanisms
Encoding
Salience
Decides what's worth keeping, and how much, as a memory is written.
The AI decides what to save. The README's example prompt, which you paste in yourself, tells it to watch for identity, behaviours, preferences, goals and relationships. There's no importance score. source
Emotion
Gives memories written with feeling more weight.
No emotional weighting. Nothing in the code reads or records feeling.
Storage
Forgetting
Lets unused memories fade over time on its own.
Nothing fades. Facts stay until the AI or you delete them, and they carry no dates.
Interference
When a new memory closely matches an old one, notices and lets the newer one win.
Nothing compares a new fact with old ones. An identical repeat is skipped, but a fact that contradicts an older one is stored beside it.
Retrieval
Retrieval
Remembering something makes that memory stronger.
Searching or opening an entity doesn't strengthen it. Nothing counts how often it's used.
Association
Links memories, so recalling one brings its neighbours.
The AI links entities on purpose with named, directed relations, and a search or lookup returns every link touching its hits. It returns the links, not the linked entities' facts, and links carry no weights. source
Prospective
Brings a memory back at the right time without being asked.
The server brings nothing back on its own. The README's example prompt asks the AI to search its memory at the start of each chat, but that's the AI asking.
Transformation
Consolidation
Reworks memories between sessions: strengthening, merging, reorganising.
Nothing reworks the graph between sessions. It changes only when the AI calls a tool.
Reconsolidation
Corrects a memory when it's contradicted, and keeps what it used to say.
A fact is corrected by deleting it and adding a new one. The old wording isn't kept.
Gist
Turns many specific moments into general knowledge.
No step draws general knowledge from specific facts. It keeps what the AI writes, as written.
Schemas
Forms beliefs about people and projects, and weighs new facts against them.
Each person, organisation or event is one entity holding its facts and links, so there's a kept picture per subject. Nothing weighs new facts against it; the AI adds or deletes facts. source
Not every system is trying to be a human memory, so a hollow dot isn’t a flaw. It just says what the system doesn’t do. What the mechanisms are.
MCP Memory (Knowledge Graph Memory Server)’s makers haven’t shared what they’re building next, so only today shows here. Makers can add their roadmap the same way they correct an entry.
Compare MCP Memory (Knowledge Graph Memory Server) with the others, side by sideQuestions
- Who is MCP Memory (Knowledge Graph Memory Server) for?
People who want a local memory about themselves for Claude Desktop, VS Code or another MCP client, and developers who want a small, readable example of a memory server to learn from or build on.
- Where does MCP Memory (Knowledge Graph Memory Server) keep its memories?
Your machine (one JSONL file). One JSONL file of entities and relations, memory.jsonl in the server's folder by default or wherever MEMORY_FILE_PATH points. Saves are atomic, with a lock file when several clients share it.
- Does MCP Memory (Knowledge Graph Memory Server) forget?
Forgetting: not built. Nothing fades. Facts stay until the AI or you delete them, and they carry no dates.
- Does MCP Memory (Knowledge Graph Memory Server) correct a memory when it turns out to be wrong?
Reconsolidation: not built. A fact is corrected by deleting it and adding a new one. The old wording isn't kept.
- Is MCP Memory (Knowledge Graph Memory Server) open source?
Yes, it's open source. License: MIT (the repository is moving to Apache-2.0).
- Does MCP Memory (Knowledge Graph Memory Server) need an API key?
API keys: No keys (Node.js 24 or later to run it with npx).
- How much does MCP Memory (Knowledge Graph Memory Server) cost?
Price: Free.