What is MCP?
The Model Context Protocol (MCP) is a standard for AI agent communication. Memento provides an MCP server with 16 tools that AI agents can use to manage persistent memory.
Available Tools
| Tool | Description |
|---|---|
mem_save |
Save an observation |
mem_search |
Search observations (FTS5) |
mem_get_observation |
Get full observation by ID |
mem_update |
Update an existing observation |
mem_delete |
Delete/restore/purge observations |
mem_context |
Get recent context for recovery |
mem_session_start |
Start a new session |
mem_session_end |
End current session |
mem_session_summary |
Create end-of-session summary |
mem_capture_passive |
Parse text for learnings |
mem_timeline |
Chronological observation list |
mem_status |
System diagnostics |
mem_merge |
Merge related observations |
mem_export |
Export observations (JSON/XML/TXT) |
mem_lock / mem_unlock |
Lock/unlock observations |
mem_pin / mem_unpin |
Pin/unpin for system prompt injection |
Editor Configuration
Memento works with any MCP-compatible editor or CLI. Choose yours below.
1. Claude Code
The most popular AI coding agent by Anthropic.
Project-level config: Create .mcp.json in your project root:
{
"mcpServers": {
"memento": {
"command": "memento-mcp"
}
}
}
Global config: Edit ~/.claude/claude_desktop_config.json to apply across all projects.
2. OpenCode
Open source terminal-based AI coding agent.
Add to your .opencode.json in the project root:
{
"mcpServers": {
"memento": {
"command": "memento-mcp"
}
}
}
3. Cursor
AI-first code editor.
Option A — UI: Go to Settings → MCP → Add new server and paste the config.
Option B — File: Create .cursor/mcp.json in your project root:
{
"mcpServers": {
"memento": {
"command": "memento-mcp"
}
}
}
4. Windsurf
AI code editor by Codeium (formerly Codeium).
Edit ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"memento": {
"command": "memento-mcp"
}
}
}
You can also configure it via Windsurf Settings → Cascade → MCP Servers.
5. VS Code (GitHub Copilot)
VS Code with native MCP support for GitHub Copilot.
Create .vscode/mcp.json in your project root:
{
"servers": {
"memento": {
"command": "memento-mcp"
}
}
}
Note: VS Code uses the
"servers"key — not"mcpServers".
You can also run MCP: Add Server from the Command Palette (Ctrl+Shift+P) for a guided setup.
6. Zed
High-performance, Rust-based code editor with built-in AI.
Add to your Zed settings file (~/.config/zed/settings.json):
{
"context_servers": {
"memento": {
"command": "memento-mcp",
"args": []
}
}
}
Note: Zed uses the
"context_servers"key — not"mcpServers". Restart Zed after saving.
7. JetBrains AI
AI assistant for IntelliJ IDEA, WebStorm, PyCharm, and other JetBrains IDEs.
- Open Settings → Tools → AI Assistant → MCP Servers
- Click Add Server
- Set the command to
memento-mcp
No JSON config file needed — everything is configured through the IDE UI.
8. Aider
Terminal-based AI pair programmer.
Launch Aider with the --mcp-server flag:
aider --mcp-server memento-mcp
No config file needed. Aider will discover the Memento tools automatically.
9. Cline
Autonomous coding agent for VS Code.
Project-level config: Create .cline/mcp.json in your project root:
{
"mcpServers": {
"memento": {
"command": "memento-mcp"
}
}
}
You can also configure it from the Cline sidebar → MCP Servers → Edit Global MCP or Edit Project MCP.
10. Roo Code
AI coding agent extension for VS Code.
Project-level config: Create .roo/mcp.json in your project root:
{
"mcpServers": {
"memento": {
"command": "memento-mcp"
}
}
}
You can also open the MCP settings from the Roo Code sidebar and click Edit Project MCP.
Usage Patterns
Session Workflow
The recommended workflow for AI agents:
1. mem_session_start(project: "my-app")
2. mem_context() — recover previous context
3. ... do work, save observations ...
4. mem_session_summary() — persist session summary
5. mem_session_end() — close session
Saving Observations
// Decision
mem_save({
title: "Chose Zustand over Redux",
type: "decision",
content: "What: Using Zustand for state management\nWhy: Simpler API, less boilerplate",
topic_key: "architecture/state-management",
project: "my-app"
})
// Bug fix
mem_save({
title: "Fixed N+1 in UserList",
type: "bug",
content: "What: Added batch loading for user profiles\nWhy: N+1 query causing 5s load time",
topic_key: "bugfix/n1-userlist",
project: "my-app"
})
Searching Memory
// Full-text search
mem_search({ query: "database choice" })
// Filter by type and project
mem_search({ query: "auth", type: "decision", project: "my-app" })
Tips
- Always start a session — observations are grouped by session for context recovery
- Use topic keys — stable keys like
architecture/auth-modelenable grouping and merging - Save proactively — don't wait to be asked. Save decisions, bugs, and discoveries immediately
- Use
mem_session_summaryat session close — this persists what was done for next session