Skip to content
sachitrafa avatar

YourMemory

sachitrafa/yourmemory

Persistent memory store connecting AI agents to recall, write, and update tools with decay and graph linking.

CCM score
81 of 100
GitHub stars
275
tools
3
transport
STDIO
env var
1
last updated
May 2, 2026
View on GitHub

Own this MCP server? Claim it

What it does

  • Reads memories with recall_memory, using hybrid BM25 and vector retrieval plus entity graph expansion for top-k results
  • Writes and edits with store_memory and update_memory; exact duplicates bump recall counts and changes are logged to an audit trail
  • Requires a registration token from yourmemoryai.xyz and runs locally, with DuckDB by default or Postgres for shared use
  • Designed for agents that need context to persist across sessions, with older unused memories fading over time

Tools

3 tools

Public tool metadata for what this MCP can expose to an agent.

recall_memoryRecall relevant memories using hybrid BM25 + vector retrieval with entity graph expansion. Returns top-k memories ranked by relevance, with graph-expanded neighbours included.4 params

Recall relevant memories using hybrid BM25 + vector retrieval with entity graph expansion. Returns top-k memories ranked by relevance, with graph-expanded neighbours included.

Parameters* required
current_pathstring
Optional file or directory path for spatial memory boost. Memories tagged with this path score higher.
querystring
The search query to find relevant memories. Use keywords from the current task or conversation.
top_knumber
Number of top memories to return. Defaults to 5.default: 5
user_idstring
Unique identifier for the user whose memories to search.
store_memoryStore a new memory. Automatically deduplicates, embeds, and indexes with BM25 and entity graph edges. Skips exact duplicates and bumps recall count instead.5 params

Store a new memory. Automatically deduplicates, embeds, and indexes with BM25 and entity graph edges. Skips exact duplicates and bumps recall count instead.

Parameters* required
categorystring
Memory category controlling decay half-life. Options: 'fact' (~24 days), 'strategy' (~38 days), 'assumption' (~19 days), 'failure' (~11 days).one of fact · strategy · assumption · failuredefault: fact
contentstring
The memory content to store. Write as a single factual sentence: 'Sachit prefers Python' or 'The project uses DuckDB'.
importancenumber
Importance score from 0.0 to 1.0. Controls decay rate — higher importance = slower decay. Use 0.9 for core facts, 0.7 for preferences, 0.5 for regular facts, 0.2 for transient context.default: 0.7
user_idstring
Unique identifier for the user this memory belongs to.
visibilitystring
Visibility scope. 'shared' means all agents can read it. 'private' means only the storing agent can read it.one of shared · privatedefault: shared
update_memoryUpdate an existing memory by ID. Re-embeds the new content, replaces the old memory, and logs the change to the audit trail.3 params

Update an existing memory by ID. Re-embeds the new content, replaces the old memory, and logs the change to the audit trail.

Parameters* required
importancenumber
Updated importance score from 0.0 to 1.0.default: 0.7
memory_idstring
The unique ID of the memory to update. Obtain this from a prior recall_memory call.
new_contentstring
The updated memory content. Write as a single factual sentence replacing the old content.

Configuration

PYTHONIOENCODING

Set to utf-8 to ensure correct text encoding on all platforms.

Readme

YourMemory

YourMemory

Your AI has the memory of a goldfish. Not anymore.

Persistent, self-improving memory for AI agents — built on the science of how humans remember.

PyPI PyPI Downloads Python License: CC BY-NC 4.0 GitHub Stars


View the full README on GitHub

Details

Repository
github.com/sachitrafa/yourmemory
Categories
Memory & Context, AI Agents & LLM Apps
Package
yourmemory
Transport
STDIO
Registry
MCP registry, active

Questions

What tools does the YourMemory MCP server give an agent?

YourMemory exposes three tools: recall_memory, which returns relevant memories ranked by hybrid BM25 and vector retrieval with entity graph expansion, store_memory, which saves a new memory and skips exact duplicates, and update_memory, which replaces a memory by ID and logs the change to an audit trail. Memories decay over time and strengthen when they are recalled.

Does YourMemory need an API key or external account?

The listing names only one optional environment variable, PYTHONIOENCODING, which is not required and is meant to be set to utf-8 for correct text encoding. The README says the server runs entirely on your machine with no API key and nothing leaves your system.

How do I install the YourMemory MCP server?

The server is distributed as a PyPI package named yourmemory and runs over stdio, so it can be installed with pip install yourmemory. Once installed, it gives your agent persistent memory that carries across sessions.

Where does YourMemory rank among memory MCP servers?

YourMemory is in the Memory and Context category, where it ranks in the top 50 on the category page. Other servers listed alongside it in this category include Headroom, Basic Memory, obsidian-wiki and Deja Vu.

More from sachitrafa

All 2

Similar to YourMemory

More Memory & Context