# D20DAO Verifiable Randomness

Run verifiable dice rolls, coin flips, selections and shuffles through an MCP server. Paid draws use USDC from a Circle Agent Wallet.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: d20dao
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/d20dao/mcp
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/mcp/d20dao-verifiable-randomness

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `D20_DAILY_LIMIT_USDC`, `D20_NETWORK`, `D20_PAY_CHAIN`, `D20_WALLET_ADDRESS`, `D20_CIRCLE_CLI`, `D20_MCP_HOME` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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/mcp
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Codex

**Platform CLI**
```bash
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/mcp
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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/mcp
```
Replace <…> with your own values. 1 more environment variable is in the server README

## When to use it
- 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
- 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.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
