Pluggedin Random Number Generator
Enables deploying the MCP server from a forked repository through Smithery integration.
Utilizes Node.js crypto module for cryptographically secure random number generation, with compatibility for Node.js 18.0.0 or higher.
Available as an npm package for easy installation and integration with MCP clients.
Written in TypeScript with comprehensive type definitions for type safety.
Supports installation via yarn package manager as an alternative to npm.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Pluggedin Random Number Generator generate a random integer between 1 and 100"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Plugged.in Random Number Generator MCP Server
A state-of-the-art cryptographically secure random number generator server implementing the Model Context Protocol (MCP). This server provides advanced random number generation capabilities for AI applications, LLMs, and other systems requiring high-quality randomness.
๐ Features
Cryptographically Secure: Uses Node.js built-in
cryptomodule for cryptographically secure pseudorandom number generation (CSPRNG)Multiple Data Types: Generate integers, floats, bytes, UUIDs, strings, booleans, and random choices
Flexible Configuration: Customizable ranges, counts, encodings, and character sets
MCP Compliant: Full compatibility with Model Context Protocol specification including tools and prompts
AI-Friendly Prompts: Built-in prompt to help LLMs understand they should use this server for random generation
Type Safety: Written in TypeScript with comprehensive type definitions
Error Handling: Robust input validation and error reporting
Performance Optimized: Efficient algorithms suitable for high-throughput applications
Related MCP server: calc-mcp
๐ฆ Installation
Prerequisites
Node.js 18.0.0 or higher
npm or yarn package manager
Install via Desktop Extension (DXT)
For Claude Desktop users, you can install this server as a one-click Desktop Extension:
Download the latest
.dxtfile from the releases pageOpen Claude Desktop
Go to Settings โ Developer โ MCP Servers
Click "Install from file" and select the downloaded
.dxtfile
Install from npm
npm install -g pluggedin-random-number-generator-mcpOr install locally in your project:
npm install pluggedin-random-number-generator-mcpDeploy with Smithery
Deploy this MCP server to the cloud using Smithery:
Fork this repository
Connect your GitHub account to Smithery
Navigate to the Deployments tab
Click "Deploy"
The server includes a smithery.yaml configuration file for easy deployment.
Build from Source
git clone https://github.com/VeriTeknik/pluggedin-random-number-generator-mcp.git
cd pluggedin-random-number-generator-mcp
npm install
npm run build
# Optional: Build DXT package
npm run build:dxt๐ ๏ธ Usage
Running the Server
The server communicates via stdio (standard input/output) following the MCP protocol:
# Using the built version
node dist/index.js
# Using development mode
npm run devIntegration with MCP Clients
For npm installation (recommended):
Add to your MCP client configuration. For Claude Desktop, add to your claude_desktop_config.json:
{
"mcpServers": {
"random-generator": {
"command": "npx",
"args": ["-y", "pluggedin-random-number-generator-mcp@latest"]
}
}
}This will always use the latest version from npm without requiring a global installation.
For local installation:
{
"mcpServers": {
"random-generator": {
"command": "node",
"args": ["node_modules/pluggedin-random-number-generator-mcp/dist/index.js"]
}
}
}๐ง Available Tools
1. Generate Random Integers
Generate cryptographically secure random integers within a specified range.
Parameters:
min(integer, optional): Minimum value (inclusive), default: 0max(integer, optional): Maximum value (inclusive), default: 100count(integer, optional): Number of integers to generate, default: 1, max: 1000
Example:
{
"name": "generate_random_integer",
"arguments": {
"min": 1,
"max": 100,
"count": 5
}
}2. Generate Random Floats
Generate cryptographically secure random floating-point numbers.
Parameters:
min(number, optional): Minimum value (inclusive), default: 0.0max(number, optional): Maximum value (exclusive), default: 1.0count(integer, optional): Number of floats to generate, default: 1, max: 1000precision(integer, optional): Decimal places to round to, default: 6, max: 15
Example:
{
"name": "generate_random_float",
"arguments": {
"min": 0.0,
"max": 1.0,
"count": 3,
"precision": 4
}
}3. Generate Random Bytes
Generate cryptographically secure random bytes in various encodings.
Parameters:
length(integer, optional): Number of bytes to generate, default: 32, max: 1024encoding(string, optional): Output encoding ("hex", "base64", "binary"), default: "hex"
Example:
{
"name": "generate_random_bytes",
"arguments": {
"length": 32,
"encoding": "hex"
}
}4. Generate UUIDs
Generate cryptographically secure UUID version 4 identifiers.
Parameters:
count(integer, optional): Number of UUIDs to generate, default: 1, max: 100format(string, optional): UUID format ("standard", "compact"), default: "standard"
Example:
{
"name": "generate_uuid",
"arguments": {
"count": 3,
"format": "standard"
}
}5. Generate Random Strings
Generate cryptographically secure random strings with customizable character sets.
Parameters:
length(integer, optional): String length, default: 16, max: 256charset(string, optional): Character set ("alphanumeric", "alphabetic", "numeric", "hex", "base64", "ascii_printable"), default: "alphanumeric"count(integer, optional): Number of strings to generate, default: 1, max: 100
Example:
{
"name": "generate_random_string",
"arguments": {
"length": 12,
"charset": "alphanumeric",
"count": 2
}
}6. Generate Random Choices
Randomly select items from a provided list using cryptographically secure randomness.
Parameters:
choices(array, required): Array of string items to choose fromcount(integer, optional): Number of items to select, default: 1allow_duplicates(boolean, optional): Whether to allow duplicate selections, default: true
Example:
{
"name": "generate_random_choice",
"arguments": {
"choices": ["apple", "banana", "cherry", "date"],
"count": 2,
"allow_duplicates": false
}
}7. Generate Random Booleans
Generate cryptographically secure random boolean values with configurable probability.
Parameters:
count(integer, optional): Number of booleans to generate, default: 1, max: 1000probability(number, optional): Probability of true (0.0 to 1.0), default: 0.5
Example:
{
"name": "generate_random_boolean",
"arguments": {
"count": 10,
"probability": 0.7
}
}๐ค AI Prompts
The server includes a built-in prompt to help LLMs understand they should use this server for random number generation rather than attempting to generate random values themselves.
Available Prompt: generate_random
This prompt educates the AI about its limitations in generating random numbers and guides it to use the available cryptographically secure tools.
Parameters:
type(string, optional): Type of random value needed (integer, float, uuid, string, bytes, choice, boolean)requirements(string, optional): Specific requirements for the random generation
Example Usage: When an LLM receives a request like "Generate a random password" or "Pick a random number", the prompt will:
Acknowledge that LLMs cannot generate truly random values
Explain the available cryptographically secure tools
Guide the AI to use the appropriate tool for the task
This ensures that all random generation in your application uses proper cryptographic methods rather than predictable AI-generated patterns.
๐ Security Features
This server implements several security best practices:
Cryptographically Secure Randomness: All random number generation uses Node.js
cryptomodule functions (randomBytes,randomInt,randomUUID) which provide cryptographically secure pseudorandom numbers suitable for security-sensitive applications.Input Validation: Comprehensive validation of all input parameters to prevent injection attacks and ensure data integrity.
Rate Limiting: Built-in limits on generation counts to prevent resource exhaustion attacks.
Error Handling: Secure error messages that don't leak sensitive information about the system state.
๐งช Testing
The server includes a comprehensive test suite that validates all functionality:
# Run the test suite
node test.jsThe test suite covers:
Tool discovery and listing
All random generation functions
Input validation and error handling
Output format verification
Statistical properties validation
๐ Performance
The server is optimized for performance while maintaining security:
Efficient Algorithms: Uses optimized native crypto functions
Memory Management: Minimal memory footprint with efficient buffer handling
Concurrent Requests: Thread-safe design supporting multiple simultaneous requests
Scalability: Suitable for high-throughput applications
๐ง Development
Project Structure
pluggedin-random-number-generator-mcp/
โโโ src/
โ โโโ index.ts # Main server implementation
โโโ dist/ # Compiled JavaScript output
โโโ test.js # Comprehensive test suite
โโโ package.json # Project configuration
โโโ tsconfig.json # TypeScript configuration
โโโ README.md # This documentationBuilding
npm run buildDevelopment Mode
npm run devTesting with MCP Inspector
You can test the server using the MCP Inspector tool:
npm run inspectorThis will start the MCP Inspector web interface where you can:
View available tools
Test tool execution
Inspect request/response payloads
Debug server behavior
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Development Guidelines
Follow TypeScript best practices
Maintain comprehensive test coverage
Update documentation for new features
Ensure all tests pass before submitting
Follow semantic versioning for releases
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Related Projects
Model Context Protocol - The official MCP specification
Plugged.in - MCP server management and discovery platform
MCP SDK - Official TypeScript SDK for MCP
๐ Support
For support, questions, or feature requests:
Open an issue on GitHub
Visit the Plugged.in platform for MCP server management
Check the MCP documentation for protocol details
Available Tools
7 toolsgenerate_random_booleanB
Generate cryptographically secure random boolean values
Inputs: count, probability.
generate_random_bytesC
Generate cryptographically secure random bytes
Inputs: encoding, length.
generate_random_choiceA
Randomly select items from a given list using cryptographically secure randomness
Inputs: choices (required), allow_duplicates, count.
generate_random_floatB
Generate cryptographically secure random floating-point numbers
Inputs: count, max, min, precision.
generate_random_integerA
Generate cryptographically secure random integers within a specified range
Inputs: count, max, min.
generate_random_stringB
Generate a cryptographically secure random string
Inputs: charset, count, length.
generate_uuidA
Generate a cryptographically secure UUID (v4)
Inputs: count, format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 7 tools
Every tool has a clearly distinct purpose targeting different types of random data generation: boolean, bytes, choice selection, float, integer, string, and UUID. There is no overlap in functionality, making tool selection straightforward for an agent.
All tools follow a consistent 'generate_random_' prefix pattern (except 'generate_uuid' which logically fits as a special case), with snake_case used uniformly. This predictable naming scheme makes the tool set easy to navigate and understand.
With 7 tools, the server is well-scoped for random data generation, covering common use cases without being overwhelming. Each tool earns its place by addressing a specific type of random output, making the count appropriate for the domain.
The tool set provides complete coverage for random data generation, including boolean, numeric (integer and float), string, bytes, selection from lists, and UUIDs. There are no obvious gaps; agents can handle a wide range of randomization tasks without dead ends.
Maintenance
Related MCP Connectors
Randomness from outside the model, so one prompt gives different answers that still fit the ask.
LLM Orchestration Agent (Cryptography)
Fair, reproducible randomness for agents: dice, coins, integers, list picks, shuffles, with seeds.
Fair, reproducible randomness for agents: dice, coins, integers, list picks, shuffles, with seeds.
Related MCP Servers
- AlicenseAqualityCmaintenanceHelping coding agents never make mistakes working with public or private libraries without wasting the context window.21,754 npm1,186MIT
- AlicenseNot gradedqualityBmaintenance21 tools for things AI is bad at โ deterministic math, cryptographic randomness, date arithmetic, hashing, encoding, unit conversion, and more.93 npm9MIT
- AlicenseAqualityCmaintenanceDeterministic repository context packing for AI coding agents: selects, compresses, and budgets only the files a task needs. Measured 83% fewer input tokens at the same task coverage, fully local, no LLM in the loop.932 PyPI9Functional Source , Version 1.1, MIT Future
- AlicenseNot gradedqualityBmaintenanceDeterministic AST vulnerability remediation and formal verification for AI coding assistants using Microsoft Z3 SMT logic.MIT