Random Generation logo

Random Generation

Community
turlockmike

Random Number and more generator (Includes UUID, numbers, password, dice, cards and more)

Publisherturlockmike
Repositorymcp-rand
LanguageTypeScript
Forks
6
Stars
3
Available tools
7
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Random Generation exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 7 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    3 stars and 6 forks from the linked repository.

MCP Rand

npm version License: ISC

A Model Context Protocol (MCP) server providing various random generation utilities, including UUID, numbers, strings, passwords, Gaussian distribution, dice rolling, and card drawing.

Installation

bash
npm install mcp-rand

Or install globally:

bash
npm install -g mcp-rand

Features

UUID Generator

  • Generates RFC 4122 version 4 UUIDs
  • Uses Node's native crypto module for secure random generation
  • No parameters required

Random Number Generator

  • Generates random numbers within a specified range
  • Configurable minimum and maximum values (inclusive)
  • Defaults to range 0-100 if no parameters provided

Gaussian Random Generator

  • Generates random numbers following a Gaussian (normal) distribution
  • Normalized to range 0-1
  • No parameters required

Random String Generator

  • Generates random strings with configurable length and character sets
  • Supports multiple character sets:
    • alphanumeric (default): A-Z, a-z, 0-9
    • numeric: 0-9
    • lowercase: a-z
    • uppercase: A-Z
    • special: !@#$%^&*()_+-=[]{};'"\|,.<>/?
  • Configurable string length (defaults to 10)

Password Generator

  • Generates strong passwords with a mix of character types
  • Ensures at least one character from each type (uppercase, lowercase, numbers, special)
  • Configurable length (minimum 8, default 16)
  • WARNING: While passwords are generated locally, it's recommended to use a dedicated password manager

Dice Roller

  • Roll multiple dice using standard dice notation
  • Supports notation like "2d6" (two six-sided dice), "1d20" (one twenty-sided die)
  • Returns individual rolls and total for each set of dice
  • Can roll multiple different dice sets at once (e.g., "2d6", "1d20", "4d4")

Card Drawer

  • Draw cards from a standard 52-card deck
  • Maintains deck state between draws using base64 encoding
  • Returns drawn cards and remaining deck state
  • Supports drawing any number of cards up to the deck size
  • Properly shuffles available cards before each draw

Usage

As a CLI Tool

bash
npx mcp-rand

Integration with MCP Clients

Add to your MCP client configuration:

json
{
  "mcpServers": {
    "mcp-rand": {
      "command": "node",
      "args": ["path/to/mcp-rand/build/index.js"],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

Example Usage

typescript
// Generate UUID
const uuid = await client.callTool('generate_uuid', {});
console.log(uuid); // e.g., "550e8400-e29b-41d4-a716-446655440000"

// Generate random number
const number = await client.callTool('generate_random_number', {
  min: 1,
  max: 100
});
console.log(number); // e.g., 42

// Generate Gaussian random number
const gaussian = await client.callTool('generate_gaussian', {});
console.log(gaussian); // e.g., 0.6827

// Generate random string
const string = await client.callTool('generate_string', {
  length: 15,
  charset: 'alphanumeric'
});
console.log(string); // e.g., "aB9cD8eF7gH6iJ5"

// Generate password
const password = await client.callTool('generate_password', {
  length: 20
});
console.log(password); // e.g., "aB9#cD8$eF7@gH6*iJ5"

// Roll dice
const rolls = await client.callTool('roll_dice', {
  dice: ['2d6', '1d20', '4d4']
});
console.log(rolls);
/* Output example:
[
  {
    "dice": "2d6",
    "rolls": [3, 1],
    "total": 4
  },
  {
    "dice": "1d20",
    "rolls": [4],
    "total": 4
  },
  {
    "dice": "4d4",
    "rolls": [2, 3, 2, 3],
    "total": 10
  }
]
*/

// Draw cards
const draw1 = await client.callTool('draw_cards', {
  count: 5
});
console.log(draw1);
/* Output example:
{
  "drawnCards": [
    { "suit": "hearts", "value": "A" },
    { "suit": "diamonds", "value": "7" },
    { "suit": "clubs", "value": "K" },
    { "suit": "spades", "value": "2" },
    { "suit": "hearts", "value": "10" }
  ],
  "remainingCount": 47,
  "deckState": "t//+///bDw=="
}
*/

// Draw more cards using previous deck state
const draw2 = await client.callTool('draw_cards', {
  count: 3,
  deckState: draw1.deckState
});
console.log(draw2);
/* Output example:
{
  "drawnCards": [
    { "suit": "diamonds", "value": "Q" },
    { "suit": "clubs", "value": "5" },
    { "suit": "spades", "value": "J" }
  ],
  "remainingCount": 44,
  "deckState": "l//+//zbDw=="
}
*/

Contributing

Please see CONTRIBUTING.md for development setup and guidelines.

License

ISC

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "mcp-rand": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-rand"
      ]
    }
  }
}

Available Tools

  • generate_uuid

    Generate a random UUID v4

  • generate_random_number

    Generate a random number within a specified range

  • generate_gaussian

    Generate a random number following a Gaussian (normal) distribution between 0 and 1

  • generate_string

    Generate a random string with specified length and character set

  • generate_password

    Generate a strong password with a mix of character types. WARNING: While this password is generated locally on your machine, it is recommended to use a dedicated password manager for generating and storing passwords securely.

  • roll_dice

    Roll a set of dice using standard dice notation (e.g., "2d6" for two six-sided dice, "3d6+5" for three six-sided dice plus 5)

  • draw_cards

    Draw cards from a standard deck of playing cards

Use Random Generation MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Random Generation is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Random Generation as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Random Generation MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "random-generation": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-rand"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Random Generation MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Random Generation MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Random Generation to help me with this task?
Random Generation
Sure. I read it.
Here is what I found using Random Generation.

Frequently asked questions

What is the Random Generation MCP server used for?

Random Generation is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Random Generation MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Random Generation with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Random Generation MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Random Generation connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Random Generation MCP to TypingMind?

Random Generation runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Random Generation MCP provide in TypingMind?

Random Generation exposes 7 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Random Generation MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Random Generation requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇