Memento
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 write a decision: use Postgres for the new API"
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
Give your coding agent persistent memory.
Memento is a tiny MCP server that turns a plain folder of markdown files into typed memory for AI coding agents: decisions, contracts (invariants), tasks, evaluations and session logs. Your agent can search it, extend it, and update entries by id — while the memory stays as plain, greppable, committable markdown in your repo. Works with OpenCode, Claude Code and Codex CLI — all three speak MCP over stdio, so one server covers all of them.
What it does
On session start the agent loads memory with
read_all.During work it records choices (
write), checks what's known (search), and updates entries (update).At session end it leaves a summary (
log).
No daemon, no database, no web UI. One self-contained script — no install step.
Related MCP server: context-vault
Install
1. Install uv (once per machine)
uv downloads and runs the server with its one
dependency (mcp) in an isolated, cached environment — no pip, no venv, no
clone. Windows:
winget install --id=astral-sh.uv -emacOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh2. Register the server in your CLI (no download needed)
Point your CLI at the script URL, pinned to the v1.0.0 tag so it never
changes under you. (Use main instead of v1.0.0 if you want to track the
latest.)
OpenCode
Add to opencode.json (project) or ~/.config/opencode/opencode.json (global):
{
"mcp": {
"memento": {
"type": "local",
"command": [
"uv", "run",
"https://raw.githubusercontent.com/fariborzvrm/memento-mcp/v1.0.0/memento_server.py"
],
"enabled": true
}
}
}Claude Code
claude mcp add memento -- uv run https://raw.githubusercontent.com/fariborzvrm/memento-mcp/v1.0.0/memento_server.pyOr manually in ~/.claude.json:
{
"mcpServers": {
"memento": {
"command": "uv",
"args": ["run", "https://raw.githubusercontent.com/fariborzvrm/memento-mcp/v1.0.0/memento_server.py"]
}
}
}Codex CLI
Add to ~/.codex/config.toml (or per-project .codex/config.toml):
[mcp_servers.memento]
command = "uv"
args = ["run", "https://raw.githubusercontent.com/fariborzvrm/memento-mcp/v1.0.0/memento_server.py"]Verify
Ask the agent: "List your available MCP tools." — you should see 5 memento tools.
3. Add to a project
Run in the project root:
uv run https://raw.githubusercontent.com/fariborzvrm/memento-mcp/v1.0.0/memento_server.py initThis creates .memento.toml (memory_dir = "docs/memory") and writes the
memory protocol into AGENTS.md (both skipped if already present).
Claude Code only — add one pointer line to CLAUDE.md:
See AGENTS.md for the memory protocol.(A symlink also works but needs Developer Mode on Windows; duplicating the snippet works but can drift.)
How the memory folder is found
Resolved per tool call: the MEMENTO_ROOT env var if set → the nearest
.memento.toml walking up from the working directory → docs/memory under
the working directory. The folder and its five seed files are created on
first write.
Offline / pip fallback
Prefer a local copy, or can't use uv?
# local copy, still no venv juggling
curl -o memento_server.py https://raw.githubusercontent.com/fariborzvrm/memento-mcp/v1.0.0/memento_server.py
# point your CLI at: ["uv", "run", "/path/to/memento_server.py"]
# or plain Python (3.11+)
pip install mcp
python memento_server.pyTools
read_all()— every markdown file in the memory folder, concatenated, each prefixed with a<!-- file: NAME -->marker.search(query, file=None)— case-insensitive substring match over entry titles, bodies, tags and status. Returns full entry blocks with id + file.write(type, title, body, tags=None)— append a new entry with a fresh sequential id.type:decision,contract,task,log,evaluation(unknown types get their own{TYPE}S.md).update(entry_id, status=None, title=None, body=None, tags=None)— patch an entry in place; only the fields you pass change.log(body, tags=None)— append a session log entry; the first line ofbodybecomes the title.
Entry format
Entries are markdown sections with an id comment; anything before the first marker (frontmatter, intros) is preserved:
<!-- id: dec-001 -->
## Use Postgres for persistence
**Status:** active
**Tags:** db, arch
We chose Postgres over SQLite because the eval workload needs
concurrent writers and JSONB for schema hints.Limitations
No locking — assume one agent per project.
Linear search — fine under ~2000 entries.
Whole-file rewrite on write.
A broken
.memento.tomlis reported as an error, not silently ignored.
License
MIT — see LICENSE.
Available Tools
5 toolslogA
Append a session log entry. The first line of body becomes the title.
Inputs: body (required), tags. Returns: result
read_allA
Load the whole project memory: every markdown file in the memory folder, concatenated, each prefixed with a marker.
Inputs: no named parameters. Returns: result
searchA
Case-insensitive substring search over entry titles, bodies, tags and
status. Optional file (e.g. "DECISIONS.md") to scope. Returns full
matching entry blocks with id + file, ready to feed update.
Inputs: query (required), file. Returns: result
updateA
Update an existing entry by id (e.g. "dec-001"). Only the fields you pass are changed; the rest of the file is preserved byte-for-byte.
Inputs: entry_id (required), body, tags, title, +1 more. Returns: result
writeA
Write a new memory entry. type: decision | contract | task | log | evaluation (unknown types get their own {TYPE}S.md file). Appends to the matching file with a fresh sequential id and Status: active.
Inputs: body (required), type (required), title (required), tags. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The tools are mostly distinct: read_all and search differ in scope (full dump vs targeted lookup), and write/update/log each have clear intents. The only minor ambiguity is write with type 'log' overlapping the dedicated log tool, but descriptions sufficiently clarify the difference.
All tool names are imperative verbs (search, write, update, log, read_all), which makes them predictable. The slight deviation is 'read_all' with an underscore suffix versus the single-word names of the other tools, but the pattern is still coherent.
Five tools is well-scoped for a memory-management server. Each tool covers a distinct core operation—full read, search, create, update, and session logging—without bloat or trivial fragmentation.
The toolset covers reading, searching, writing, updating, and logging, which handles the main memory lifecycle. There is no explicit delete, but update can set status to inactive, so the gap is minor and workaroundable.
Maintenance
Related MCP Connectors
Hosted MCP memory for coding agents: persistent across sessions, editable markdown, team sharing.
Shared Markdown memory for your agents: docs, typed collections, files, skills and Dispatch.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Shared, scoped, reviewable team memory for AI coding agents.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenancePersistent shared memory for AI coding agents that turns a folder of markdown files into searchable memory across sessions, repos, and machines.10 npmFunctional Source , Version 1.1, MIT Future
- FlicenseNot gradedqualityCmaintenancePersistent memory for AI agents enabling saving, searching, and managing knowledge across sessions with local markdown files.-
- FlicenseNot gradedqualityFmaintenancePersistent memory for MCP-powered coding agents, allowing LLMs to remember preferences, project context, and decisions across sessions via Markdown files.5 npm-
- AlicenseAqualityBmaintenanceEnables coding agents to store, search, and retrieve long-term memory as plain Markdown files with a disposable SQLite index, including note management, decision/bug tracking, and codebase symbol lookup via MCP.8MIT