MCP servers / Memory
Memory MCP server: setup for Claude Code, Claude Desktop and Cursor
The Memory server gives your AI a simple knowledge graph it can store facts in: things (entities), how they connect (relations), and notes about them (observations). It lets an AI carry details from one conversation to the next.
The AI decides what to store, so nothing is remembered unless it (or you) asks it to.
- Runs with
- npx (Node.js)
- Package
- @modelcontextprotocol/server-memory on npm
- Needs
- Node.js (for npx).
- Tools
- 9 (3 read-only, 6 can change things)
- Source
- modelcontextprotocol/servers
- Last checked
- 2026-09-20 (server reported version 0.6.3)
Config for Memory
Generated by the same code as the free builder, so it matches what you get there. Pick your client, then copy.
By default it saves memories inside the npm cache, and an update to the package erased them in our test. To keep them, add "env": {"MEMORY_FILE_PATH": "/an/existing/folder/memory.jsonl"} to this server.
Claude Code
Save as .mcp.json in your project root. Claude Code asks you to approve it the first time.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
}
}
}
Or add it from a terminal instead (single quotes work in bash, zsh and PowerShell; more on this command):
claude mcp add memory -- npx -y @modelcontextprotocol/server-memory
Claude Desktop
Merge into claude_desktop_config.json (Settings → Developer → Edit Config), then fully quit and restart Claude Desktop.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
}
}
}
Cursor
Save as .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
]
}
}
}
What it can do
These are all 9 tools the server reported when we started it and asked on 2026-09-20. The labels come from the hints each tool declares about itself.
create_entitiescan change things
Create multiple new entities in the knowledge graphcreate_relationscan change things
Create multiple new relations between entities in the knowledge graph.add_observationscan change things
Add new observations to existing entities in the knowledge graphdelete_entitiescan change things
Delete multiple entities and their associated relations from the knowledge graphdelete_observationscan change things
Delete specific observations from entities in the knowledge graphdelete_relationscan change things
Delete multiple relations from the knowledge graphread_graphread-only
Read the entire knowledge graphsearch_nodesread-only
Search for nodes in the knowledge graph based on a queryopen_nodesread-only
Open specific nodes in the knowledge graph by their names
Watch out for
- By default it saves to a file called
memory.jsonlinside the server's own package folder. When we ran it throughnpx, that folder was inside npm's_npxcache. We saved a memory with an older release, then ran the normalnpx -ycommand, which upgraded the package, and the file was gone. SetMEMORY_FILE_PATHto keep it somewhere permanent (see below, and the full guide). - If you point
MEMORY_FILE_PATHat a folder that does not exist, the server still starts, but every save fails with a "no such file or directory" error. Create the folder first. We tested both cases. - The file is plain text, so it holds whatever the AI stored, in readable form. Keep it private, and do not let it collect secrets.
- 6 of its 9 tools change the graph, including tools that delete entities and observations.
Variations
Save memories somewhere permanent
Replace the path with a folder that already exists. In a Windows path, write each backslash twice in JSON, or use forward slashes.
{
"mcpServers": {
"memory": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-memory"
],
"env": {
"MEMORY_FILE_PATH": "/path/to/existing/folder/memory.jsonl"
}
}
}
}
The same in Claude Code, Claude Desktop and Cursor.
Try asking
- “Remember that this project uses pnpm and deploys to Cloudflare Pages.”
- “What do you remember about my preferences for code style?”
- “Show me everything you have stored about this project.”
Related servers
- Notion: Search and edit pages and databases in your Notion workspace.
- Sequential Thinking: Helps the AI work through hard problems step by step.
Building a full setup? Combine this with other servers in the config builder. Trouble connecting? See fixing connection errors.