# Memory MCP server

Knowledge-graph based persistent memory, letting an assistant retain entities, relations and observations across sessions.

## At a glance

Memory is the official MCP reference server in the AI & Memory category. It runs locally over stdio via `npx -y @modelcontextprotocol/server-memory`, and declares no required credentials. It exposes 9 tools, including create_entities, create_relations and add_observations. It scores A (93/100) on the MCP Skills Hub health score as of Oct 27, 2026.

## Install

### How to install Memory in Claude Code

1. Add the server

```bash
claude mcp add memory -- npx -y @modelcontextprotocol/server-memory
```

2. Verify it's connected

```bash
claude mcp list
```

3. Sharing it with your team?

   Add `--scope project` to write it to .mcp.json in the repository root, which you can commit (with the secrets left as environment variables).

4. Use it in a session

   Ask Claude to use the tools this server exposes (e.g. create_entities, create_relations, add_observations). It discovers them automatically.

### How to install Memory in Claude Desktop

1. Open your MCP config

   macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json

2. Add this server

```json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}
```

3. Restart Claude Desktop

   The tools appear under the 🔌 menu once the app reloads.

### How to install Memory in Cursor

1. Create / edit .cursor/mcp.json in your project

```json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}
```

2. Enable it

   Cursor Settings → MCP → toggle the server on. Tools become available to the Composer/Agent.

### How to install Memory in Codex CLI

1. Add to ~/.codex/config.toml

```toml
[mcp_servers.memory]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-memory"]
```

2. Run Codex

   Codex loads MCP servers from config.toml on startup and exposes their tools to the agent.

### How to install Memory in Windsurf

1. Edit ~/.codeium/windsurf/mcp_config.json

```json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}
```

2. Reload

   Windsurf → Cascade → refresh MCP servers. Cascade can now call the tools.

### How to install Memory in Cline

1. Open Cline → MCP Servers → Configure

   Adds to cline_mcp_settings.json.

2. Add the server

```json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}
```

### How to install Memory in VS Code

1. Create .vscode/mcp.json

```json
{
  "servers": {
    "memory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-memory"
      ]
    }
  }
}
```

2. Start it

   VS Code shows a ▶ Start action above the server entry. Agent mode (Copilot Chat) can then use the tools.

## Tools

- `create_entities` — Create multiple new entities in the knowledge graph
- `create_relations` — Create multiple new relations between entities
- `add_observations` — Add new observations to existing entities
- `delete_entities` — Remove entities and their relations
- `delete_observations` — Remove specific observations from entities
- `delete_relations` — Remove specific relations from the graph
- `read_graph` — Read the entire knowledge graph
- `search_nodes` — Search for nodes based on query
- `open_nodes` — Retrieve specific nodes by name

Source repository: https://github.com/modelcontextprotocol/servers

---

Source: https://mcp-skills-hub.vercel.app/mcps/official-memory · MCP Skills Hub · data as of 2026-10-27T16:23:26Z
