
Mcp Memento
io.github.annibale-x由 GitHub 帳號 annibale-x 發布v0.2.31更新於 Oct 24, 2026
An MCP server that provides persistent memory and context management across sessions
概覽
為 AI 助理提供以本機 SQLite 為基礎的長期記憶,讓它能跨工作階段與專案保存並回想解決方案、決策與事實。
- 可以做什麼
- Memento 為 MCP 用戶端提供持久記憶工具:store_memento 可依類型(解決方案、事實、決策)儲存項目並附上標籤與重要性,recall_mementos 與 search_mementos 則以自然語言查詢或標籤取回。它還具備信心分數機制,未使用的記憶會逐月衰減,安全相關記憶受到保護,並提供含 35 種關係類型的關係圖譜來連結相關知識。工具依 core、extended、advanced 三種設定分組,分別包含 13、17、25 個工具。
- 適用情境
- 適合希望助理在不同工作階段、不同 IDE 與命令列代理之間記住修正方法、設定細節或架構決策的情境。也適合開發者建立隨時間累積的個人或共享知識庫。它不是自主代理:除非你或預設規則要求助理儲存,否則不會保存任何內容。
- 執行需求
- 以本機 Python 套件透過 stdio 執行(pipx 或 pip install mcp-memento);未宣告需要帳號、API 金鑰或網路存取。設定為選用,可透過命令列參數、MEMENTO_PROFILE 與 MEMENTO_DB_PATH 等環境變數或 YAML 檔設定;預設資料庫為本機 SQLite 檔案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Memento,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP Memento
[Python Version] [License] [MCP Protocol] [Latest Release] [Beta]
Intelligent memory management for MCP clients with confidence tracking, relationship mapping, and knowledge quality maintenance.
Memento is an MCP server that provides persistent memory capabilities across multiple platforms:
- IDEs: Zed, Cursor, Windsurf, VSCode, Claude Desktop
- CLI Agents: Gemini CLI, Claude CLI, custom agents
- Programmatic Usage: MCP client (Python), Docker deployment, CLI export/import
- Applications: Any MCP-compatible application
Build a personal or team knowledge base that grows smarter over time, accessible from all your development tools.
Table of Contents
- 🌱 A Gentle Introduction
- ✨ Key Features
- 🚀 Quick Start
- ⚙️ Configuration
- 📖 Core Concepts
- 🔗 Integrations
- 🛠️ Basic Usage Examples
- 📚 Documentation Structure
- 🏗️ Architecture Overview
- 📜 Background
- 🙏 Acknowledgments
- 🤝 Contributing
- 📄 License
- 🔗 Links
🌱 A Gentle Introduction
What is Memento? Imagine you're solving a complex bug, figuring out a tricky configuration, or establishing a new coding pattern. Usually, you'd forget the details in a few weeks. Memento is a "long-term memory drive" for your AI assistant. It allows your AI to save these solutions, decisions, and facts so it can recall them instantly across different projects, even months later.
💡 The Agentic Mindset: A Guide for Traditional Developers If you are used to deterministic software (where things happen automatically because a script says so), interacting with AI agents requires a slight mental shift.
Memento is not an autonomous agent that watches your screen and magically decides what to remember. Instead, Memento is a toolbelt provided to your AI assistant (like Claude, Cursor, or Gemini).
- The AI is the worker: It needs to be told when to use the toolbelt. Nothing is saved without explicit instruction or a pre-defined rule.
- You are the manager: You control what gets stored. You can either tell the AI during a chat ("Save this database connection string"), or you can give the AI standard operating procedures (via system prompts or
.cursorrules/CLAUDE.mdfiles) so it knows to automatically save certain things, like bug fixes or architecture decisions.
How to build the habit:
- Start of session: Ask your AI, "What do we know about the authentication system?" to pull context.
- During work: When you fix a tricky issue, say, "We fixed the Redis timeout. Store this solution."
- End of session: Tell your AI, "Store a summary of what we accomplished today."
Alternatively, you can add custom instructions to your AI (see our Agent Configuration Guide) to make it automatically execute these steps without you having to ask every time.
✨ Key Features
🧠 Intelligent Confidence System
- Automatic decay: Unused knowledge loses confidence over time (5% monthly)
- Critical protection: Security/auth/API key memories never decay
- Boost on validation: Confidence increases when knowledge is successfully used
- Smart ordering: Search results ranked by
confidence × importance
🔗 Relationship Mapping
- 35 relationship types: SOLVES, CAUSES, IMPROVES, USED_IN, etc. across 7 semantic categories (see Relationship Types Reference)
- Graph navigation: Find connections between concepts
- Pattern detection: Identify recurring solution patterns
📊 Three Profile System
🗃️ Cross-Platform Storage
- SQLite backend: Zero dependencies, local storage
- Full-text search: Fast, fuzzy matching across all memories
- Automatic maintenance: Confidence decay, relationship integrity
- Shared database: Same database works across all integrations
🚀 Quick Start
1. Installation
2. Basic Configuration
Memento supports multiple configuration methods. For clarity, we recommend using one method consistently:
Method 1: CLI Arguments (recommended - most explicit)
Method 2: Environment Variables
Method 3: YAML Configuration File
Create ~/.mcp-memento/config.yaml:
Then use minimal JSON config:
CLI Agents (Gemini CLI):
Note: The exact flag syntax depends on your Gemini CLI version. Refer to AGENT_CONFIGURATION.md for version-specific setup instructions.
3. First Steps
Once configured, your AI assistant can now:
📌 Note: The code above represents MCP tool calls — instructions you give your AI assistant (Claude, Cursor, Gemini, etc.) to invoke Memento's tools. This is not a Python library you can
import. For programmatic Python access see the Python Integration Guide.
💬 Natural Language: You can also interact with Memento through natural conversation. Just tell your AI assistant things like "Remember that..." or "Store this..." or "Memento..."- no code required.
📖 Core Concepts
For a deep dive into Memento's concepts (Confidence System, Tagging, Relationships), please read the comprehensive RULES.md and RELATIONSHIPS.md documentation.
🔗 Integrations
Memento works with all major development tools:
See also: Integration Overview for guidance on choosing the right integration.
🛠️ Basic Usage Examples
The examples below show the MCP tool calls that an AI assistant (Zed, Cursor, Claude, Gemini CLI, …) executes on your behalf when you ask it to remember or retrieve something. They are written in a Python-like pseudocode that mirrors the MCP tool interface — they are not a Python library you import directly.
To call these tools programmatically from Python, use the
mcpclient library. See Python Integration for a working example.
Store and Retrieve Knowledge
Manage Confidence
Create Relationships
Natural Language Interaction (Chat-Based)
Memento works through natural language conversations. The AI assistant interprets intent and calls the appropriate tools automatically.
Store information:
Retrieve knowledge:
Using the "Memento" keyword:
The AI can also store important information automatically when configured with the guidelines in AGENT_CONFIGURATION.md.
⚙️ Configuration
Memento supports multiple configuration sources (in order of precedence):
-
Command-Line Arguments (highest priority)
-
Environment Variables
-
YAML Configuration Files
- Project config:
./memento.yamlin current directory (overrides global) - Global config:
~/.mcp-memento/config.yaml
- Project config:
Priority Order: CLI Arguments > Environment Variables > Project YAML > Global YAML > Defaults
- Default Values (lowest priority)
Supported YAML Keys
The following keys are read and applied by the configuration loader. Any other keys present in the YAML file are silently ignored.
Note: The
memento.yamltemplate shipped with the project contains additional commented sections (confidence,search,performance,memory,fts,project). These are not yet implemented — they are aspirational placeholders for future releases and have no effect on the current server behaviour.
Example Configuration Files
Project configuration (./memento.yaml):
Global configuration (~/.mcp-memento/config.yaml):
📚 Documentation Structure
Essential Guides
- Tools Reference - Complete guide to all MCP tools
- Confidence System - How confidence tracking works
- Relationship Types - All 35 relationship types with examples
- Usage Rules - Best practices and conventions
- Agent Configuration - Templates for AI agents
Integration Guides
- Integration Overview - Choosing the right integration
- IDE Integration - Zed, Cursor, Windsurf, VSCode, Claude Desktop
- Python Integration - MCP client usage, server embedding, CLI export/import
- Agent Integration - CLI agents and custom applications
- API & Programmatic Integration - MCP client (Python), Docker deployment, CLI export/import
Development & Advanced Topics
- Database Schema - Technical database structure
- Contributing Guidelines - Development setup and workflow
🏗️ Architecture Overview
Database Schema
Memento uses a unified SQLite schema accessible from all integrations:
- Core tables:
nodes(memory storage),relationships(directed graph) - Full-text search:
nodes_fts— FTS5 virtual table for fast searching (falls back to LIKE-based search if FTS5 is unavailable) - Confidence tracking: Automatic decay with protection for critical memories
Consistent Behavior
The system works identically across all platforms:
- Same database: All tools access the same SQLite file
- Same confidence tracking: Updates from one tool reflected everywhere
- Same search ranking: Results ordered by
confidence × importance - Same relationship types: 35 semantic relationship types available everywhere
📜 Background
Memento is a simplified, lightweight fork of MemoryGraph by Gregory Dickson, optimized for MCP integration across IDEs and CLI agents.
The fork focuses on portability and token efficiency: it removes heavy dependencies (NetworkX, multi-backend storage, bi-temporal tracking, multi-tenant architecture) in favor of a SQLite-only backend with confidence-based decay and guideline-driven storage.
Team Collaboration & Remote Deployment
Multiple users can share a SQLite database (e.g., on network storage) using tagging conventions (team:[name], author:[name]). Memento can also run as a remote MCP server, though all clients share the same database without tenant isolation. See Team Collaboration guidelines for details.
For true multi-tenancy, use the original MemoryGraph project.
When to Choose MemoryGraph vs Memento?
- Use Memento: For lightweight, cross-platform memory management in IDEs and CLI tools
- Use MemoryGraph: For enterprise use cases requiring multi-tenancy, bi-temporal tracking, or custom backends
🙏 Acknowledgments
Memento is built upon the solid foundation of Gregory Dickson's MemoryGraph project. We're grateful for his pioneering work in memory management systems.
This fork maintains compatibility with MemoryGraph's core concepts while adapting them for the specific needs of MCP integration and modern development tooling. For users requiring the full power of MemoryGraph's advanced features, we recommend exploring the original project.
🧪 Beta Status
mcp-webgate is in beta. Core functionality is stable and the server is used in production, but the configuration API may still change before 1.0.
Feedback is very welcome. If something doesn't work as expected, behaves oddly, or you have a use case that isn't covered:
Bug reports, configuration questions, and feature requests all help shape the roadmap.
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:
- Development setup and workflow
- Code style and conventions
- Testing requirements
- Documentation standards
- Pull request process
📄 License
MIT License - see LICENSE for details.
🔗 Links
- GitHub Repository - Source code and issues
- MCP Protocol - Model Context Protocol specification
- PyPI Package - Python Package Index
- MCP Registry - Model Context Protocol Registry
Need help? Check the documentation or open an issue on GitHub.
來源:README.md,提交 39dee9e
工具
0版本歷史
1- v0.2.31最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分