What is Essential random number generation utilities from the Python standard library.?
This MCP server provides 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.
Documentation
Random Number MCP
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.
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
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
uv build
# Test installation
uv run --with dist/*.whl random-number-mcp
Release Checklist
Update Version:
Increment the version number in pyproject.toml and src/__init__.py.
Update Changelog:
Add a new entry in CHANGELOG.md for the release.
Draft notes with coding agent using git diff context.
```
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:
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