memory-decay
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@memory-decay remember that my favorite color is blue"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PyMemoryDecay MCP
A Model Context Protocol (MCP) server that implements memory with decay mechanics. Memories fade over time unless accessed, mimicking human memory retention. It also includes a permanent "journal" for verification.
Why This?
Inspired by https://www.moltbook.com/post/783de11a-2937-4ab2-a23e-4227360b126f
Related MCP server: Sharpwave
Prerequisites
uv (Fast Python package installer and resolver)
Python 3.12+
Setup
Clone the repository:
git clone <repository-url> cd PyMemoryDecayMCPInstall dependencies: Initialize the project and install dependencies using
uv:uv sync
Running Locally
To run the MCP server from source:
uv run main.pyBuilding the Executable
To compile the project into a single standalone executable (.exe):
Add development dependencies (if not already added):
uv add --dev pyinstallerBuild:
uv run pyinstaller --onefile main.py --name memory-decay-mcp --cleanLocate the executable: The compiled
.exewill be found in thedist/directory:dist/memory-decay-mcp.exe
VS Code Configuration
To use this with the VS Code MCP extension, add the following to your mcp.json config file (typically found in %APPDATA%\Code\User\globalStorage\mcp-server\mcp.json or configured via the extension settings).
Using Source (Recommended for Dev)
{
"mcpServers": {
"memory-decay": {
"command": "uv",
"args": [
"run",
"C:\\path\\to\\PyMemoryDecayMCP\\main.py"
],
"env": {
"MEMORY_STORAGE_PATH": "C:\\path\\to\\custom\\data\\folder"
}
}
}
}Using Built Executable
{
"mcpServers": {
"memory-decay": {
"command": "C:\\path\\to\\PyMemoryDecayMCP\\dist\\memory-decay-mcp.exe",
"args": [],
"env": {
"MEMORY_STORAGE_PATH": "C:\\path\\to\\custom\\data\\folder"
}
}
}
}Configuration
MEMORY_STORAGE_PATH: (Optional) Environment variable to set the directory where the vector database and journal file are stored. Defaults to
./datarelative to the working directory.
Features
Store Memory: Embeds text and stores it in LanceDB.
Recall Memory:Retrieves relevant memories based on semantic search, filtered by memory "strength" (decay function).
Verify History: An immutable audit log (flat file) to verify facts regardless of memory decay.
Available Tools
3 toolsrecall_memoryA
Retrieves memories based on semantic relevance and decay. Successfully recalled memories receive a 'Hebbian boost', refreshing their strength.
Inputs: query (required). Returns: result
store_memoryA
Stores a memory with a specific category (episodic, semantic, procedural).
- episodic: Short-term context (logs, current tasks).
- semantic: Facts, preferences, user identity.
- procedural: Code patterns, logic, workflows.
Inputs: content (required), category. Returns: result
verify_historyA
Bypasses decay to search the immutable Archive. Use for audit or when recall fails.
Inputs: keyword (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: store_memory writes, recall_memory retrieves with decay, and verify_history accesses the immutable archive. No two tools overlap in functionality.
All tool names follow the consistent verb_noun pattern (store_memory, recall_memory, verify_history), making the API predictable and easy to navigate.
With only 3 tools, the server is tightly scoped to its core purpose of memory storage, recall, and archival verification. Each tool earns its place and the count is within the ideal 3-15 range.
The core memory lifecycle (store, recall, verify) is covered well, and decay handles forgetting implicitly. However, there is no explicit update or delete operation, which could be considered a minor gap for full lifecycle management.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
An MCP memory server. One memory your agents share — across models, devices and apps.
Cross-session memory for AI agents with a Source Receipt for every memory, over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI agents with persistent, multi-layered memory inspired by the human brain, including consolidation, self-reflection, and generative replay.1MIT
- AlicenseAqualityBmaintenanceAn MCP server providing long-term memory for AI agents with forgetting curves, consolidation, and graph-based retrieval.1014 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server that gives AI agents persistent long-term memory, storing and recalling facts, decisions, errors, procedures, and episodes across sessions.51 npm5Apache 2.0
- AlicenseAqualityDmaintenanceMCP server that gives AI agents human-like persistent memory, with auto-encoding, proactive recall, and memory rooms for cross-agent context.11MIT