D20DAO Verifiable Randomness

org.d20dao由 d20dao.org 发布v0.1.2更新于 Oct 24, 2026

Verifiable VRF draws on Arc, 0.05 USDC each. On Robinhood Chain, integrate on chain with the SDK.

概览

AI 生成的概览

本地 MCP 服务器,让助手在 Arc 上进行付费且可验证的 VRF 抽取(骰子、抛硬币、范围、抽选、洗牌),以 USDC 结算。

可以做什么
执行可验证的随机抽取:原始值、抛硬币、最多 128 个骰子、范围、单选或多选,以及最多 256 项的洗牌,每项都附带请求、履行和证明链接,并可选绑定链上种子。按支付 ID 查询抽取结果,或按请求 ID 查询请求,并可免费完成待处理的抽取。检查设置状态:CLI、登录、钱包、Gateway 余额和当日支出。
适用场景
当助手需要可审计的随机性用于抽奖、赠品、游戏结果或公平选择,并且你愿意从 Circle 代理钱包为每次抽取支付少量 USDC 费用时使用。它适合结果需要可重放证明的场景。若要在 Robinhood Chain 上进行链上集成,请改用单独的 SDK。
运行要求
通过 npx 从 npm 包启动的本地 Node.js 进程。需要一个用 Circle CLI 设置的 Circle 代理钱包,通过邮件验证码登录,并充值 USDC 后存入 Circle Gateway。可选设置包括 D20_NETWORK、D20_PAY_CHAIN、D20_WALLET_ADDRESS、D20_CIRCLE_CLI、D20_DAILY_LIMIT_USDC 和 D20_MCP_HOME。需要访问 D20DAO API 的网络连接。建议调高客户端的工具超时时间。
安装前请注意
每次抽取从已充值的 Circle 代理钱包扣除 0.05 USDC,会花费真实资金;D20_DAILY_LIMIT_USDC 限制每日支出,设为 0 可关闭付费抽取。服务器使用你的 Circle 会话运行,由 CLI 签名付款,但自身不持有密钥。draw 带有副作用,客户端可能先询问再执行。若结果显示 charged 为 unknown,不要再次抽取,应通过 get_result 或钱包核对。若 CLI 报告了意外的收款方,halt.json 会停止付费抽取。

安装

在 SourceWeft 中

  1. 打开 控制台中的 D20DAO Verifiable Randomness,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

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

  1. 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.

  2. Funds. Fund the wallet with USDC and deposit some into Circle Gateway, for example on Arc:

    bash
    circle gateway deposit --chain ARC --method direct --amount 1 --address <wallet>

    Arc, Polygon, Avalanche, Base, Arbitrum, Optimism, Unichain and Ethereum balances all work.

  3. Server. Add it to your client.

    Claude Code:

    bash
    claude mcp add d20dao -- npx -y @d20dao/[email protected]

    Claude Desktop, Cursor and others (mcpServers in the client's MCP config):

    json
    { "mcpServers": { "d20dao": { "command": "npx", "args": ["-y", "@d20dao/[email protected]"] } } }

    On Windows, use "command": "cmd" with "args": ["/c", "npx", "-y", "@d20dao/[email protected]"] if the client cannot start npx directly. 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

ToolCostDoes
draw0.05 USDCraw, coinFlip, dice (up to 128), range, chooseOne, chooseMany, shuffle (up to 256 items). Returns the result with request, fulfillment and proof links.
get_resultfreeReads a draw by paymentId or a request by requestId.
setup_statusfreeChecks 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

VariableDefault
D20_DAILY_LIMIT_USDC1Spending cap per UTC day, shared by every server process of the user. 0 turns paid draws off.
D20_NETWORKmainnettestnet uses the Arc Testnet API and a testnet CLI login (circle wallet login <email> --testnet).
D20_PAY_CHAINfirst fundedCircle CLI chain code to pay from, such as ARC or BASE.
D20_WALLET_ADDRESSfirst agent walletAgent wallet to pay from.
D20_CIRCLE_CLIcircle on PATHPath to the CLI's dist/index.js.
D20_MCP_HOME~/.d20dao-mcpWhere 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_TERMS is kept out of the CLI it runs, and DO_NOT_TRACK is set so your item labels stay out of the CLI's telemetry.
  • It pays only api.d20dao.org (or api-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 delete halt.json from 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: false only when that is known. When it says unknown, do not draw again; check with get_result or the wallet.
  • draw is 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

来源:README.md,提交 0541b0a

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.1.2最新Oct 9, 2026
  2. v0.1.1Oct 9, 2026
  3. v0.1.0Sep 20, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分