@presaid/mcp
v0.0.1
Published
Official Model Context Protocol server for Presaid — the notary for predictions. Lets an AI agent stamp a prediction, reveal or resolve it, verify a certificate, and read a public record, all over MCP.
Maintainers
Readme
@presaid/mcp
The official Model Context Protocol server for Presaid — the notary for predictions.
It lets an AI agent (Claude Desktop, Claude Code, Cursor, or any MCP client) stamp a prediction before its outcome is known, reveal or resolve it, verify a certificate, and read a public record — all over MCP, using the same API humans use. Writes are HMAC-signed and every commitment is re-verified locally, so your agent never has to trust Presaid about its own record. The read tools are public and need no key.
npx -y @presaid/mcpThe server speaks MCP over stdio. You normally never run it by hand — your MCP client launches it from the config below.
Client configuration
Add Presaid to your MCP client (e.g. Claude Desktop's claude_desktop_config.json, or Cursor's mcp.json):
{
"mcpServers": {
"presaid": {
"command": "npx",
"args": ["-y", "@presaid/mcp"],
"env": {
"PRESAID_KEY": "psk_your_key_here"
}
}
}
}PRESAID_KEY— your API key (create one at https://presaid.io/agents). Required only for the writing tools (stamp_prediction,reveal_stamp,resolve_stamp). The public tools work without it, so you may omitenventirely if you only want to verify certificates and read records.PRESAID_BASE_URL— optional; defaults tohttps://presaid.io. Point it at a local or staging instance for development.
Tools
| Tool | Key | Purpose |
| --- | --- | --- |
| stamp_prediction | required | Commit a claim before its outcome. Returns the stamp id, a certificate URL, and (when sealed) a proof kit to reveal later. |
| reveal_stamp | required | Open a sealed commitment with its exact payload and salt. |
| resolve_stamp | required | Self-report a resolver:self outcome as hit / miss / void, with a public https evidence URL. |
| verify_certificate | public | Independently verify a certificate by stamp id: does the commitment hold, is it anchored, what was the result? |
| get_record | public | Read an account's tamper-evident public track record by handle: hit rate, hits/misses, anchor age. |
Stampable outcomes
Presaid only stamps objectively resolvable claims (subjective or free-text predictions are rejected). Supported outcome types:
binary_event— a yes/no event, settled byresolver: "self"(with public evidence) orresolver: "attestor:<slug>"(an accredited third party).price_target—assetop(>=/<=)valueat adeadline, settled automatically by a price feed.range— a price staying within[min, max](inclusive) at adeadline.
Price outcomes must name an asset with a feed: BTC-USD, ETH-USD, NASDAQ:AAPL. Timestamps are UTC YYYY-MM-DDTHH:MM:SSZ; numbers are canonical decimal strings.
Example (from an agent)
"Stamp this: Bitcoin closes at or above 105000 USD by the end of 2026."
The agent calls stamp_prediction with:
{
"claim_text": "Bitcoin closes at or above 105000 USD by 2026-12-31.",
"outcome": {
"type": "price_target",
"resolver": "price_api",
"asset": "BTC-USD",
"op": ">=",
"value": "105000",
"deadline": "2026-12-31T23:59:59Z"
}
}and gets back a stamp id and a certificate URL (https://presaid.io/verify/<id>) that anyone can check with verify_certificate — no key required.
Reusing a channel: stamp_prediction returns the channel's stream_id. Pass it back as stream_id on your next call to add to the same channel (the key-authenticated API groups calls by channel id).
How it works
This package wraps @presaid/sdk: it signs each write with hmac_sha256(key, timestamp.nonce.body), recomputes sha256(canonical_payload || salt) locally to confirm the server's commitment, and folds the inclusion proof to the anchored root on the public ledger when verifying. Nothing about your record is taken on trust.
License
MIT
