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.

Claude Code config
{
  "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):

Terminal 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.

Claude Desktop config
{
  "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.

Cursor config
{
  "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.

Watch out for

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.

Variation: Save memories somewhere permanent
{
  "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

Related servers

Building a full setup? Combine this with other servers in the config builder. Trouble connecting? See fixing connection errors.

Open the config builder Get early access to Pro