D20DAO Verifiable Randomness
Verifiable VRF draws on Arc, 0.05 USDC each. On Robinhood Chain, integrate on chain with the SDK.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@d20dao/mcpclaude mcp add d20dao-verifiable-randomness -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>' -e 'D20_MCP_HOME=<D20_MCP_HOME>' -- npx -y @d20dao/mcp@0.1.2
{
"mcpServers": {
"d20dao-verifiable-randomness": {
"command": "npx",
"args": [
"-y",
"@d20dao/mcp@0.1.2"
],
"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>",
"D20_MCP_HOME": "<D20_MCP_HOME>"
}
}
}
}
متغيرات البيئة
D20_DAILY_LIMIT_USDCSpending cap per UTC day in USDC (default 1; 0 turns paid draws off).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).D20_CIRCLE_CLIPath to the Circle CLI's dist/index.js (default: circle on PATH).D20_MCP_HOMEFolder for the daily spending record (default ~/.d20dao-mcp).
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
D20DAO 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 Verifiable Randomness؟
Verifiable VRF draws on Arc, 0.05 USDC each. On Robinhood Chain, integrate on chain with the SDK.
كيف أثبّت D20DAO Verifiable Randomness؟
يعمل على جهازك. في Claude Code: claude mcp add d20dao-verifiable-randomness -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>' -e 'D20_MCP_HOME=<D20_MCP_HOME>' -- npx -y @d20dao/mcp@0.1.2. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج D20DAO Verifiable Randomness إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل D20DAO Verifiable Randomness مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون D20DAO Verifiable Randomness؟
ينشره d20dao. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.