
How to add Memory (Knowledge Graph) to Claude Desktop
Official MCP server providing persistent, file-backed knowledge-graph memory across sessions. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 15, 2026 ยท 74kโ ยท stdio ยท no auth ยท official
Claude Desktop config for Memory (Knowledge Graph)
npx -y @modelcontextprotocol/server-memory{
"mcpServers": {
"memory-knowledge-graph": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
],
"env": {
"MEMORY_FILE_PATH": "/absolute/path/to/memory.jsonl"
}
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the Memory (Knowledge Graph) config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm Memory (Knowledge Graph)'s tools appear under the ๐ tools menu.
Before you start
- Node.js 18+ (to run via `npx @modelcontextprotocol/server-memory`), OR Docker if using the container image
- No credentials or auth required
- A writable location for the JSONL memory file (defaults to `memory.jsonl`; set `MEMORY_FILE_PATH` to relocate it, and a Docker volume if you want persistence in a container)
What Memory (Knowledge Graph) can do in Claude Desktop
create_entitiesAdd one or more new entities, each with a type and initial observations.
create_relationsCreate directed, active-voice relations between existing entities.
add_observationsAppend new observation strings to existing entities.
delete_entitiesRemove entities and any relations that reference them.
delete_observationsRemove specific observations from an entity.
delete_relationsRemove specific relations between entities.
read_graphReturn the entire knowledge graph (all entities and relations).
search_nodesSearch entities by name, type, or observation content.
Security
Memory contents are stored unencrypted in a local JSON-lines file; treat that file as sensitive if the model stores personal data. Anyone with disk access can read or tamper with the stored graph.
Memory (Knowledge Graph) + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Memory (Knowledge Graph) config there under the "mcpServers" key and restart the client.
Is Memory (Knowledge Graph) safe to use with Claude Desktop?
Memory contents are stored unencrypted in a local JSON-lines file; treat that file as sensitive if the model stores personal data. Anyone with disk access can read or tamper with the stored graph.
Where is my memory data stored?
In a single JSONL file โ `memory.jsonl` by default, next to the server. Override the location with the `MEMORY_FILE_PATH` environment variable.
Does the model automatically remember things?
Not on its own. You should add prompt instructions telling it when to call the memory tools; the README provides a sample system prompt for this.
How do I keep memory when running in Docker?
Mount a named volume (e.g. `-v claude-memory:/app/dist`) so the JSONL file isn't lost when the container is removed.