Memory
A knowledge graph that persists facts across sessions, so an agent can recall context after the conversation ends.
What it does
Stores entities, relations, and observations in a local knowledge graph the agent can write to and query later. Because the graph lives on disk, facts survive after the context window is gone.
An official reference server.
Setup
claude mcp add memory -- npx -y @modelcontextprotocol/server-memory
The storage path can be set with the MEMORY_FILE_PATH environment variable. Without it, the server picks a default location.
What to watch out for
Memory is only useful if the agent actually writes to it, and models do not do that reliably on their own. You generally need an instruction in your AGENTS.md or CLAUDE.md telling the agent when to record something.
Anything the agent stores gets read back into context later, so a wrong fact written once keeps being wrong. Check the graph occasionally.
This is not a vector database and does not do semantic search. It is a structured graph you query by entity.