Enables AI agents to perform verifiable random draws including dice rolls, coin flips, and shuffles using on-chain proofs.
Also known as d20dao/mcp, mcp, @d20dao/mcp
- Stars
- 0
- Tools
- 3
- Downloads, 30 days
- 454
- Latest version
- 0.1.2
- Last commit
- Oct 9, 2026
- License
- MIT
What is D20DAO MCP?
D20DAO enables AI agents to perform verifiable random draws including dice rolls, coin flips, and shuffles using on-chain proofs. It exposes 3 tools, such as draw, get_result, setup_status.
Summary generated from the project's README
About D20DAO MCP server
D20DAO Verifiable Randomness provides AI agents with the ability to execute verifiable random draws through on-chain proofs. This server allows agents to perform tasks like dice rolls, coin flips, shuffles, and range selections using a VRF request on Arc. It is designed for developers using clients like Claude Code, Claude Desktop, or Cursor, requiring a Circle Agent Wallet and USDC funds to operate.
Each draw costs 0.05 USDC and is paid from a Circle Agent Wallet via the D20DAO x402 API. Users can manage costs using the D20_DAILY_LIMIT_USDC setting to set a spending cap. The server includes tools such as draw, get_result, and setup_status to manage requests and verify wallet balances. Because the server relies on the Circle CLI for signing, it does not hold any private keys itself. Results include links to request and fulfillment transactions, allowing anyone to replay the proof using the @d20dao/vrf-sdk.
What you can do with it
- 1Execute verifiable dice rollsAsk the agent to roll a die for a game using on-chain randomness.
- 2Perform a secure shuffleHave the agent shuffle a list of up to 256 items for a fair selection.
Written from the project's README. Every use case is checked against a quote from it.
How to install D20DAO MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall D20DAO MCP in Claude Code
$ claude mcp add mcp -- npx -y @d20dao/mcpInstall D20DAO MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@d20dao/mcp"
]
}
}
}Install D20DAO MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@d20dao/mcp"
]
}
}
}Install D20DAO MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp","type":"stdio","command":"npx","args":["-y","@d20dao/mcp"]}'Install D20DAO MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@d20dao/mcp"
]
}
}
}Install D20DAO MCP in Codex
$ codex mcp add mcp -- npx -y @d20dao/mcpInstall D20DAO MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@d20dao/mcp"]
Install D20DAO MCP in Gemini CLI
$ gemini mcp add -s user mcp npx -- -y @d20dao/mcpInstall D20DAO MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@d20dao/mcp"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @d20dao/mcp 0.1.2 in an isolated container with no network and no keys. It answered and listed 3 tools.
D20DAO MCP tools 3
Read from the server with tools/listdrawActionDraw verifiable randomness for 0.05 USDC: dice, a coin flip, a number in a range, one or several winners, or a shuffle. Opens one VRF request on Arc and returns the result with request, fulfillment and proof links; the optional seed is bound to the payment on chain. Pays from the user's Circle Agent Wallet. One call returns every value of its operation, so ask once and never repeat a call to re-roll. An identical call within five minutes returns the earlier draw without paying; give each separate draw its own seed. The user sets a daily spending cap, so draws can run out: a paid answer carries what is left, and setup_status shows the cap.
get_resultRead-onlyRead a paid draw by paymentId, or a request by requestId, for free. Use it to finish a draw that came back pending or unanswered. Chosen items come back as indices here, not as labels: apply them to the list you sent.
setup_statusRead-onlyCheck whether draws can be paid: the Circle CLI, its login, the agent wallet, its Gateway balance and today's spending. Returns the next setup step.
Configuration
D20_CIRCLE_CLIPath to the Circle CLI's dist/index.js (default: circle on PATH).
D20_DAILY_LIMIT_USDCSpending cap per UTC day in USDC (default 1; 0 turns paid draws off).
D20_MCP_HOMEFolder for the daily spending record (default ~/.d20dao-mcp).
D20_NETWORKArc Mainnet (default) or Arc Testnet.
D20_PAY_CHAINCircle CLI chain code to pay from, such as ARC or BASE (default: first funded).
D20_WALLET_ADDRESSAgent wallet to pay from (default: the first one the Circle CLI lists).
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachabled20dao/mcp is public and reachablegithub.com/d20dao/mcp ↗Pass
- Package names this repository as its source@d20dao/mcp names d20dao/mcp as sourcenpmjs.com/package/@d20dao/mcp ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-09github.com/d20dao/mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @d20dao/mcpPass
- No critical advisory in the package or its dependencies5 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model3 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubD20DAO MCP server
Verifiable randomness for AI agents: dice, coin flips, ranges, winners and shuffles, each one a VRF request on Arc with a proof anyone can replay. 0.05 USDC per draw, paid from your Circle Agent Wallet.
Draws run on Arc through the D20DAO x402 API. D20DAO also runs on Robinhood Chain, where there is no x402 API: a contract there requests randomness directly on chain, using @d20dao/vrf-sdk 0.6.2 and its integration guide.
Setup
-
Wallet. Have your agent follow Circle's setup guide. It installs the Circle CLI, logs you in with an emailed code and creates an agent wallet. You accept Circle's terms yourself.
-
Funds. Fund the wallet with USDC and deposit some into Circle Gateway, for example on Arc:
circle gateway deposit --chain ARC --method direct --amount 1 --address <wallet>Arc, Polygon, Avalanche, Base, Arbitrum, Optimism, Unichain and Ethereum balances all work.
-
Server. Add it to your client.
Claude Code:
claude mcp add d20dao -- npx -y @d20dao/mcp@0.1.2Claude Desktop, Cursor and others (
mcpServersin the client's MCP config):{ "mcpServers": { "d20dao": { "command": "npx", "args": ["-y", "@d20dao/mcp@0.1.2"] } } }On Windows, use
"command": "cmd"with"args": ["/c", "npx", "-y", "@d20dao/mcp@0.1.2"]if the client cannot startnpxdirectly. Pin the version, since the server runs with your Circle session.
Ask your agent to call setup_status; it names the next step until everything is ready.
Tools
| Tool | Cost | Does |
|---|---|---|
draw |
0.05 USDC | raw, coinFlip, dice (up to 128), range, chooseOne, chooseMany, shuffle (up to 256 items). Returns the result with request, fulfillment and proof links. |
get_result |
free | Reads a draw by paymentId or a request by requestId. |
setup_status |
free | Checks the CLI, login, wallet, Gateway balance and today's spending. |
An optional seed (up to 64 bytes) is bound on chain to the draw, so a raffle can name its round before the result exists. Give each separate draw its own seed: an identical draw within five minutes returns the earlier one without paying.
A draw usually answers in about ten seconds, but it can take longer. If your client's tool timeout is short (60 seconds is a common default), raise it; a retry after a timeout returns the same draw rather than paying twice.
Settings
| Variable | Default | |
|---|---|---|
D20_DAILY_LIMIT_USDC |
1 |
Spending cap per UTC day, shared by every server process of the user. 0 turns paid draws off. |
D20_NETWORK |
mainnet |
testnet uses the Arc Testnet API and a testnet CLI login (circle wallet login <email> --testnet). |
D20_PAY_CHAIN |
first funded | Circle CLI chain code to pay from, such as ARC or BASE. |
D20_WALLET_ADDRESS |
first agent wallet | Agent wallet to pay from. |
D20_CIRCLE_CLI |
circle on PATH |
Path to the CLI's dist/index.js. |
D20_MCP_HOME |
~/.d20dao-mcp |
Where the spending record is kept. |
Safety
- The server holds no keys. The Circle CLI signs, and your Circle wallet limits apply. It never accepts Circle's terms for you:
CIRCLE_ACCEPT_TERMSis kept out of the CLI it runs, andDO_NOT_TRACKis set so your item labels stay out of the CLI's telemetry. - It pays only
api.d20dao.org(orapi-testnet.d20dao.org) and never more than 0.05 USDC per draw. If the CLI ever reports another seller, that draw comes back with a warning and paid draws stop until you deletehalt.jsonfrom the server's home folder. - Each draw reserves its price in the daily record before paying; if the record cannot be written, it does not pay.
- A draw that is still pending is finished for free with
get_result. If the answer is lost after payment, the server resends the payment the CLI signed, which the API honours at most once. - A result says
charged: falseonly when that is known. When it saysunknown, do not draw again; check withget_resultor the wallet. drawis marked as a tool with side effects, so clients ask before running it unless you allow it.
Verify
Every result links its request and fulfillment transactions and a proof page. Replay the proof yourself with @d20dao/vrf-sdk 0.6.2 or later; see verification and the agent API guide.
License
MIT
D20DAO MCP questions
How do I add D20DAO MCP to Claude Code?
Run claude mcp add mcp -- npx -y @d20dao/mcp in your terminal. Add --scope user to make it available in every project.
How do I add D20DAO MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does D20DAO MCP provide?
It exposes 3 tools, including draw, get_result, setup_status.
How much does a random draw cost?
Each draw costs 0.05 USDC, paid from your Circle Agent Wallet.
What happens if a draw takes longer than the client timeout?
You should increase your client's tool timeout; retrying after a timeout returns the same draw instead of paying for a new one.
How do I verify that a result is actually random?
Every result provides links to request and fulfillment transactions and a proof page that can be replayed using the D20DAO VRF SDK.