Skip to main content
Glama

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.

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:

    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:

    claude mcp add d20dao -- npx -y @d20dao/mcp@0.1.0

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

    { "mcpServers": { "d20dao": { "command": "npx", "args": ["-y", "@d20dao/mcp@0.1.0"] } } }

    On Windows, use "command": "cmd" with "args": ["/c", "npx", "-y", "@d20dao/mcp@0.1.0"] 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.

Related MCP server: Random-Generator

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_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; see verification and the agent API guide.

License

MIT

Available Tools

3 tools
drawDraw verifiable randomness (0.05 USDC)A
Destructive

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

ParametersJSON Schema
NameRequiredDescriptionDefault
maxNorange only, required: highest value, inclusive, at least min.
minNorange only, required: lowest value, inclusive.
seedNoContext bound on chain to this draw, such as "raffle-7 round 2" (at most 64 bytes). Use a new seed for each separate draw. To commit to an item list, put its hash here.
countNodice: rolls, 1 to 128 (default 1). chooseMany: distinct picks, required.
itemsNochooseOne, chooseMany, shuffle: labels to draw from (1 to 256, each at most 200 bytes). Only their count is proven; the answer adds picked. Give this or population.
sidesNodice only, required: faces per die, at least 2.
operationYesraw: one 256-bit word. coinFlip: 0 (tails) or 1 (heads). dice: count rolls of 1 to sides. range: one integer from min to max. chooseOne: one zero-based index. chooseMany: count distinct indices. shuffle: every index once.
populationNochooseOne, chooseMany, shuffle: how many to draw from, 1 to 256. Give this or items.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses materially important behavior: it costs 0.05 USDC from the user's Circle Agent Wallet, opens an on-chain VRF request, has a five-minute free-repeat window, is subject to a daily spending cap, and returns request/fulfillment/proof links. This is far richer than the annotations alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but well-structured: the first sentence gives purpose and supported operations, and the following sentences add payment, repeat-behavior, and cap caveats without filler. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a paid, multi-mode VRF tool with no output schema, the description covers purpose, operation variants, payment source, cost, repeat behavior, seed semantics, failure mode due to spending cap, and returned proof links. An agent has enough context to invoke it correctly and know what to expect.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents every parameter with 100% coverage, so the baseline is 3. The description adds a small but useful extra semantic layer—the seed is bound to the payment on chain, and one call returns every value of its operation—though most parameter meaning correctly lives in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies a clear action—'Draw verifiable randomness'—and enumerates the concrete operation families (dice, coin flip, range, one/several winners, shuffle). It also states that the tool opens a VRF request and returns proof links, which clearly distinguishes it from the sibling get_result and setup_status tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives strong operational guidance: ask once and never repeat a call to re-roll, identical calls within five minutes return the earlier draw without paying, and separate draws need separate seeds. It references setup_status for the spending cap, though it could be more explicit about when to prefer get_result for fetching past results.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_resultRead a draw (free)A
Read-onlyIdempotent

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

ParametersJSON Schema
NameRequiredDescriptionDefault
paymentIdNoThe paymentId of a paid draw (0x and 64 hex characters).
requestIdNoA request id this API opened, as a decimal string.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark it read-only, idempotent, and non-destructive; the description adds beyond that by warning that chosen items are returned as indices, not labels, and must be applied to the original list. This is useful behavioral context. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact, purposeful sentences: purpose, when-to-use, and response interpretation. No filler; each sentence earns its place and the main action is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the core read workflow, return format, and the pending/unanswered use case, and annotations cover safety. It stops short of a 5 because it doesn't explicitly state that paymentId and requestId are mutually exclusive or what happens if neither is provided, which is relevant given both params are optional in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents paymentId and requestId. The description adds the 'or' relationship and maps each ID to its resource type, but doesn't add format or additional semantics beyond the schema, so a 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action ('Read') with the exact resources ('paid draw by paymentId' or 'request by requestId') and the workaround ('for free'). It also clarifies the outcome ('finish a draw that came back pending or unanswered'), making it easy to differentiate from a sibling like draw that creates/executes draws.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear trigger for using the tool: when a draw came back pending or unanswered. It doesn't explicitly name excluded alternatives or contrast with draw/setup_status, so it earns a 4 rather than a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

setup_statusCheck payment setup (free)A
Read-onlyIdempotent

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the tool read-only, idempotent, open-world, and non-destructive. The description adds meaningful behavior context by naming the exact checks performed (Circle CLI, login, agent wallet, Gateway balance, today's spending) and the return value ('the next setup step'). It does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two compact sentences with no filler. It front-loads the action, lists the checked areas, and ends with the return value. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless, read-only status tool with strong annotations, the description is complete enough: it names what is checked, what the result means, and what is returned. The lack of an output schema is mitigated by the explicit 'Returns the next setup step' statement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so parameter semantics are trivially satisfied and the input schema is complete. The description still contributes by clarifying what the caller receives in return, which is useful given the absence of an output schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Check whether draws can be paid') and a clear resource ('payment setup'), then enumerates the concrete components it inspects. It is easily distinguishable from siblings draw and get_result, which clearly perform execution and result retrieval rather than setup validation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used to verify payment readiness before draws, but it does not explicitly state when to use it versus alternatives or mention any exclusions. No sibling comparison is provided, so the agent must infer the proper usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observeddraw
    • First observedget_result
    • First observedsetup_status

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool addresses a distinct stage: draw executes a randomness request, get_result retrieves a prior request or payment, and setup_status reports payment readiness. There is no meaningful overlap or ambiguity between them.

Naming Consistency4/5

get_result and setup_status follow a clear verb_noun pattern and draw is a concise imperative action. The only slight inconsistency is that draw lacks the prefixed/object style of the other two, but the intended action is still obvious.

Tool Count5/5

Three tools is well-scoped for a focused randomness service: one action, one retrieval, and one status/readiness check. Each tool earns its place without redundancy.

Completeness4/5

The core lifecycle is covered: perform randomness, retrieve results, and verify ability to pay. A minor gap is the lack of a listing/history mechanism for past draws, but the described workflow is otherwise functional.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Production-ready MCP server that provides LLMs with essential random generation abilities, including random integers, floats, choices, shuffling, and cryptographically secure tokens.
    7
    178 PyPI
    51
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    An encrypted and secure random number generation server that complies with the MCP protocol, suitable for AI applications, LLMS, and other systems that require high-quality random numbers.
    7
    2
    Apache 2.0