Essential random number generation utilities from the Python standard library
random-number-mcp (io.github.zazencodes)
The io.github.zazencodes/random-number-mcp MCP server provides essential random number generation utilities based on the Python standard library. It supports pseudorandom and cryptographically secure operations for integers, floats, weighted selections, list shuffling, and secure token generation.
🛠️ Key Features
Random number generation utilities from the Python standard library
Pseudorandom operations for integers and floats
Cryptographically secure operations for integers and floats
Weighted selections
List shuffling
Secure token generation
🚀 Use Cases
Generate integers and floats with either pseudorandom or cryptographically secure approaches
Perform weighted selections
Shuffle lists reproducibly for randomized workflows
Produce secure tokens for application use
⚡ Developer Benefits
Uses standard-library-based random number generation strategies
Supports both secure and non-secure randomization needs
Covers common randomization tasks: selection, shuffling, token creation
⚠️ Limitations
Repository readme excerpt references an alternate “agent skill” implementation via random-number-skills rather than additional MCP-server variants.
Essential random number generation utilities from the Python standard library, including pseudorandom and cryptographically secure operations for integers, floats, weighted selections, list shuffling, and secure token generation.
Looking for the agent skill version? random-number-skills implements the same random number generation strategy as an agent skill instead of an MCP server.
This package provides both standard pseudorandom functions (suitable for simulations, games, etc.) and cryptographically secure functions (suitable for tokens, keys, etc.):
Standard functions (random_int, random_float, random_choices, random_shuffle): Use Python's random module - fast but not cryptographically secure
Secure functions (secure_token_hex, secure_random_int): Use Python's secrets module - slower but cryptographically secure
# Clone the repository
git clone https://github.com/example/random-number-mcp
cd random-number-mcp
# Install dependencies
uv sync --dev
# Run tests
uv run pytest
# Run linting
uv run ruff check --fix
uv run ruff format
# Type checking
uv run mypy src/
Note: Replace <path_to_your_repo>/random-number-mcp with the absolute path to your cloned repository.
Building
bash
# Build package
uv build
# Test installation
uv run --with dist/*.whl random-number-mcp
Release Checklist
Update Version:
Increment the version number in pyproject.toml, src/random_number_mcp/__init__.py, and server.json.
Update Changelog:
Add a new entry in CHANGELOG.md for the release.
Draft notes with coding agent using git diff context.
code
Update the @CHANGELOG.md for the latest release.
List all significant changes, bug fixes, and new features.
Here's the git diff:
[GIT_DIFF]
Commit along with any other pending changes.
Create GitHub Release:
Draft a new release on the GitHub UI.
Tag release using UI.
The GitHub workflow will automatically build and publish the package to PyPI.
Testing with MCP Inspector
For exploring and/or developing this server, use the MCP Inspector npm utility:
bash
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Run local development server with the inspector
npx @modelcontextprotocol/inspector uv run random-number-mcp
# Run PyPI production server with the inspector
npx @modelcontextprotocol/inspector uvx random-number-mcp