BitRaffleDocs

Draw service

AI agents (MCP)

Any MCP client, such as Claude, ChatGPT, Cursor or your own agent, can run a provably-fair draw and hand back a proof anyone can check.

An agent can pick winners at random, but it cannot prove it did not re-roll until it liked the answer. The hosted MCP endpoint gives it the draw service's commit-then-reveal draw as one tool call.

Endpointhttps://www.bitraffle.io/mcp (MCP Streamable HTTP, stateless)
AuthAuthorization: Bearer <secret key>, on a key with the draws:mcp scope.
Price$0.01 per draw, from the same prepaid USDC balance as the API.

Connect

claude mcp add --transport http bitraffle https://www.bitraffle.io/mcp \
  --header "Authorization: Bearer $BITRAFFLE_SECRET_KEY"
{
  "mcpServers": {
    "bitraffle": {
      "type": "http",
      "url": "https://www.bitraffle.io/mcp",
      "headers": {
        "Authorization": "Bearer <your draws:mcp key>"
      }
    }
  }
}

Tools

ToolWhat it does
run_fair_drawPicks pick distinct winners from candidates, with an optional clientSeed. Returns the winners, the proof and where to verify it.
draw_accountThe price per draw, your balance and draw count, and where to send USDC.
credit_depositCredits a USDC deposit by its transaction hash, after an on-chain check.

Each proof checks out the same way as an API draw. See Verifying a draw.