Random MCP logo

Random MCP

Generates random integers, floating-point samples, weighted choices, and probability-distribution values through MCP.

Install Random MCP

Pick your client, then add it in one click or paste the config.

SSE (Remote)
Server URL
https://random-mcp.eldesh-tools.workers.dev/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

The random-mcp MCP server exposes external random-value generation to MCP clients instead of relying on model-selected values. It provides tools for integers, floating-point samples, weighted or unweighted choices, and several probability distributions. The official deployment uses Streamable HTTP at a public endpoint with OAuth 2.1 and GitHub authentication. Reach for it when an agent needs reproducible tool-mediated random selection rather than model-generated approximations.

Use cases

  • Generate integer samples for agent workflows
  • Draw values from probability distributions
  • Select weighted candidates from a list
  • Run random selection without replacement
  • Test MCP tool calls through a local Worker

Key features

  • Uniform and distribution-based integer sampling
  • Floating-point sampling from four distributions
  • Weighted or unweighted candidate selection
  • Sampling with or without replacement
  • Streamable HTTP MCP endpoint
  • OAuth 2.1 with GitHub authentication

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

5/5 checks healthy over the last 35d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9/10/2026 via OSV.dev · https://random-mcp.eldesh-tools.workers.dev/mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit1mo agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Random MCP works

What random-mcp MCP server does

The random-mcp MCP server gives MCP clients three tools for generating values outside the language model’s own output process. random_int returns integer arrays, random_double returns floating-point arrays, and random_choice selects values from a supplied list. The tools are intended for random selection, sampling, lotteries, shuffling-related workflows, and other tasks where the agent should not choose the result internally.

Randomness comes from the Web Crypto API. Integer generation uses rejection sampling to avoid modulo bias. The project states that these APIs are not intended for creating cryptographic keys or authentication tokens.

How it works

The official service accepts Streamable HTTP connections at https://random-mcp.eldesh-tools.workers.dev/mcp. MCP authorization uses OAuth 2.1, while user authentication is handled through GitHub OAuth. The GitHub permission requested is read:user; an authorized MCP client receives an access token with the mcp:use scope.

random_int supports uniform, Bernoulli, binomial, and Poisson distributions. random_double supports uniform, normal, lognormal, and exponential distributions. random_choice accepts candidate strings, optional relative weights, a selection count, and a replacement setting. Results are returned in a values array.

Integer and floating-point tools accept between 1 and 1,000 requested values. Binomial requests limit trials * count to 100,000, while Poisson requests limit lambda * count to 10,000. Choice lists may contain 1 to 1,000 strings. Without-replacement selection cannot request more items than available candidates, or more than the number of candidates with positive weights when weights are supplied.

Setup and configuration

For the hosted instance, configure an MCP client with the official /mcp URL and complete the OAuth approval and GitHub sign-in flow. The README specifically documents connection steps for Notion AI and testing with MCP Inspector.

To run a private deployment, use Cloudflare Workers, a Cloudflare account, a KV namespace for temporary OAuth state, and a GitHub OAuth App. The OAuth callback must point to the deployed Worker’s /callback path. The random-mcp MCP server expects GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, and COOKIE_ENCRYPTION_KEY; the first two identify the OAuth App and the last protects cookies. GLAMA_MAINTAINER_EMAIL is optional for the local Glama metadata check.

Local development requires Node.js 22.19.0 or later and npm. Install dependencies with npm install, place local values in .dev.vars, and start the Worker with npm run dev. The local MCP endpoint is normally http://localhost:8787/mcp. A custom deployment can be published with npm run deploy after configuring the Worker name, OAuth App, KV binding, and Cloudflare secrets.

Tools and capabilities

  • Generate uniform, Bernoulli, binomial, or Poisson integer samples.
  • Generate uniform, normal, lognormal, or exponential floating-point samples.
  • Select candidates with equal or relative weighted probability.
  • Select with or without replacement.
  • Request batches of values through each sampling tool.

Limitations and notes

The random-mcp MCP server does not replace a cryptographic randomness service. Tool inputs must meet the documented bounds, including distribution-specific limits and the restrictions on weighted sampling without replacement.

Use the Inspector CLI or another client method when testing those tools. If an agent must always use this service for random operations, its instructions should explicitly prohibit internal randomization and require an error report when the server is unavailable.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Random MCP

random-mcp is an MCP server that connects MCP clients to external random-value generation through a Cloudflare Workers endpoint. Its main tools are random_int for integer distributions, random_double for floating-point distributions, and random_choice for weighted or unweighted selection with optional replacement. It uses Web Crypto API randomness rather than model-generated values.

Use the hosted MCP endpoint without installing the server, or clone and run the project locally with Node.js 22.19.0 or later, npm, `npm install`, and `npm run dev`. A private deployment also needs Cloudflare Workers, a KV namespace, and a GitHub OAuth App.

Set the client’s MCP URL to `https://random-mcp.eldesh-tools.workers.dev/mcp` and complete OAuth approval followed by GitHub authentication. For a local instance, use `http://localhost:8787/mcp`; for a private deployment, use its deployed `/mcp` URL.

It supports uniform, Bernoulli, binomial, and Poisson distributions for integers, plus uniform, normal, lognormal, and exponential distributions for floating-point values. Candidate selection is handled separately by `random_choice`, with optional relative weights.

No, it is not intended for cryptographic key or authentication-token generation. Its randomness uses the Web Crypto API, but the project specifically limits the intended use to random values, samples, and selections exposed through MCP tools.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRandom MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/random-mcp?style=directory)](https://allmcps.com/mcp/random-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/random-mcp"><img src="https://allmcps.com/api/badge/random-mcp?style=directory" alt="Random MCP on AllMCPs" /></a>