$ urandom-mcp | stdio▍
MCP server.
Cryptographically secure randomness and post-quantum keys for AI agents — over stdio JSON-RPC, no network port. Every tool runs locally; the only egress is opt-in.
Connect
// add to your MCP client config (e.g. mcpServers)
{
"mcpServers": {
"urandom": {
"command": "urandom-mcp",
"env": { "URANDOM_CHECK_ENABLE": "0" }
}
}
}
Transport is stdio (JSON-RPC 2.0); there is no port to open and nothing to TLS.
Build it with cargo run -p urandom-mcp. The server advertises its tools and usage instructions on connect.
The ten tools
- random_bytes — N cryptographically secure random bytes, hex-encoded.
- random_int — uniform integer in an inclusive [min, max] range.
- uuid — a random v4 UUID.
- password — a high-entropy password of a given length.
- entropy_health — sample entropy, run SP 800-90B health tests (RCT + APT).
- mlkem768_keypair — ML-KEM-768 (FIPS 203) keypair, hex.
- mldsa65_keypair — ML-DSA-65 (FIPS 204) signing keypair, hex.
- mldsa65_sign — sign a message with an ML-DSA-65 secret key.
- mldsa65_verify — verify an ML-DSA-65 signature.
- check_key_exposure — privately check a key against the seen-key registry (verifiable OPRF). The only networked tool — disabled unless
URANDOM_CHECK_ENABLE=1.
Safety model
No inbound network surface. Nine tools are pure-local computation.
check_key_exposure is the sole
egress: it stays disabled until URANDOM_CHECK_ENABLE=1, targets URANDOM_API_URL
(default https://urandom.ai), and sends only a blinded point — never the key. Secret material is
zeroized in memory and the whole workspace is forbid(unsafe_code).
See the check protocol.