Memory MCP Server
The official reference MCP server for persistent memory, storing a local knowledge graph of entities, relations and observations so an agent remembers facts across chats.
Overview
Memory is one of the official Model Context Protocol reference servers. It implements persistent memory as a local knowledge graph, so a model can remember facts about a user or project across separate conversations instead of starting from zero every time.
How it works
- Entities are the graph's nodes: a name, an entity type (person, organization, event...) and a list of observations.
- Relations are directed, active-voice links between entities (e.g.
John_Smithworks_atAnthropic). - Observations are atomic facts attached to an entity, added or removed independently of the entity itself.
- Tools cover creating/deleting entities, relations and observations,
reading the whole graph, and searching or opening specific nodes by name.
The graph is also exposed as a readable MCP Resource
(
memory://knowledge-graph) that emits update notifications on mutation. - Storage defaults to a local
memory.jsonlfile, configurable via theMEMORY_FILE_PATHenvironment variable.
Examples
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
}
}
Installation
You need Node.js 18+.
- Add the server to your MCP client's config using the block in the sidebar.
- Restart your client.
- Optional: set
MEMORY_FILE_PATHto control where the knowledge graph is stored (it defaults to a localmemory.jsonlfile). - Ask the agent to remember a fact, then start a new conversation and ask it to recall it, to confirm persistence works.
Related assets
Graphify
Turns a codebase, plus its docs, PDFs, images, and video, into a queryable knowledge graph that a coding agent can traverse instead of grepping raw files, and never guesses silently: every edge is tagged EXTRACTED, INFERRED, or AMBIGUOUS so you know what was found versus inferred.
Awesome MCP Servers
The largest community catalog of MCP servers: thousands of entries across dozens of categories (databases, browser automation, cloud, communication and more), tagged by language and scope.
Context7
Pulls updated, version-specific documentation and code examples straight from the source into your prompt, so agents stop citing outdated APIs or hallucinating ones that don't exist.