MCP Rand
MCPランド
UUID、数値、文字列、パスワード、ガウス分布、サイコロを振る、カードの描画など、さまざまな乱数生成ユーティリティを提供するモデル コンテキスト プロトコル (MCP) サーバー。
インストール
npm install mcp-randまたはグローバルにインストールします:
npm install -g mcp-randRelated MCP server: mcp-rando-server
特徴
UUIDジェネレータ
RFC 4122 バージョン 4 UUID を生成する
安全な乱数生成のためにNodeのネイティブ暗号モジュールを使用する
パラメータは必要ありません
乱数ジェネレータ
指定された範囲内で乱数を生成します
設定可能な最小値と最大値(両端を含む)
パラメータが指定されていない場合は、デフォルトで 0 ~ 100 の範囲になります。
ガウス乱数ジェネレータ
ガウス(正規)分布に従う乱数を生成します
0~1の範囲に正規化
パラメータは必要ありません
ランダム文字列ジェネレータ
設定可能な長さと文字セットでランダムな文字列を生成します
複数の文字セットをサポートします:
英数字 (デフォルト): A ~ Z、a ~ z、0 ~ 9
数字: 0~9
小文字: a〜z
大文字: AZ
特殊: !@#$%^&*()_+-=[]{};'"\|,.<>/?
設定可能な文字列の長さ(デフォルトは10)
パスワードジェネレーター
さまざまな文字タイプを組み合わせた強力なパスワードを生成します
各タイプ(大文字、小文字、数字、特殊文字)から少なくとも 1 文字が含まれていることを確認します。
設定可能な長さ(最小 8、デフォルト 16)
警告: パスワードはローカルで生成されますが、専用のパスワードマネージャーを使用することをお勧めします。
ダイスローラー
標準的なサイコロ表記法を使用して複数のサイコロを振る
「2d6」(6面ダイス2個)、「1d20」(20面ダイス1個)などの表記をサポートします。
各サイコロセットの個々のロールと合計を返します
複数の異なるサイコロセットを一度に振ることができます(例:「2d6」、「1d20」、「4d4」)
カード引き出し
標準的な52枚のカードデッキからカードを引く
base64エンコードを使用して、ドロー間のデッキの状態を維持します。
引いたカードと残りのデッキの状態を返します
デッキサイズまで任意の数のカードを引くことをサポートします
各ドローの前に利用可能なカードを適切にシャッフルする
使用法
CLIツールとして
npx mcp-randMCPクライアントとの統合
MCP クライアント構成に追加します:
{
"mcpServers": {
"mcp-rand": {
"command": "node",
"args": ["path/to/mcp-rand/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}使用例
// 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.md を参照してください。
ライセンス
ISC
Available Tools
7 toolsdraw_cardsC
Draw cards from a standard deck of playing cards
Inputs: count (required), deckState.
generate_gaussianA
Generate a random number following a Gaussian (normal) distribution between 0 and 1
Inputs: no named parameters.
generate_passwordB
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.
Inputs: length.
generate_random_numberB
Generate a random number within a specified range
Inputs: max, min.
generate_stringA
Generate a random string with specified length and character set
Inputs: charset, length.
generate_uuidA
Generate a random UUID v4
Inputs: no named parameters.
roll_diceB
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)
Inputs: dice (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose with no overlap: drawing cards, generating Gaussian numbers, generating passwords, generating random numbers in a range, generating random strings, generating UUIDs, and rolling dice. The descriptions are specific enough that an agent would never confuse one tool for another.
All tools follow a consistent verb_noun pattern with 'generate_' or action-based prefixes like 'draw_' and 'roll_'. The naming is uniform, predictable, and enhances readability across the entire set.
With 7 tools, the server is well-scoped for random generation tasks. Each tool serves a unique function in the domain of randomness, making the count appropriate without being too sparse or overwhelming.
The toolset covers a broad range of random generation needs (numbers, strings, UUIDs, passwords, cards, dice) with clear operations. A minor gap is the lack of tools for generating other distributions beyond Gaussian or more specialized random data types, but core workflows are well-supported.
Related MCP Connectors
Passwords, random numbers and strings, colours, usernames and card draws from a secure random source
Generate random values and probability distribution samples.
Generates cryptographically random integers in a given range, using crypto/rand.
Random UUID v4 (RFC 9562) as an HTTP API: 1-100 UUIDs per call, in uuid, URN, hex or integer...
Related MCP Servers
- AlicenseAqualityDmaintenanceGenerates strong passwords and evaluates password strength using zxcvbn, with uniform random sampling via Node's crypto.26 npmMIT
- AlicenseNot gradedqualityDmaintenanceCryptographically secure random number generation and randomized resources, including tools for numbers, strings, dice rolls, UUIDs, and passphrases.4MIT
- FlicenseNot gradedqualityDmaintenanceGenerates cryptographically secure, compliant UUIDs (v4, v5, v7) to prevent AI-hallucinated identifiers that would cause database collisions.5 npm3-
- AlicenseNot gradedqualityCmaintenanceValidates and generates UUIDs, including parsing version, variant, timestamps, and creating random v4 UUIDs.77 npmMIT