Knowledge Graph Memory MCP Server
A reference server that gives an agent persistent memory across sessions, stored as a simple local knowledge graph of entities, relations, and observations.
Add to Claude Code
claude mcp add memory -- npx -y @modelcontextprotocol/server-memory
Source: https://github.com/modelcontextprotocol/servers/tree/main/src/memory
About
The Memory server persists what an agent learns about entities (people, projects, preferences) and the relationships between them as a lightweight local knowledge graph, stored in a JSON file — so context survives between separate conversations instead of resetting every session.
It's intentionally simple: entities have observations attached to them, and relations connect entities to each other, which is enough structure for an agent to build up and query a working memory of ongoing context.
Key features
- Persistent memory across separate agent sessions
- Simple entity-relation-observation knowledge graph model
- Stored locally in a plain JSON file — fully inspectable
- Searchable by entity name or observation content
Use cases
- Let an agent remember a user's preferences and project context between sessions
- Build up a running knowledge base of facts learned during a long research task
- Track relationships between people, projects, and decisions over time
Available tools
create_entities
Creates new entities with a name, type, and initial observations.
create_relations
Creates a directional relationship between two existing entities.
search_nodes
Searches entities and observations by keyword.
Frequently asked questions
Where is the memory stored?
In a local JSON file on disk — fully readable and editable outside the agent if needed, with no external database required.
Does it sync across devices?
Not on its own — it's a local file, so syncing would require your own file-sharing or backup setup.