Gives Claude persistent memory across sessions using a local SQLite database. Stores solutions, facts, and context with a confidence scoring system that automatically decays unused knowledge while protecting critical information like auth credentials. Supports 35 relationship types to map connections between concepts, and surfaces them through tools like store_memento, recall_mementos, and create_relationship. Works across Zed, Cursor, VSCode, and CLI tools like Gemini. Ships with three profiles: core for basic operations, extended for power users who need statistics and decay control, and advanced for graph analysis. Reach for this when you want your AI to remember bug fixes, architectural decisions, or project context between sessions without manually copying notes.
Public tool metadata for what this MCP can expose to an agent.
create_entitiesCreate multiple new entities in your Memento MCP knowledge graph memory system1 paramsCreate multiple new entities in your Memento MCP knowledge graph memory system
entitiesarraycreate_relationsCreate multiple new relations between entities in your Memento MCP knowledge graph memory. Relations should be in active voice1 paramsCreate multiple new relations between entities in your Memento MCP knowledge graph memory. Relations should be in active voice
relationsarrayadd_observationsAdd new observations to existing entities in your Memento MCP knowledge graph memory4 paramsAdd new observations to existing entities in your Memento MCP knowledge graph memory
metadataobjectstrengthnumberconfidencenumberobservationsarraydelete_entitiesDelete multiple entities and their associated relations from your Memento MCP knowledge graph memory1 paramsDelete multiple entities and their associated relations from your Memento MCP knowledge graph memory
entityNamesarraydelete_observationsDelete specific observations from entities in your Memento MCP knowledge graph memory1 paramsDelete specific observations from entities in your Memento MCP knowledge graph memory
deletionsarraydelete_relationsDelete multiple relations from your Memento MCP knowledge graph memory1 paramsDelete multiple relations from your Memento MCP knowledge graph memory
relationsarrayget_relationGet a specific relation with its enhanced properties from your Memento MCP knowledge graph memory3 paramsGet a specific relation with its enhanced properties from your Memento MCP knowledge graph memory
tostringfromstringrelationTypestringupdate_relationUpdate an existing relation with enhanced properties in your Memento MCP knowledge graph memory1 paramsUpdate an existing relation with enhanced properties in your Memento MCP knowledge graph memory
relationobjectread_graphRead the entire Memento MCP knowledge graph memory system1 paramsRead the entire Memento MCP knowledge graph memory system
random_stringstringsearch_nodesSearch for nodes in your Memento MCP knowledge graph memory based on a query1 paramsSearch for nodes in your Memento MCP knowledge graph memory based on a query
querystringopen_nodesOpen specific nodes in your Memento MCP knowledge graph memory by their names1 paramsOpen specific nodes in your Memento MCP knowledge graph memory by their names
namesarraysemantic_searchSearch for entities semantically using vector embeddings and similarity in your Memento MCP knowledge graph memory6 paramsSearch for entities semantically using vector embeddings and similarity in your Memento MCP knowledge graph memory
limitnumberquerystringentity_typesarrayhybrid_searchbooleanmin_similaritynumbersemantic_weightnumberget_entity_embeddingGet the vector embedding for a specific entity from your Memento MCP knowledge graph memory1 paramsGet the vector embedding for a specific entity from your Memento MCP knowledge graph memory
entity_namestringget_entity_historyGet the version history of an entity from your Memento MCP knowledge graph memory1 paramsGet the version history of an entity from your Memento MCP knowledge graph memory
entityNamestringget_relation_historyGet the version history of a relation from your Memento MCP knowledge graph memory3 paramsGet the version history of a relation from your Memento MCP knowledge graph memory
tostringfromstringrelationTypestringget_graph_at_timeGet your Memento MCP knowledge graph memory as it existed at a specific point in time1 paramsGet your Memento MCP knowledge graph memory as it existed at a specific point in time
timestampnumberget_decayed_graphGet your Memento MCP knowledge graph memory with confidence values decayed based on time2 paramsGet your Memento MCP knowledge graph memory with confidence values decayed based on time
decay_factornumberreference_timenumberIntelligent 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:
Build a personal or team knowledge base that grows smarter over time, accessible from all your development tools.
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).
.cursorrules/CLAUDE.md files) so it knows to automatically save certain things, like bug fixes or architecture decisions.How to build the habit:
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.
confidence × importance| Profile | Tools | Best For |
|---|---|---|
| Core | 13 tools | All users - Essential operations |
| Extended | 17 tools | Power users - Statistics, contextual search, decay control |
| Advanced | 25 tools | Administrators - Graph analysis |
# Install with pipx (recommended for MCP servers)
pipx install mcp-memento
# Or with pip
pip install mcp-memento
Memento supports multiple configuration methods. For clarity, we recommend using one method consistently:
Method 1: CLI Arguments (recommended - most explicit)
{
"mcpServers": {
"memento": {
"command": "memento",
"args": ["--profile", "extended", "--db", "~/.mcp-memento/context.db"]
}
}
}
Method 2: Environment Variables
{
"mcpServers": {
"memento": {
"command": "memento",
"args": [],
"env": {
"MEMENTO_PROFILE": "extended",
"MEMENTO_DB_PATH": "~/.mcp-memento/context.db"
}
}
}
}
Method 3: YAML Configuration File
Create ~/.mcp-memento/config.yaml:
profile: extended
db_path: ~/.mcp-memento/context.db
Then use minimal JSON config:
{
"mcpServers": {
"memento": {
"command": "memento",
"args": []
}
}
}
CLI Agents (Gemini CLI):
gemini --mcp-servers memento
Note: The exact flag syntax depends on your Gemini CLI version. Refer to AGENT_CONFIGURATION.md for version-specific setup instructions.
Once configured, your AI assistant can now:
# Store solutions and knowledge
store_memento(
type="solution",
title="Fixed Redis timeout with connection pooling",
content="Increased connection timeout to 30s and added connection pooling...",
tags=["redis", "timeout", "production_fix"],
importance=0.8
)
# Find knowledge later
recall_mementos(query="Redis timeout solutions")
📌 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.
For a deep dive into Memento's concepts (Confidence System, Tagging, Relationships), please read the comprehensive RULES.md and RELATIONSHIPS.md documentation.
Memento works with all major development tools:
| Platform | Configuration Guide | Notes |
|---|---|---|
| Zed Editor | IDE Integration | Native MCP support |
| Cursor | IDE Integration | AI-powered editor |
| Windsurf | IDE Integration | Modern code editor |
| VSCode | IDE Integration | Via MCP extension |
| Claude Desktop | IDE Integration | Desktop application |
| Gemini CLI | Agent Integration | Google's CLI agent |
| Claude CLI | Agent Integration | Anthropic's CLI agent |
| Python / MCP Client | Python Integration | Embed server or call via MCP client |
| Docker / CLI | API & Programmatic | MCP client, Docker, export/import |
See also: Integration Overview for guidance on choosing the right integration.
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 a solution — the AI calls this tool when you say "remember this fix"
solution_id = store_memento(
type="solution",
title="Fixed memory leak in WebSocket handler",
content="Added proper cleanup in on_close()...",
tags=["websocket", "memory", "python"],
importance=0.9
)
# Natural language search — called when you ask "what do you know about X"
results = recall_mementos(query="WebSocket memory leak", limit=5)
# Tag-based search — for precise filtering
redis_solutions = search_mementos(tags=["redis"], memory_types=["solution"])
# Find potentially obsolete knowledge
low_confidence = get_low_confidence_mementos(threshold=0.3)
# Boost confidence after verification
boost_memento_confidence(
memory_id=verified_solution_id,
boost_amount=0.15,
reason="Verified in production deployment"
)
# Link solution to problem
create_memento_relationship(
from_memory_id=solution_id,
to_memory_id=problem_id,
relationship_type="SOLVES", # See all 35 types in docs/RELATIONSHIPS.md
strength=0.9,
context="Connection pooling resolved the timeout issue"
)
# Explore connected knowledge
related = get_related_mementos(
memory_id=solution_id,
relationship_types=["RELATED_TO", "USED_IN"],
max_depth=2
)
Memento works through natural language conversations. The AI assistant interprets intent and calls the appropriate tools automatically.
Store information:
User: Remember that we solved Redis timeout with connection pooling
AI: ✅ Memento stored - "Redis timeout solution: connection pooling"
Retrieve knowledge:
User: What do you remember about Redis timeout?
AI: Found 2 solutions: 1) Connection pooling... 2) Query optimization...
Using the "Memento" keyword:
User: Memento the deployment script is in /scripts/deploy.sh
AI: ✅ Memento stored - "Deployment script location: /scripts/deploy.sh"
The AI can also store important information automatically when configured with the guidelines in AGENT_CONFIGURATION.md.
Memento supports multiple configuration sources (in order of precedence):
Command-Line Arguments (highest priority)
memento --profile advanced --db ~/custom/path/memento.db --log-level DEBUG
Environment Variables
export MEMENTO_PROFILE="advanced"
export MEMENTO_DB_PATH="~/custom/path/memento.db"
export MEMENTO_LOG_LEVEL="DEBUG"
export MEMENTO_ALLOW_CYCLES="false" # Allow cycles in relationship graph
YAML Configuration Files
./memento.yaml in current directory (overrides global)~/.mcp-memento/config.yamlPriority Order: CLI Arguments > Environment Variables > Project YAML > Global YAML > Defaults
The following keys are read and applied by the configuration loader. Any other keys present in the YAML file are silently ignored.
| Key | Type | Default | Description |
|---|---|---|---|
db_path | string | ~/.mcp-memento/context.db | SQLite database file path |
profile | string | core | Tool profile (core, extended, advanced) |
logging.level | string | INFO | Log level (DEBUG, INFO, WARNING, ERROR) |
features.allow_relationship_cycles | bool | false | Allow cyclic relationships in the graph |
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.
Project configuration (./memento.yaml):
db_path: ~/.mcp-memento/context.db
profile: extended
logging:
level: INFO
features:
allow_relationship_cycles: false
Global configuration (~/.mcp-memento/config.yaml):
db_path: ~/.mcp-memento/global.db
profile: extended
logging:
level: INFO
Memento uses a unified SQLite schema accessible from all integrations:
nodes (memory storage), relationships (directed graph)nodes_fts — FTS5 virtual table for fast searching (falls back to LIKE-based search if FTS5 is unavailable)The system works identically across all platforms:
confidence × importanceMemento 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.
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.
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.
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.
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines on:
MIT License - see LICENSE for details.
Need help? Check the documentation or open an issue on GitHub.
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent