Skip to main content
MCP server CX Codex

YourMemory — Claude Code MCP server: what it does, how to install

Adds persistent memory to coding agents using forgetting curves and entity graphs. Keeps project context intact between sessions without bloating the context window.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env PYTHONIOENCODING=<PYTHONIOENCODING> --transport stdio yourmemory -- uvx yourmemory
Open on GitHub

What YourMemory does

YourMemory stores facts and working context locally inside ~/.yourmemory/. DuckDB serves as the default zero-config storage engine, while teams can route shared memories to Postgres using pgvector. As facts pile up, the engine summarizes related entries into single records and archives the source items.

The retrieval layer blends vector search, BM25 keyword matching, and an entity relationship graph. Unused memories fade over time following the Ebbinghaus forgetting curve, whereas recalled knowledge stays fresh. Read, write, and deletion events get recorded in a hash-chained audit log.

Running the tool requires Python 3.11 to 3.14 alongside an activation token from yourmemoryai.xyz. Without initial token setup in the CLI, the server will not function.

What it helps with

  • retain user preferences across agent resets
  • compress redundant project facts into consolidated summaries
  • trace related entities during multi-hop lookups
  • audit memory operations via a tamper-evident log

Example prompts for the agent

  • Recall our architectural decisions regarding database migrations from earlier sessions.
  • Store the new deployment guidelines for our backend microservices.
  • Purge deprecated API credentials and old notes from agent memory.

How to install YourMemory

Platform CLI

claude mcp add --env PYTHONIOENCODING=<PYTHONIOENCODING> --transport stdio yourmemory -- uvx yourmemory

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from yourmemory <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about YourMemory

How do I install YourMemory in Claude Code?

Run claude mcp add yourmemory -- uvx yourmemory. If you need custom encoding, run claude mcp add --env PYTHONIOENCODING=<PYTHONIOENCODING> --transport stdio yourmemory -- uvx yourmemory.

Where does YourMemory keep stored data?

It defaults to a single DuckDB database file in ~/.yourmemory/. Teams can switch to a remote Postgres database with the pgvector extension enabled.

What prerequisites are needed before starting YourMemory?

You need Python 3.11 through 3.14 and an email verification token obtained from yourmemoryai.xyz. Register it with yourmemory-register <your-token> before running yourmemory-setup.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor