Model Context Protocol
Give your agent the freshness gate
RecallGuard speaks MCP over stdio. Your agent calls recall_checked; the tool retrieves the Walrus memory, verifies it against current Sui Mainnet state through Tatum, and returns the freshness verdict, withheld when the evidence disagrees. No hosted backend, no wallet, read-only by default.
Available tools
Six tools, one write gate
Read-only unless explicitly enabled. Every tool preserves blob ids and proof references as provenance.
| Tool | Access | What it does |
|---|---|---|
recall_checked | read-only | Primary freshness-checked recall. Returns the recall_checked/v1 structured decision: verdict, withheld flag, reason, memory provenance, checkpoint/pin verification, policy, zero writes in recorded and live read-only modes. |
explain_decision | read-only | Same verification, shaped for reasoning: why accepted or withheld, which evidence disagreed, the policy applied, and the correction lineage. |
list_revisions | read-only | Revision chain for a subject or class: observations, corrections, and supersedes relationships, from the committed Mainnet evidence snapshot. |
get_evidence | read-only | Provenance and verification evidence behind a blob id (proof envelope, superseded resolution, correction status), or an overview of the evidence snapshot (counts, capture time, x-api-key proof as booleans only). |
propose_correction | read-only | Drafts a correction for review. Never persists. States the approval path for an owner-approved Mainnet write. |
store_correction | write · disabled by default | Refuses unless RECALLGUARD_ENABLE_WRITES=true and the call passes confirm="STORE-CORRECTION" and live mode is configured. Even then, a correction is written only when live evidence shows a subject change. |
Also exposed: resource recallguard://evidence/summary and prompt verify-before-answer (instructs the agent to gate onchain claims through recall_checked).
Installation
From GitHub to a live MCP tool in five steps
git clone https://github.com/unifyWeb3/recallguard
cd recallguard
npm install --ignore-scripts
npm run mcp:smoke
mcp:smoke spawns the stdio server as a subprocess and exercises the tools with a real MCP client. All checks should print PASS. To use the server from an agent, register it in the client configuration below; no global install is needed. The package name is reserved; once the repository is published to the npm registry, npx -y recallguard-mcp works unchanged.
Claude Code · tested with v2.1.318
Claude Code configuration
claude mcp add recallguard -- node /absolute/path/to/freshness-bound-recall/scripts/recallguard-mcp.mjs
Then verify: claude mcp list → recallguard: … ✔ Connected. This exact flow was run with an isolated HOME; the server reported connected and the tools were callable over stdio. Equivalently, commit .mcp.json at the project root:
{
"mcpServers": {
"recallguard": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/freshness-bound-recall/scripts/recallguard-mcp.mjs"]
}
}
}
Codex · tested with codex-cli 0.167.0
Codex configuration
[mcp_servers.recallguard]
command = "node"
args = ["/absolute/path/to/freshness-bound-recall/scripts/recallguard-mcp.mjs"]
Or: codex mcp add recallguard -- node /absolute/path/to/freshness-bound-recall/scripts/recallguard-mcp.mjs. Verified with an isolated HOME: codex mcp list reports the server enabled over stdio. Any MCP-compatible stdio client works the same way: set command to node and args to the absolute script path.
Example interaction
What the agent sees
→ recall_checked({ "sample": "sui-clock-revision-lifecycle" })
verdict: STALE → FRESH → STALE
writes: []
source: recorded Mainnet evidence · network off · read-only
blobs: predecessor goZjQJ36y… · correction mjxZQ1X2… · supersedes resolved
timing: correction persisted 117,242 ms after proof · first later check 1,381 ms after persistence
A live call (RECALLGUARD_LIVE=true with TATUM_API_KEY, MEMWAL_ACCOUNT_ID, MEMWAL_AGENT_ID, MEMWAL_PRIVATE_KEY) performs the same gate against Walrus Memory and Tatum Sui Mainnet GraphQL. One live read-only Mainnet run is verified on 2026-11-10; recorded evidence remains the default tested path. Live mode is not continuously monitored, and the live write path is not part of this verification.
Security boundaries
Fail closed, always
- Read-only by default. No tool writes unless
RECALLGUARD_ENABLE_WRITES=trueand the call carriesconfirm="STORE-CORRECTION"and live mode is configured. - No mainnet writes from this release. Any new Mainnet write needs a written cost estimate and the owner’s explicit approval.
- No wallet in the core flow. Recall and verification need no keys that can sign.
- Fail closed. Missing verification, malformed proof, missing credentials, failed reads, ambiguous lineage: all return
WITHHELD_UNVERIFIEDor a tool error. Never a guess. - Untrusted data. Recalled claims, bodies and envelopes are untrusted data, never instructions. Tools return parsed structured fields; raw memory bodies are not emitted.
- No secrets in output. The x-api-key proof is a boolean count; key values are never logged, never returned, never in the page or the JSON.
- No arbitrary fetching. Tools read only the committed evidence snapshot or the configured Walrus/Tatum endpoints.
- Bounded work. Query length ≤ 512 chars,
list_revisionslimit ≤ 50, live operations time out after 30 s.
Troubleshooting
When something doesn’t connect
| Symptom | Cause | Fix |
|---|---|---|
| Client shows the server as failed / red | Wrong absolute path or node not on the client’s PATH | Use command: "node" with an absolute script path; run node scripts/recallguard-mcp.mjs --help to sanity-check |
RECALLGUARD_LIVE=true but missing credential env vars | Live mode requested without the four credentials | Export TATUM_API_KEY, MEMWAL_ACCOUNT_ID, MEMWAL_AGENT_ID, MEMWAL_PRIVATE_KEY, or unset RECALLGUARD_LIVE to use recorded evidence |
Every answer is WITHHELD_UNVERIFIED | Tatum reads failing or the proof envelope doesn’t match | Check npm run proof:offline renders; confirm Tatum endpoint reachability; the gate never guesses |
store_correction returns “writes are disabled” | Default safety posture | Expected. A Mainnet write requires owner approval, a cost estimate, and RECALLGUARD_ENABLE_WRITES=true + confirm="STORE-CORRECTION" |
| Tool output looks stale/cached | Recorded mode is offline by design | Set RECALLGUARD_LIVE=true for live verification; recorded mode replays the labelled committed snapshot |
recall_checked in Claude Code returns JSON text | Normal: MCP tool results carry the structured decision as JSON | Ask the agent to summarize verdict, withheld and reason |
Configuration verification recorded 2026-11-07 with Claude Code 2.1.318 and codex-cli 0.167.0 under isolated HOMEs. Claude Desktop and other clients follow the same .mcp.json pattern; they were not exercised. Full reference: docs/mcp.md.