# YourMemory MCP server

> Gives AI agents persistent local memory with consolidation, forgetting-curve decay, and graph-based recall across sessions.

- Repository: https://github.com/sachitrafa/YourMemory
- Page: https://hostedmcp.org/servers/sachitrafa/yourmemory
- Transport: stdio
- Stars: 273
- Latest version: 1.4.18

## Install

### Claude Code

```sh
claude mcp add yourmemory -- uvx yourmemory
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "yourmemory": {
      "command": "uvx",
      "args": [
        "yourmemory"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "yourmemory": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "yourmemory"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"yourmemory","type":"stdio","command":"uvx","args":["yourmemory"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "yourmemory": {
      "command": "uvx",
      "args": [
        "yourmemory"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add yourmemory -- uvx yourmemory
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.yourmemory]
command = "uvx"
args = ["yourmemory"]
```

### Gemini CLI

```sh
gemini mcp add -s user yourmemory uvx -- yourmemory
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "yourmemory": {
      "command": "uvx",
      "args": [
        "yourmemory"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `PYTHONIOENCODING` | no | no | Set to utf-8 to ensure correct text encoding on all platforms. |

## FAQ

### Does YourMemory store data locally?

Yes, it runs entirely on your machine and defaults to DuckDB with a single local file, with nothing leaving your system.

### Which MCP clients work with YourMemory?

It works with Claude, Cursor, Cline, Windsurf, or any MCP client, and setup auto-detects common clients.

### How does memory decay work in YourMemory?

Each memory ages on an Ebbinghaus forgetting curve; stale, unused facts fade while important or frequently recalled ones persist, and memories below 0.05 strength are pruned.

### What retrieval methods does YourMemory use?

Recall combines vector search, BM25, and entity graph expansion, then ranks by similarity times strength.

### How do I install YourMemory?

Install from PyPI, register a token, and run setup; a standalone binary is also available for macOS, Linux, and Windows.
