Docs
Home GitHub npm

SaveState as an MCP Memory Provider

Run SaveState as a Model Context Protocol server. Claude Code, Cursor, Codex, and any MCP-compatible client can read your encrypted memory archive in real time — no manual export, no platform silo.

SaveState is the only MCP memory provider with end-to-end encryption, cross-platform portability, and an open archive format. Your keys, your data, every client.

Why MCP changes the framing

Most "AI memory" tools today are either platform silos (ChatGPT Memory, Claude Projects) or unencrypted runtime stores (community MCP memory servers). SaveState ships both halves: an encrypted, portable archive and the runtime tools to query it from any client. Snapshot once, recall everywhere.

Quick install (Claude Code)

Add SaveState to ~/.claude/settings.json:

{
  "mcpServers": {
    "savestate": {
      "command": "npx",
      "args": ["-y", "@savestate/cli", "mcp"],
      "env": {
        "SAVESTATE_MCP_PASSPHRASE": "your-passphrase-here"
      }
    }
  }
}

Then restart Claude Code. The new tools (savestate_search_snapshots, savestate_stats, plus the memory + snapshot toolset) are now available to the model.

Cursor

Add to .cursor/mcp.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "savestate": {
      "command": "npx",
      "args": ["-y", "@savestate/cli", "mcp"]
    }
  }
}

Codex CLI / OpenAI Codex

codex mcp add savestate -- npx -y @savestate/cli mcp

Tools exposed

ToolWhat it does
savestate_snapshotCreate a new encrypted snapshot of the current AI state.
savestate_restoreRestore a specific snapshot.
savestate_listList available snapshots.
savestate_statusCheck SaveState initialization + adapter status.
savestate_search_snapshotsFull-text search across every snapshot — even on a different platform. The killer feature.
savestate_statsAggregate stats: total snapshots, cadence, adapter mix, top tags.
savestate_memory_store / _search / _deleteLive memory CRUD against the SQLite-backed memory store.
add_memories / search_memory / list_memories / delete_memory / delete_all_memoriesOpenMemory-compatible API surface, drop-in for any client expecting the OpenMemory protocol.

Resources

Passphrase handling

The MCP server can run with or without encryption. If SAVESTATE_MCP_PASSPHRASE is set, the SQLite-backed memory store encrypts content; cross-snapshot search tools always require a passphrase per-call so the user keeps control. Pass the passphrase via the passphrase argument when invoking savestate_search_snapshots or savestate_snapshot.

🔒 Passphrases never leave the local process. SaveState derives keys with scrypt, encrypts with AES-256-GCM, and never sends plaintext to the cloud or to any MCP client.

Why SaveState specifically?

Next steps