Skip to content
MCPBytes
AvailableUtilities

Random Numbers

Physical randomness. One tool call.

  • API
  • MCP
1 credit per jobMCP tool: get_random_numbers
Exampleget_random_numbers

Before

count, min, max10 integers from 1 to 6

After

[5, 4, 3, 6, 1, 3, 2, 5, 2, 6]
  • numbers.json
  • numbers.txt
Use a new request key for a fresh draw. Reuse a key to retrieve the same result.

What it does

Why reach beyond rand()?

A seeded generator such as rand() follows a repeatable sequence. MCPBytes draws fresh randomness from physical hardware for each new job. Use it when you want an external source of chance to pick a creative direction, break a tie, roll dice, sample candidates or supply random inputs to simulations. Your agent sets the count and range and gets integers back through MCP or REST, with no local random generator to configure. Repeated values are allowed. Not for cryptographic secrets.

Randomness
Hardware-generated; fresh draws for new jobs
Input
count, min and max; no file
Outputs
numbers.json and numbers.txt
Range
Signed 32-bit bounds, min less than max
Replay
Reuse a request key to retrieve the same draw

NIST Randomness validation

14 test groups passed every check in our NIST test run on one million output bits. Explore the complete results and what each check means.

View test results

Pricing

Pay per job, in credits.

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

Pricing details

Start free

Available now

100free 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
  • A job that fails costs nothing

Price per job

Random Numbers

Per job
1 credit

Limits

Numbers
1–1,000 per job
At a time
1 job
Uploads
Up to 50 MB
Results
Kept for 24 hours

API

Call it from code or from an agent.

The same tool runs over the REST API and as MCP tools. One API key works for both.

Start a job

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

RequestcURL
curl https://api.mcpbytes.com/v1/tools/get_random_numbers/jobs \
  -H "Authorization: Bearer $MCPBYTES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"options":{"count":10,"min":1,"max":6},"idempotency_key":"dice-example-001"}'
Response200 OK · trimmed
{
  "id": "j_vwzd6fj7kgy9c4xzn3d3nd922t",
  "tool": "get_random_numbers",
  "status": "succeeded",
  "input_kind": "parameters",
  "options": {
    "count": 10,
    "min": 1,
    "max": 6
  }
}

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_vwzd6fj7kgy9c4xzn3d3nd922t",
  "tool": "get_random_numbers",
  "status": "succeeded",
  "result": {
    "numbers": [
      5,
      4,
      3,
      6,
      1,
      3,
      2,
      5,
      2,
      6
    ],
    "count": 10,
    "min": 1,
    "max": 6,
    "files": [
      {
        "name": "numbers.json"
      },
      {
        "name": "numbers.txt"
      }
    ]
  }
}

MCP

Connect once. Your agent calls get_random_numbers 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
get_random_numbers
Returns count random integers between min and max, inclusive, in numbers.json, with numbers.txt inline. Repeated values are allowed. A failed job is refunded. Not for cryptographic secrets. Costs 1 credits per job.
create_upload
Returns a one-hour URL to PUT a local file to; then call the tool with the upload_id.
get_job
Status and results of a job; waits up to wait_seconds for it to finish.
cancel_job
Cancel a queued CPU 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.

From API key to first call in minutes.

Sign in with GitHub, create a key, and point your agent or code at MCPBytes. Your first 100 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"