utilities
Generate cryptographically secure random numbers with customizable ranges, types, and distributions
While you can view all details here, using this MCP server's API requires a Enterprise subscription. API calls with FREE plan keys will return an access error.
View Pricing PlansSimulate coin flips with cryptographic randomness.
Generate cryptographically secure random boolean values.
Generate cryptographically secure random decimal numbers with configurable precision.
Generate cryptographically secure random integers within a specified range. Supports unique values, sorting, and multiple statistical distributions.
Generate a sequence of numbers with optional shuffling.
Simulate rolling dice with customizable sides and count.
Add the Random Number Generator MCP server to your MCP client configuration:
{
"mcpServers": {
"random-number-generator": {
"command": "curl",
"args": [
"-X", "POST",
"https://apistack.online/api/mcp/utilities/random-number-generator/sse",
"-H", "Content-Type: application/json",
"-H", "Authorization: Bearer YOUR_API_KEY",
"--data-raw", "@-"
],
"transport": "sse"
}
}
}
Replace YOUR_API_KEY with your APIStack API key from the Dashboard.
// Generate 10 unique random integers between 1 and 100
const result = await mcpClient.callTool('generate_random_integer', {
min: 1,
max: 100,
count: 10,
unique: true,
sorted: true,
includeStatistics: true
});
// Roll 3 twenty-sided dice (D20) 5 times
const result = await mcpClient.callTool('roll_dice', {
sides: 20,
diceCount: 3,
count: 5,
includeStatistics: true
});
// Generate 5 random decimals with 4 decimal places
const result = await mcpClient.callTool('generate_random_decimal', {
min: 0,
max: 1,
count: 5,
decimalPlaces: 4,
distribution: 'normal'
});
// Flip 100 coins and get statistics
const result = await mcpClient.callTool('flip_coin', {
count: 100,
includeStatistics: true
});
// Random Number Generator MCP Client Example
const response = await fetch('https://apistack.online/api/mcp/utilities/random-number-generator/sse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'req-1',
method: 'tools/call',
params: {
name: 'generate_random_integer',
arguments: {
min: 1,
max: 100,
count: 10,
unique: true,
includeStatistics: true
}
}
})
});
const result = await response.json();
console.log(result);
# Random Number Generator MCP Client Example
import requests
response = requests.post(
'https://apistack.online/api/mcp/utilities/random-number-generator/sse',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'jsonrpc': '2.0',
'id': 'req-1',
'method': 'tools/call',
'params': {
'name': 'roll_dice',
'arguments': {
'sides': 6,
'diceCount': 2,
'count': 10,
'includeStatistics': True
}
}
}
)
result = response.json()
print(result)
# Random Number Generator MCP Client Example
curl -X POST https://apistack.online/api/mcp/utilities/random-number-generator/sse \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": "req-1",
"method": "tools/call",
"params": {
"name": "flip_coin",
"arguments": {
"count": 50,
"includeStatistics": true
}
}
}'
// Generate random decimals with normal distribution
const response = await fetch('https://apistack.online/api/mcp/utilities/random-number-generator/sse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 'req-2',
method: 'tools/call',
params: {
name: 'generate_random_decimal',
arguments: {
min: 0,
max: 100,
count: 1000,
decimalPlaces: 2,
distribution: 'normal',
includeStatistics: true
}
}
})
});
const result = await response.json();
console.log(result);
Add this configuration to your MCP client:
Note: Replace "YOUR_API_KEY" with a valid Enterprise API key. FREE plan keys will receive access errors.
{
"mcpServers": {
"random-number-generator-utilities": {
"command": "curl",
"args": [
"-X",
"POST",
"https://apistack.online/api/mcp/utilities/random-number-generator/sse",
"-H",
"Content-Type: application/json",
"-H",
"Authorization: Bearer YOUR_API_KEY",
"--data-raw",
"@-"
],
"transport": "sse"
}
}
}Use the MCP configuration above in your AI client, or test the underlying APIs in our playground.
API playground requires a Enterprise subscription for access.