Logo Plugged.in Random Number Generator

Plugged.in Random Number Generator

Tổ chức
VeriTeknik

Because even AI needs to roll the dice properly.

Nhà phát hànhVeriTeknik
Kho mãpluggedin-random-number-generator-mcp
Ngôn ngữJavaScript
Bản fork
1
Sao
2
Công cụ có sẵn
7
Phương thức truyền tảistdio
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Plugged.in Random Number Generator cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 7 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    2 sao và 1 bản fork từ kho mã được liên kết.

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 crypto module 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

📦 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:

  1. Download the latest .dxt file from the releases page
  2. Open Claude Desktop
  3. Go to Settings → Developer → MCP Servers
  4. Click "Install from file" and select the downloaded .dxt file

Install from npm

bash
npm install -g pluggedin-random-number-generator-mcp

Or install locally in your project:

bash
npm install pluggedin-random-number-generator-mcp

Deploy with Smithery

Deploy this MCP server to the cloud using Smithery:

  1. Fork this repository
  2. Connect your GitHub account to Smithery
  3. Navigate to the Deployments tab
  4. Click "Deploy"

The server includes a smithery.yaml configuration file for easy deployment.

Build from Source

bash
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:

bash
# Using the built version
node dist/index.js

# Using development mode
npm run dev

Integration with MCP Clients

For npm installation (recommended):

Add to your MCP client configuration. For Claude Desktop, add to your claude_desktop_config.json:

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:

json
{
  "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: 0
  • max (integer, optional): Maximum value (inclusive), default: 100
  • count (integer, optional): Number of integers to generate, default: 1, max: 1000

Example:

json
{
  "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.0
  • max (number, optional): Maximum value (exclusive), default: 1.0
  • count (integer, optional): Number of floats to generate, default: 1, max: 1000
  • precision (integer, optional): Decimal places to round to, default: 6, max: 15

Example:

json
{
  "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: 1024
  • encoding (string, optional): Output encoding ("hex", "base64", "binary"), default: "hex"

Example:

json
{
  "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: 100
  • format (string, optional): UUID format ("standard", "compact"), default: "standard"

Example:

json
{
  "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: 256
  • charset (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:

json
{
  "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 from
  • count (integer, optional): Number of items to select, default: 1
  • allow_duplicates (boolean, optional): Whether to allow duplicate selections, default: true

Example:

json
{
  "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: 1000
  • probability (number, optional): Probability of true (0.0 to 1.0), default: 0.5

Example:

json
{
  "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:

  1. Acknowledge that LLMs cannot generate truly random values
  2. Explain the available cryptographically secure tools
  3. 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 crypto module 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:

bash
# Run the test suite
node test.js

The 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 documentation

Building

bash
npm run build

Development Mode

bash
npm run dev

Testing with MCP Inspector

You can test the server using the MCP Inspector tool:

bash
npm run inspector

This 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

  1. Follow TypeScript best practices
  2. Maintain comprehensive test coverage
  3. Update documentation for new features
  4. Ensure all tests pass before submitting
  5. Follow semantic versioning for releases

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Related Projects

📞 Support

For support, questions, or feature requests:

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "random-generator": {
      "command": "npx",
      "args": [
        "-y",
        "pluggedin-random-number-generator-mcp@latest"
      ]
    }
  }
}

Công cụ có sẵn

  • generate_random_integer

    Generate cryptographically secure random integers within a specified range

  • generate_random_float

    Generate cryptographically secure random floating-point numbers

  • generate_random_bytes

    Generate cryptographically secure random bytes

  • generate_uuid

    Generate a cryptographically secure UUID (v4)

  • generate_random_string

    Generate a cryptographically secure random string

  • generate_random_choice

    Randomly select items from a given list using cryptographically secure randomness

  • generate_random_boolean

    Generate cryptographically secure random boolean values

Dùng MCP Plugged.in Random Number Generator với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Plugged.in Random Number Generator, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Plugged.in Random Number Generator làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Plugged.in Random Number Generator.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "plugged-in-random-number-generator": {
      "command": "npx",
      "args": [
        "-y",
        "pluggedin-random-number-generator-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Plugged.in Random Number Generator, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Plugged.in Random Number Generator.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Plugged.in Random Number Generator giúp tôi làm việc này không?
Plugged.in Random Number Generator
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Plugged.in Random Number Generator.

Câu hỏi thường gặp

Máy chủ MCP Plugged.in Random Number Generator dùng để làm gì?

Plugged.in Random Number Generator là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Plugged.in Random Number Generator với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Plugged.in Random Number Generator với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Plugged.in Random Number Generator với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Plugged.in Random Number Generator, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Plugged.in Random Number Generator với TypingMind?

Plugged.in Random Number Generator hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Plugged.in Random Number Generator cung cấp những công cụ nào trong TypingMind?

Plugged.in Random Number Generator cung cấp 7 công cụ MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Plugged.in Random Number Generator không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Plugged.in Random Number Generator yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇