Integer distributions
random_int
Generate integers from uniform, Bernoulli, binomial, or Poisson distributions.
MCP server · Cloudflare Workers
Move random decisions out of the language model. random-mcp generates integer and real-valued distributions, weighted choices, and repeated samples using the Web Crypto API.
Tools
Three tools cover common randomization tasks. Every tool supports batched results through the count field.
Integer distributions
Generate integers from uniform, Bernoulli, binomial, or Poisson distributions.
Real-valued distributions
Generate floating-point values from uniform, normal, lognormal, or exponential distributions.
Selection
Select one or more strings, with optional weights and sampling with or without replacement.
Why random-mcp
A model may favor familiar-looking values when asked to choose randomly. This server performs the random operation outside the model so agents can rely on an explicit, auditable tool call.
Integer generation uses rejection sampling to prevent modulo bias, so no value becomes more likely merely because the source range does not divide evenly.
Choose uniform, Bernoulli, binomial, or Poisson distributions for integers, and uniform, normal, lognormal, or exponential distributions for real values.
Connect
Open your client's MCP connection settings and choose a custom Streamable HTTP server.
Use the MCP endpoint shown above and select OAuth as the authentication method.
Approve the requested access, complete GitHub sign-in, and enable the tools you want to use.