Skip to content
MCPBytes
AvailableUtilities

Run a fair draw

Draw the winners. Show your work.

  • API
  • MCP
10 credits per jobMCP tool: run_draw
Examplerun_draw

Before

12 entriespick 2 winners and 1 alternate

After

Winners ticket-01 and ticket-09; alternate ticket-06
  • public page
  • draw.json
  • draw.txt
The real draw's page: mcpbytes.com/draws/d_twh8fkzwkksxh7y6ykpfexdc4v

What it does

A draw nobody has to take on faith.

Give your agent a list and how many winners you need. The list is locked before any randomness exists, the randomness comes from physical hardware, and the result gets a permanent public page. Anyone who opens it sees the winners, and their own browser recomputes the result from the signed receipt. Schedule the reveal for later and the page is live from the start, with its randomness already fixed. Keep the list private, or publish it so anyone can check every name.

Randomness
Hardware-generated, fresh for each draw
Input
entries (one per line), title, winners and alternates or a shuffle; no file
Outputs
A public page, the signed receipt (draw.json) and draw.txt
Proof
Entries locked first; Ed25519-signed receipt; recomputable by anyone
Schedule
Reveal now, or at a time up to 30 days ahead

Locked before the draw.

The list is fingerprinted and stored before any randomness exists. No name slips in or out.

A page anyone can check.

Every draw gets a permanent page. Visitors' own browsers recompute the result from its signed receipt.

Chance from the physical world.

The randomness comes from hardware, and a scheduled draw publishes its fingerprint before the reveal.

Pricing

Pay by the job.

Costs 10 credits per job. A job that fails costs nothing.

Pricing details

Start free

Available now

300free credits when you sign up

  • Every MCPBytes tool, one credit balance
  • Sign in with GitHub or email, no card required
  • Each tool states its price before you run it
  • Failed API jobs cost nothing

Price per job

Run a fair draw

Per job
10 credits

Limits

Entries
2–10,000 per draw, unique, one per line
Winners
1–1,000, plus up to 100 alternates
At a time
1 job
Results
24 hours by default

API

Your agent or your code.

Connect your agent and it can use this tool right away, or call it from your own code. One key works for both.

Start a job

Send the required parameters as JSON. Options such as entries go in the options object.

RequestcURL
curl https://api.mcpbytes.com/v1/tools/run_draw/jobs \
  -H "Authorization: Bearer $MCPBYTES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"idempotency_key":"giveaway-example-001",
  "options":{"title":"October giveaway",
  "count":2,"alternates":1,"publish_entries":true,
  "entries":"ticket-01\nticket-02\nticket-03\nticket-04\nticket-05\nticket-06\nticket-07\nticket-08\nticket-09\nticket-10\nticket-11\nticket-12"}}'
Response200 OK · trimmed
{
  "id": "j_ms3h6bzdpe8d4g5skh96a531cy",
  "tool": "run_draw",
  "status": "succeeded",
  "input_kind": "parameters",
  "draw": {
    "id": "d_twh8fkzwkksxh7y6ykpfexdc4v",
    "status": "drawn",
    "receipt_url": "https://mcpbytes.com/draws/d_twh8fkzwkksxh7y6ykpfexdc4v",
    "draw_at": "2026-09-24T18:24:12.644Z"
  },
  "options": {
    "title": "October giveaway",
    "mode": "pick",
    "count": 2,
    "alternates": 1,
    "publish_entries": true,
    "entries_count": 12,
    "entries_sha256": "08b4ee8c7fa858181f549277d7bff2b65edd0baf252920884b0103272a5c587e",
    "draw_id": "d_twh8fkzwkksxh7y6ykpfexdc4v"
  }
}

Get the result

Poll until the status is final. Download files only after success.

RequestcURL
curl "https://api.mcpbytes.com/v1/jobs/$JOB_ID" \
  -H "Authorization: Bearer $MCPBYTES_API_KEY"
Response200 OK · trimmed
{
  "id": "j_ms3h6bzdpe8d4g5skh96a531cy",
  "tool": "run_draw",
  "status": "succeeded",
  "draw": {
    "id": "d_twh8fkzwkksxh7y6ykpfexdc4v",
    "status": "drawn",
    "receipt_url": "https://mcpbytes.com/draws/d_twh8fkzwkksxh7y6ykpfexdc4v",
    "draw_at": "2026-09-24T18:24:12.644Z"
  },
  "result": {
    "draw_id": "d_twh8fkzwkksxh7y6ykpfexdc4v",
    "status": "drawn",
    "title": "October giveaway",
    "receipt_url": "https://mcpbytes.com/draws/d_twh8fkzwkksxh7y6ykpfexdc4v",
    "draw_at": "2026-09-24T18:24:12.644Z",
    "files": [
      {
        "name": "draw.json"
      },
      {
        "name": "draw.txt"
      }
    ]
  }
}

MCP

Connect once. Your agent calls run_draw and gets the download URLs back. This endpoint has only this tool's family, which keeps your agent's tool list short; one endpoint has every tool.

Claude Code

The first form signs in through the browser when you run /mcp. In .mcp.json (project root), ${MCPBYTES_API_KEY} is read from the environment when Claude Code connects. Claude Code docs

claude mcp add --transport http mcpbytes \
  https://api.mcpbytes.com/mcp/random
Codex (CLI, IDE extension, ChatGPT desktop)

Codex reads the key from the environment variable each time it connects. The same table can go in ~/.codex/config.toml by hand; codex mcp add has no --header flag. Codex docs

codex mcp add mcpbytes --url https://api.mcpbytes.com/mcp/random \
  --bearer-token-env-var MCPBYTES_API_KEY
Cursor

~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project). Remote servers take no "type". Without the header, the client signs you in with GitHub or an email link (OAuth). Cursor docs

~/.cursor/mcp.json
{
  "mcpServers": {
    "mcpbytes": {
      "url": "https://api.mcpbytes.com/mcp/random",
      "headers": {
        "Authorization": "Bearer ${env:MCPBYTES_API_KEY}"
      }
    }
  }
}
11 more clients in the docs →
MCP tools
run_draw
Picks count winners (plus optional alternates) from entries, or shuffles them, using hardware randomness. The entries are locked before any randomness is drawn, and the result comes with a permanent public receipt (receipt_url) that anyone can use to recompute it. With draw_at, the page exists now and the result is revealed at that time. Returns draw.txt (inline) and the signed receipt, draw.json. Costs 10 credits per job. Requires idempotency_key; retain it when retrying the same request.
get_job
Status and results of a job; waits up to wait_seconds for it to finish.
cancel_job
Cancel a queued job or a workflow whose can_cancel is true; repeated calls never delete results.
list_jobs
Your most recent jobs, newest first.
read_job_file
Reads a text output (.txt .json .md .csv) of a succeeded job in chunks.
Full reference: inputs, options, outputs, limits and errors

Your first jobs are on us.

Sign in with GitHub or email, create a key and connect your agent. The first 300 credits are free.

# Sign in with GitHub when prompted
claude mcp add --transport http mcpbytes \
  https://api.mcpbytes.com/mcp

# Or use an API key
claude mcp add --transport http mcpbytes \
  https://api.mcpbytes.com/mcp \
  --header "Authorization: Bearer $MCPBYTES_API_KEY"