D20DAO Verifiable Randomness — Claude Code MCP server: install
Run verifiable dice rolls, coin flips, selections and shuffles through an MCP server. Paid draws use USDC from a Circle Agent Wallet.
claude mcp add --env D20_DAILY_LIMIT_USDC=<D20_DAILY_LIMIT_USDC> --env D20_NETWORK=<D20_NETWORK> --env D20_PAY_CHAIN=<D20_PAY_CHAIN> --env D20_WALLET_ADDRESS=<D20_WALLET_ADDRESS> --env D20_CIRCLE_CLI=<D20_CIRCLE_CLI> --transport stdio d20dao-verifiable-randomness -- npx -y @d20dao/mcpWhat D20DAO Verifiable Randomness does
The server can roll dice, choose numbers from a range, flip a coin, select one or more entries, or shuffle a list. Each paid draw costs 0.05 USDC and returns a result with transaction references and a proof that can be replayed. get_result and setup_status are free tools.
You need the Circle CLI, a logged-in agent wallet and USDC, with funds deposited into Circle Gateway. Set D20_DAILY_LIMIT_USDC to control the UTC-day spending cap; 0 disables paid draws. If payment went through but the result is unknown, check get_result before requesting another draw. Clients may ask for approval before draw runs because it has a paid side effect.
Add the server to Claude Code with claude mcp add vrf -- npx -y @d20dao/mcp. On Arc, draws use D20DAO's API. Robinhood Chain instead requires a contract to request randomness directly with @d20dao/vrf-sdk. Repeating an identical draw with the same seed within five minutes returns the earlier result without another charge.
What it helps with
- flip a coin and verify the outcome
- select a winner from a list
- roll dice or draw a number from a range
- shuffle entries with a verifiable result
- look up a paid draw by its identifier
Example prompts for the agent
- Flip a coin and show me the result and its proof.
- Pick one winner from this list using a verifiable draw.
- Look up the result for my previous payment.
How to install D20DAO Verifiable Randomness
Platform CLI
claude mcp add --env D20_DAILY_LIMIT_USDC=<D20_DAILY_LIMIT_USDC> --env D20_NETWORK=<D20_NETWORK> --env D20_PAY_CHAIN=<D20_PAY_CHAIN> --env D20_WALLET_ADDRESS=<D20_WALLET_ADDRESS> --env D20_CIRCLE_CLI=<D20_CIRCLE_CLI> --transport stdio d20dao-verifiable-randomness -- npx -y @d20dao/mcpReplace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
codex mcp add d20dao-verifiable-randomness --env D20_DAILY_LIMIT_USDC=<D20_DAILY_LIMIT_USDC> --env D20_NETWORK=<D20_NETWORK> --env D20_PAY_CHAIN=<D20_PAY_CHAIN> --env D20_WALLET_ADDRESS=<D20_WALLET_ADDRESS> --env D20_CIRCLE_CLI=<D20_CIRCLE_CLI> -- npx -y @d20dao/mcpReplace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"mcpServers": {
"d20dao-verifiable-randomness": {
"command": "npx",
"args": [
"-y",
"@d20dao/mcp"
],
"env": {
"D20_DAILY_LIMIT_USDC": "<D20_DAILY_LIMIT_USDC>",
"D20_NETWORK": "<D20_NETWORK>",
"D20_PAY_CHAIN": "<D20_PAY_CHAIN>",
"D20_WALLET_ADDRESS": "<D20_WALLET_ADDRESS>",
"D20_CIRCLE_CLI": "<D20_CIRCLE_CLI>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"servers": {
"d20dao-verifiable-randomness": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@d20dao/mcp"
],
"env": {
"D20_DAILY_LIMIT_USDC": "<D20_DAILY_LIMIT_USDC>",
"D20_NETWORK": "<D20_NETWORK>",
"D20_PAY_CHAIN": "<D20_PAY_CHAIN>",
"D20_WALLET_ADDRESS": "<D20_WALLET_ADDRESS>",
"D20_CIRCLE_CLI": "<D20_CIRCLE_CLI>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
gemini mcp add -e D20_DAILY_LIMIT_USDC=<D20_DAILY_LIMIT_USDC> -e D20_NETWORK=<D20_NETWORK> -e D20_PAY_CHAIN=<D20_PAY_CHAIN> -e D20_WALLET_ADDRESS=<D20_WALLET_ADDRESS> -e D20_CIRCLE_CLI=<D20_CIRCLE_CLI> d20dao-verifiable-randomness npx -y @d20dao/mcpReplace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about D20DAO Verifiable Randomness
How do I install D20DAO Verifiable Randomness in Claude Code?
Run claude mcp add vrf -- npx -y @d20dao/mcp. Before paid draws, set up the Circle CLI, sign in and fund the agent wallet with USDC.
What does D20DAO Verifiable Randomness do?
It runs VRF-backed draws, such as dice rolls, winner selection and list shuffles. Results include links for checking the proof.
What do I need before making paid draws?
You need the Circle CLI, a logged-in agent wallet with USDC, and funds deposited into Circle Gateway. Each draw costs 0.05 USDC.