memento-context
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., "@memento-context Save a memento: we decided to pivot to Vitest"
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.
memento-context
Memento Context is a Model Context Protocol (MCP) server that provides persistent memory capabilities for AI assistants. It allows AI models to save, retrieve, and manage scoped context across different sessions and projects safely on your local machine.
What is Memento Context?
Memento Context is not a traditional knowledge base or a long-term file storage system. Instead, it is designed as a "living context" layer for AI assistants.
The Concept
A "memento" is a short, high-impact note—usually no more than a few lines—that captures preferences, rules, or specific project context. These notes are automatically injected into the AI's instructions at the start of every session.
It IS: A place for "Wait for the DB connection before calling the auth helper", "I prefer concise Spanish responses", or "Ignore the legacy/ folder during this migration".
It IS NOT: A heavy knowledge base designed for complex semantic search or RAG. Conversations can be saved as explicit attachments to a memento, but the core model remains direct, deterministic context injection rather than large-scale document retrieval.
By keeping memories small and scoped, they remain relevant and don't overwhelm the AI's reasoning capacity.
The Ecosystem of Memory: Where does Memento fit?
To work effectively, Memento should coexist with other forms of documentation without overlapping. Think of it as the "Scar Tissue" of your project—the memory of past experiences that shapes future behavior.
Memory Type | Role | Content | Audience |
| The Handbook | Public overview, installation, and usage. | Humans & AI |
| The Constitution | Permanent laws: coding standards, architecture, and persona. | AI Assistants |
Memento | The Scar Tissue | Dynamic lessons, ephemeral decisions, and personal preferences. | AI (Specific to You) |
When to Memento?
Dynamic Learning: "Yesterday we decided to pivot to Vitest because Jest was giving us timeout issues."
Contextual Scars: "You've failed to handle the edge case in the parser 3 times; from now on, always check for null bytes first."
Ephemeral Focus: "For this session, prioritize refactoring the
auth/module over adding new features."
When NOT to Memento?
Official Standards: If it's a rule that everyone in the team should follow forever, it belongs in
AGENTS.md.Public Knowledge: If a human needs to know how to install the project, it belongs in
README.md.
The Zero-Dependency Advantage
Unlike most MCP servers, memento-context is built using Zero External Dependencies. It uses only the Python standard library to implement the JSON-RPC protocol. This ensures:
Instant Load Times: No heavy package analysis at startup.
Maximum Portability: Runs anywhere Python is available without
pip installheadaches.High Security: Zero risk of supply chain attacks from third-party libraries.
Related MCP server: Mem0 MCP Server
How it Works
The interaction with Memento Context follows a simple, automated lifecycle:
Session Bootstrap: At the start of every chat, the assistant calls
init_memento. This automatically loads all relevant global and repository-scoped notes into its active context, so it "remembers" you and your project immediately.Natural Learning: As you talk, the assistant is trained to recognize important information—like a new coding preference or a project-specific rule—and will offer to save it using
save_memento.Explicit Instructions: You have full control. You can explicitly say "Remember that this specific module has a memory leak if we use the default constructor" or "Save a note about the workaround we found for the build issue", and the assistant will persist that information for all future sessions.
Conversation Attachments: On explicit request only, the assistant can save a full conversation or summary with
save_conversation, and later attach related files withsave_memento_attachments. These attachments are stored alongside the memento and can be retrieved withget_memento_attachmentswhen the extra detail is needed.
Features
Global Memory: Store preferences, rules, and facts about the user that persist across all interactions.
Repository Memory: Store project-specific context, conventions, and architectural decisions automatically scoped to the current working directory.
Conversation Attachments: Save full conversations, summaries, and related files as attachments linked to a memento, only when explicitly requested by the user.
Intelligent Hashing: Avoids path collisions natively by generating safe repository folder IDs.
Deterministic Storage: Saves everything locally using a scalable JSON Envelope format.
Installation
memento-context is currently in early development. Standard installation via PyPI (pip install memento-context) will be available starting with the first stable release.
Quick Install (Recommended)
You can install the server in a single command using our setup scripts. This clones the repository into a local hidden folder and installs the executable globally.
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/FranBarInstance/memento-context/main/scripts/install.sh | bashWindows (PowerShell):
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/FranBarInstance/memento-context/main/scripts/install.ps1" -OutFile install.ps1; .\install.ps1Manual Install from Source
If you prefer to install manually from the source code:
git clone https://github.com/FranBarInstance/memento-context.git
cd memento-context
pipx install . # Recommended approach
# or: pip install .For developmental purposes, use the editable mode:
pipx install -e .Running the Server
Because it is defined in the pyproject.toml scripts, the installation automatically creates a globally available executable. You can start the MCP stdio standard process anywhere by simply calling:
memento-contextIDE / MCP Client Configuration
To use memento-context with an MCP-compatible client (like Claude Desktop or MCP VSCode plugins), configure the client's mcp.json settings file to connect to the executable:
{
"mcpServers": {
"memento-context": {
"command": "memento-context",
"args": []
}
}
}Available MCP Tools
The server exposes the following tools to the AI capabilities out of the box:
init_memento: Loads behavior instructions and bootstraps the context state.get_mementos: Fetches specific memory environments (global or repo).save_memento: Saves a new memory string into a target scope.save_conversation: Saves a conversation or summary as a memento with attachment files. Intended only for explicit user requests.save_memento_attachments: Copies one or more local files into the attachment directory of an existing memento.get_memento_attachments: Reads the attachment files associated with a specific memento.delete_memento: Completely removes a recognized memory.move_memento: Recategorizes a memory, transferring it seamlessly between repository scope and global scope.
Storage Architecture
All AI memories are saved inside the user home directory (~/.memento-context/).
Global records:
~/.memento-context/global/mementos.jsonRepository records:
~/.memento-context/repos/<slug>__<hash>/mementos.json
When a memento includes attachments, the server creates a sibling directory named <memento_id>_attachments/ next to the corresponding mementos.json file. That directory may contain:
conversation.mdfor a full saved conversationsummary.mdfor a shorter narrative summaryAny additional files copied with
save_memento_attachments
Example layout:
~/.memento-context/
├── global/
│ ├── mementos.json
│ └── memento_2026-04-10_abc12345_attachments/
│ ├── conversation.md
│ └── summary.md
└── repos/
└── my-project__a1b2c3d4e5/
├── mementos.json
└── memento_2026-04-10_def67890_attachments/
├── conversation.md
└── architecture-notes.mdLicense
This project is licensed under the MIT License.
Available Tools
8 toolsdelete_mementoA
Deletes an existing memento by its exact ID, regardless of whether it is global or repository-scoped. Requires init_memento or get_mementos first.
Inputs: id (required).
get_memento_attachmentsA
Reads and returns all attachment files for a specific memento. Use this only when the extra detail is needed. Requires init_memento or get_mementos first.
Inputs: id (required).
get_mementosB
Returns active mementos. Use scope=all for both global and repository memory, or scope=global/repo to inspect just one area.
Inputs: scope.
init_mementoB
MANDATORY: Call this ALWAYS as the FIRST action of EVERY session, NO EXCEPTIONS, before anything else, even for greetings or simple questions. Already loads all mementos, calling get_mementos right after is redundant.
Inputs: repo_path.
move_mementoA
Moves an existing memento from global to repository scope or from repository to global scope. Use when the user asks to reclassify stored memory. Requires init_memento or get_mementos first.
Inputs: id (required), target_scope (required).
save_conversationA
Saves a conversation or summary as a memento with attachments. Only use this on explicit user request. Requires init_memento or get_mementos first.
Inputs: text (required), scope (required), tags, expires, +2 more.
save_mementoA
Saves a persistent memento across sessions. The AI must choose whether it belongs to global memory or the current repository. Requires init_memento or get_mementos first.
Inputs: text (required), scope (required), tags, expires.
save_memento_attachmentsA
Copies files from the filesystem into the attachments directory of an existing memento. Only use this on explicit user request. Requires init_memento or get_mementos first.
Inputs: id (required), paths (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Tools are largely distinct: init/get/save/delete/move cover clear lifecycle operations, and attachment/conversation save are separately named. Some overlap exists between save_memento and save_conversation (both persist mementos, differing mainly by whether attachments are included), but descriptions help disambiguate. The confusing 'mandatory init first' pattern creates redundancy concern but not ambiguity.
Most tools follow a consistent verb_memento pattern: init_memento, get_mementos, save_memento, delete_memento, move_memento, get_memento_attachments, save_memento_attachments, save_conversation. Minor deviation with save_conversation breaking the pattern, and pluralization of get_mementos vs singular memento naming is slightly inconsistent.
8 tools is well within the ideal 3-15 range for a memory/context management server. Each tool serves a clear purpose in the lifecycle: initialization, retrieval, saving, attachment handling, deletion, and movement. No unnecessary tools present.
The tool surface covers the full memento lifecycle: init, read (with scope filtering), create, attach files, delete, move, and conversation capture. Minor gaps exist—there's no update/edit operation for an existing memento's content (only delete then save), and no search/filter tool beyond basic scope filtering.
Related MCP Connectors
Persistent, portable memory for AI assistants — your private memory graph, from any MCP client.
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol server that provides AI agents with persistent memory capabilities through Mem0, allowing them to store, retrieve, and semantically search memories.686MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates AI assistants with Mem0.ai's persistent memory system, allowing models to store, retrieve, search, and manage different types of memories.17MIT
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides persistent memory capabilities for AI systems, enabling true continuity of consciousness across conversations through episodic, semantic, procedural, and strategic memory types.246MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides knowledge graph-based persistent memory for LLMs, allowing them to store, retrieve, and reason about information across multiple conversations and sessions.92MIT