Suggest a server AI tools directory →

Memory MCP server

Last verified: 2026-09

Persistent notes the model can store and recall across chats.

Official reference Files & knowledge Needs a secret Claude Desktop, Cursor, Windsurf, Claude Code, VS Code

What it does

A local knowledge graph the model can write to and read back in later chats. It stores entities, relations, and observations in a JSON file on disk. Good for 'I prefer pytest' and project facts. It is not a database and it does not search the web.

It sits in Files & knowledge: These servers put the model inside a folder, a notes vault, or a Drive.

Good for

  • Remember 'I use pytest and ruff' so the next chat does not ask again.
  • Store people, projects, and relations as a small knowledge graph.
  • Recall what you told it last week without pasting the same README.
  • Delete a wrong fact with delete_entities when the graph goes stale.

Tools

  • create_entities / create_relations / add_observations — Grow the graph.
  • read_graph / search_nodes / open_nodes — Recall what was stored.
  • delete_entities / delete_observations / delete_relations — Forget.

Config (Claude Desktop / Cursor / Windsurf)

Paste the JSON below. Same mcpServers shape. Replace placeholder paths and secrets. Windows paths look like C:\\Users\\you\\project, not /path/to. Host-side steps →

Claude Desktop

OSConfig file
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json (usually C:\Users\<you>\AppData\Roaming\Claude\)
Linux~/.config/Claude/claude_desktop_config.json

Cursor

ScopemacOS / LinuxWindows
This project.cursor/mcp.json in the repo root
This user~/.cursor/mcp.json %USERPROFILE%\.cursor\mcp.json

Windsurf

OSConfig file
macOS / Linux~/.codeium/windsurf/mcp_config.json
Windows%USERPROFILE%\.codeium\windsurf\mcp_config.json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ],
      "env": {
        "MEMORY_FILE_PATH": "/path/to/memory.json"
      }
    }
  }
}

Windsurf remote MCP: use serverUrl instead of url if the block below is HTTP.

One-liner: npx -y @modelcontextprotocol/server-memory

Secrets it wants: optional MEMORY_FILE_PATH

Source repo →

How to get started

  1. Install with the JSON below. Optionally set MEMORY_FILE_PATH so you know where the file lives.
  2. Restart the host. Ask the model to remember one preference, then start a new chat and ask it back.
  3. Back up or gitignore the memory file — it can hold names, paths, and habits.

Access risk

The file is user data. Anyone with disk access — or a later model session — can read what was stored. Do not put passwords or tokens in it.

When to skip it

Skip it if you already keep notes in Obsidian or a repo README. Those stay in files you can review; this graph is easy to forget about.

Instead: Obsidian, Filesystem, Logseq.

Vs alternatives

ServerOfficial?Needs a secret?Best for
MemoryYesYesPersistent notes the model can store and recall across chats.
ObsidianNoYesRead and search a local Obsidian vault.
FilesystemYesNoRead and write files inside a folder you choose.
LogseqNoYesRead a Logseq graph.

More in Files & knowledge

All 6 in this category →

FAQ

Where does Memory store data?

A JSON file on disk. Set MEMORY_FILE_PATH so you know where it is. Back it up or gitignore it.

Does it sync across machines?

No. It is one file. Copy the file if you want the same graph on a laptop and a desktop.

Should I put API keys in Memory?

No. Anyone with disk access — and any later chat — can read it. Preferences and project names only.

Memory or Obsidian?

Obsidian if the notes already live in a vault you review. Memory if you want the model to maintain its own scratch graph.