Documentation
MCP server
Upoch Guard as an MCP server: Claude Code, Cursor, Codex and any MCP client can checkpoint an agent's work on Robinhood Chain, recover it and roll back.
What it does
upoch mcp runs a local MCP server over stdio. It gives the agent eight tools and tells it when to use them: restore at the start, checkpoint after meaningful progress and before consequential actions, record each action as planned and then as confirmed, roll back when something went wrong, and complete at the end. Keys stay on your machine; the agent never holds the owner key.
Setup
Once, in your own terminal (Node.js 24 or later):
npm install -g @upoch/guard
upoch setup # keys, funding, registrationupoch setup creates two keys on your machine: the owner, which registers the agent, and the executor, the agent's key, which can only submit checkpoints. It waits while you send the owner a little ETH on Robinhood Chain (0.001 ETH is plenty), then registers the agent and gives the executor gas for checkpoints. If Claude Code is installed, it offers to add the server. Otherwise, one line:
| Client | One line |
|---|---|
| Claude Code | claude mcp add upoch -- upoch mcp |
| Cursor, Codex, Claude Desktop, any MCP client | an MCP server with the command: upoch mcp (stdio) |
{
"mcpServers": {
"upoch": { "command": "upoch", "args": ["mcp"] }
}
}Tools
| Tool | What it does | On-chain |
|---|---|---|
| upoch_restore | Restores the latest checkpoint after verifying it: state, note, completed and unresolved actions | read |
| upoch_checkpoint | Saves the current state as a checkpoint | 1 transaction |
| upoch_record_action | Records an external action (planned, submitted, confirmed, failed) with its transaction hash | no, goes into the next checkpoint |
| upoch_rollback | Goes back to an earlier checkpoint and continues from it; lists actions since then that were not undone on-chain | 1 transaction |
| upoch_complete | Saves a final checkpoint and marks the run finished | 1 transaction |
| upoch_history | Lists recent checkpoints | read |
| upoch_verify | Verifies one checkpoint without restoring it | read |
| upoch_status | Shows the workflow, executor funds and today's usage | read |
Safety
- Each checkpoint is one transaction from the executor key, with a daily limit (100 by default,
maxCheckpointsPerDayin ~/.upoch/config.json). - State that looks like private keys, seed phrases or API tokens is refused before anything is stored: checkpoints are permanent.
- Keys stay on your machine in ~/.upoch/secrets.json, unencrypted (owner-only permissions on macOS and Linux). Back it up, and keep only small amounts on these keys.
- The Upoch contracts have not been audited.