The MCP server (memprove mcp)
memprove mcp serve is a Model Context Protocol server on standard input and output. The client starts it (the
entry init writes), and an agent reads and writes the ledger through its ten tools: pack, claims, context,
tasks, and ledger_verify read; begin, checkpoint, decide, end, and complete write. Parameters are
numbers and labels, never a UUID. No tool runs a command; tests are recorded with memprove run in a shell, and
their labels are then cited through the tools. Both protocol eras are served, decided per request: the 2026-07-28
revision (server/discover, the protocol version in each request’s _meta) and the initialize handshake of
2025-11-25 and 2025-06-18. Standard output carries protocol messages only; standard error carries one line per message
and never a token or an argument value.
| tool | kind | daemon operations | token scope |
|---|---|---|---|
pack |
read | getTaskCapsule, listTasks |
mcp-read |
claims |
read | getTaskCapsule, listTasks |
mcp-read |
context |
read | none (local files only) | none |
tasks |
read | listTasks |
mcp-read |
ledger_verify |
read | verifyLedger |
mcp-read |
begin |
write | listSessions, resolveWorkspace, createTask, listTasks, createSession, transitionTask |
mcp-write |
checkpoint |
write | getTaskCapsule, createCheckpoint, listTasks, listSessions |
mcp-write |
decide |
write | getTaskCapsule, proposeDecision, listTasks, listSessions |
mcp-write |
end |
write | endSession, getTaskCapsule, listSessions, listTasks |
mcp-write |
complete |
write | transitionTask, getTaskCapsule, listTasks, listSessions |
mcp-write |
packreturns the Pack asresume --packprints it, byte for byte, after an opening statement like the hook’s (the Task, the current UTC time, the server’s agent, the open-item sentence); Thepacktool’s default budget is 6000 UTF-16 code units;queryselects as--querydoes,manifestadds nothing since U16.claimsgives the full lines of named claims.begintakestask(a number fromtasks) ornew_task, andagent_name,agent_role,parent_session(else the server’s environment, else its context); its result names the Session’s agent.checkpointtakes facts, open items, reaffirmations, withdrawals and the next action with labels (r1) and claim numbers;decidea Decision;endends the context’s Session, or withabandonedthe Session a number names;completecompletes the Task on the context’s passed runs. Every result’s object begins withtask_idandsession_id. An error result’s text begins with the Problem code (role_forbidden: …) and a fixed sentence.memprove mcp print-configprints it and writes nothing: the entry belongs in<Workspace root>/.mcp.json(project scope) or in~/.claude.json(local or user scope). The entry names the executable, the argumentsmcp serve --config-dir <config>andenv.MEMPROVE_CONFIG_DIR, no data directory, no token: A token never goes into.mcp.json. Every tool call reads the token and the data directory anew: the token fromMEMPROVE_TOKEN, else the file named byMEMPROVE_TOKEN_FILE, else<configuration directory>/token; the data directory fromMEMPROVE_DATA_DIR, else the one line of<configuration directory>/data-dir. A rotated or revoked token takes effect on the next call.- The read tools need
mcp-read; the writes needmcp-write. The write tools also send reads, which needmcp-read:beginlists Sessions and Tasks,checkpointanddecideread the Capsule to resolve numbers. The agent token carries both scopes. - The Workspace is the one of
CLAUDE_PROJECT_DIR, else of the server’s working directory (the MCP server works in the Workspace ofCLAUDE_PROJECT_DIR, which Claude Code sets to the project root, else of its working directory). Nothing is kept between calls: every call reads the context files on disk again, so amemprove runin the shell and acheckpointthrough the tool see each other.
From docs/guide.md at 2625064cbf0a · Markdown