Get the FREE Ultimate OpenClaw Setup Guide →

mcp-rando

MCP server for generating random numbers, strings, diceware passphrases and other resources

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hesreallyhim-mcp-rando-server node server.js

How to use

mcp-rando is an MCP server that provides cryptographically secure random values and randomized resources over a stdio transport. It leverages Node.js's crypto module to generate secure numbers, strings, UUIDs, raw bytes, diceware passphrases, and more, exposing a suite of tools (nine in total) and several dynamic or static resources. Clients communicate using the standard MCP tool and resource invocation patterns, such as calling a tool by name with the appropriate arguments or reading a resource URI. The server is designed to operate entirely through stdio, meaning data can be exchanged with MCP clients without leaving the host machine, which can help preserve confidentiality for sensitive operations. This makes it suitable for scenarios like secure randomization in test environments or privacy-conscious utilities, though the project notes indicate it has not been tested in production for security-critical uses.

Typical capabilities include: random-number for secure integers within a range, random-decimal for precise floating-point values, random-string for customizable random strings, roll-dice for dice-rolling with modifiers, and generate-uuid for cryptographically secure UUIDs. There are also resources accessible via URIs (e.g., random://facts/numbers and wordlist://{filename}) and prompts to generate creative or security-focused content. Example tool calls demonstrate how to request a batch of random numbers, generate a password-like string, or create a set of diceware passphrases, all through the MCP protocol payloads.

To use the server, connect with an MCP client that supports stdio transport, then call tools by name with the appropriate arguments as shown in the usage examples. For instance, you can request five random numbers between 1 and 100, generate a 16-character alphanumeric random string, or roll three six-sided dice with a modifier. You can also fetch resource data or prompt-based content using the resource and prompts endpoints described in the README examples.

How to install

Prerequisites:

  • Node.js 18+ (and npm)
  • Internet access for the initial npm install

Installation steps:

  1. Clone the repository or download the source code to your environment.
  2. Install dependencies: npm install
  3. Start the server: npm start
  4. (Optional) Run in development mode with auto-reload if provided: npm run dev

Notes:

  • The server runs via a standard Node.js execution path and is designed to communicate over stdio with MCP clients.
  • If you modify code or want to run directly without npm scripts, ensure you start the main server file (e.g., node server.js) from the repository root or adjust the command path accordingly.

Additional notes

Tips and considerations:

  • The server uses cryptographic randomness provided by Node's crypto module (randomInt, randomBytes, randomUUID) for its tools, so results are suitable for security-sensitive operations in tested environments.
  • The README explicitly states the server has not been tested in production for security-critical applications; perform thorough testing before any security-sensitive deployment.
  • The server communicates over stdio; ensure your MCP client complies with stdio transport expectations.
  • If you need to customize behavior or expose additional environment variables (e.g., logging level, resource access controls), consider adding env vars in the mcp_config under the server entry's env object.
  • For resource access, you can use URIs like random://facts/numbers or wordlist://<filename> to fetch data as part of your MCP client workflows.
  • If you run into issues, verify Node.js version compatibility, ensure dependencies are installed, and check for any environment-specific constraints (permissions, file paths).

Related MCP Servers

Sponsor this space

Reach thousands of developers