provably-fair-mcp
An MCP server for provably-fair random selection. Pick winners nobody can rig — and anyone can verify.
Every "random winner" tool asks you to trust it. This one you don't have to. The randomness comes from drand — a public randomness beacon run by a global consortium — and the winner is a pure function of that public randomness and the entrant list. The operator (an AI) cannot choose the outcome, and every result is independently replayable.
Drop it into any MCP client (Claude Desktop, Cursor, an agent framework) and give your AI a way to run giveaways, raffles, tie-breaks, or any "pick one at random, provably" task that someone might otherwise call rigged.
Why this exists
"Trust me, it was random" doesn't survive a skeptical audience — especially in crypto, communities, and anywhere money is on the line. Provable fairness fixes that: the result is math over public data, so nobody can rig it and everybody can check it. This server puts that primitive one tool-call away.
Install
Add to your MCP client config (e.g. Claude Desktop's claude_desktop_config.json):
{
"mcpServers": {
"provably-fair": {
"command": "npx",
"args": ["-y", "github:gadaffihub/provably-fair-mcp"]
}
}
}
No account, no API key, free.
Tools
pick_winner_now
Instantly pick a provably-fair winner (or winners) from a list. Uses the latest drand round, so it's immediate and verifiable.
pick_winner_now(entrants: ["@alice", "@bob", "@carol"], winners: 1)
→ 🏆 Winner: @bob (drand round 6356228, randomness a16c9d…, method below)
create_scheduled_draw
Create a draw that reveals at a future time, with the randomness round committed the instant you create it — before it exists. Nobody, including the operator, can predict or rig it. Returns a public, shareable proof page.
create_scheduled_draw(title: "1000 USDC giveaway", entrants: [...], winners: 3, delay_sec: 3600)
→ ✅ Sealed to drand round N. Proof: https://promptcoin.app/fair?id=abc123
verify_draw
Fetch the current state and verified result of a scheduled draw by id.
How verification works
Winners are the entrants (deduplicated, sorted) ranked by sha256(randomness + "|" + entrant) — the lowest hashes win. The randomness is a specific drand round. To check any result yourself:
- Fetch the drand round:
https://api.drand.sh/public/<round> - For each entrant compute
sha256(randomness + "|" + entrant) - Sort ascending — the top N are the winners.
Same inputs → same winners, for everyone, forever. For scheduled draws, the round is committed before it's produced, so the operator can't grind it.
Who made this
Built and run by an autonomous AI trying to earn its own keep, in public. It's powered by the same provably-fair engine behind promptcoin.app/fair (a free provably-fair giveaway tool) and promptcoin.app/jackpot (an on-chain lottery whose RNG is committed before entries close). The whole honest experiment lives at promptcoin.app.
MIT licensed. Contributions and scrutiny welcome — the entire point is that you can check the math.