generate_basic_randomLABSCO SUMMARY
Verifiable randomness, for draws someone else has to be convinced by.
Every result derives from a blockchain hash instead of a local PRNG, which is what matters when a participant asks how they know the giveaway was not rigged — the block is public and the draw can be recomputed. generate_random_weighted is the one to reach for when the odds are deliberately uneven; it takes weights on a 0-1000 scale rather than percentages.
What it is
A random-element service that takes its entropy from EVM block hashes rather than a local generator: single integers, arrays, weighted picks, distribution samples and randomised feature sets.
What you get
- A random integer between a minimum and maximum you set, both inclusive
- An array of random integers, with the length and the range yours to choose
- A weighted pick from a list of options, weights given on a 0-1000 scale
- Samples drawn from a probability distribution
- Randomised feature sets, for generating several varied attributes at once
- An optional salt on every call, mixed in alongside the block hash
- A blockchain hash as the entropy source, so a draw can be re-derived from the block it came from
Requirements
Python. Install from the repository with pip install -e ., then launch it with uv pointed at the project directory.
Setup effort
Build from source — clone the repository, then follow the project's own run instructions
USE CASES
Picking a giveaway winner people will accept
Draw one integer in the entrant range, with the block hash as the entropy anyone can check afterwards.
Running a prize draw where the odds are not equal
Give the options and their weights on the 0-1000 scale and get back the selection.
Generating a batch of test values in one call
Ask for an array of a set length and range instead of calling for one number at a time.
Sampling from a distribution rather than a flat range
Draw values shaped by a probability distribution, for simulations where uniform is the wrong model.
Rolling randomised attributes for game items
Generate a feature set in one call so several attributes come from the same verifiable draw.
10 tools
Listed in project docs. Your client may show a different list.
generate_random_arraygenerate_random_weightedgenerate_random_featuregenerate_distributiongenerate_random_eventgenerate_random_seedshuffle_arraygenerate_coordinategenerate_rarityBEFORE YOU INSTALL
What to know first
Tools you get
10 tools named in the project's documentation.
Requires
uv on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uv --directory local_repo_directory/zxl-mcp-server run main.pyMCP Clients
Cursor
{
"mcpServers": {
"random-web3-mcp": {
"command": "uv",
"args": [
"--directory",
"local_repo_directory/zxl-mcp-server",
"run",
"main.py"
]
}
}
}