random-web3-mcp
RandomWeb3MCP - Web3ランダム要素生成サービス
RandomWeb3MCPは、EVMブロックハッシュに基づくランダム要素生成サービスです。ゲーム、金融、テストなどの分野で使用できる様々なランダム要素生成ツールを提供しています。
特徴
検証可能性: すべての乱数はブロックチェーンハッシュに基づいて生成され、公平性と検証可能性を保証します。
多様性: 基本的な乱数から複雑な確率分布まで、さまざまな乱数生成シナリオをサポートします。
信頼性: ランダム性の品質を確保するために、エントロピーソースとしてブロックチェーンを使用します。
使いやすさ: シンプルで直感的なAPIインターフェースを提供し、簡単に統合できます。
Related MCP server: Random Value MCP Server
インストール
git clone git@github.com:suxiongye/random-web3-mcp.git
pip install -e .クイックスタート
ticoまたはカーソルでの設定
カーソル設定に random-web3-mcp サービス構成を追加します。
{
"mcpServers": {
"random-web3-mcp": {
"command": "uv",
"args": ["--directory", "local_repo_directory/zxl-mcp-server", "run", "main.py"]
}
}
}ツールリスト
基本的な乱数を生成する
名前
基本的な乱数ジェネレータ
関数
指定された範囲内でランダムな整数を生成する
パラメータ
min_value (int, オプション): 最小値(含む)。デフォルトは 0 です。
max_value (int, オプション): 最大値(含む)。デフォルトは 1000000 です。
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
乱数結果を含むJSON文字列
アプリケーションシナリオ
宝くじ制度
ゲームの乱数
ランダムID生成
テストデータ生成
ランダム配列を生成する
名前
ランダム配列ジェネレータ
関数
指定された長さのランダム配列を生成する
パラメータ
array_length (int, オプション): 配列の長さ。デフォルトは 1 です。
min_value (int, オプション): 最小値。デフォルトは 0 です。
max_value (int, オプション): 最大値。デフォルトは 1000000 です。
salt (str, オプション): 乱数ソルト値。デフォルトは''
返品
ランダム配列を含むJSON文字列
アプリケーションシナリオ
バッチ乱数生成
ランダムサンプリング
テストデータセットの生成
ランダムタスク割り当て
ランダム重み付け生成
名前
重み付けランダムセレクター
関数
重みに基づいてオプションをランダムに選択する
パラメータ
options (List[str]): オプションのリスト
weights (List[int]): 対応する重みのリスト (0-1000)
salt (str, オプション): 乱数ソルト値。デフォルトは''
返品
選択結果を含むJSON文字列
アプリケーションシナリオ
宝くじシステム(異なる確率の賞品)
ランダムドロップ(重み付けアイテムドロップ)
タスクの割り当て(優先度に基づく)
A/Bテスト(異なる比率の実験グループ)
ランダムな特徴を生成する
名前
ランダム特徴割り当て
関数
オブジェクトのランダムな特徴値のセットを生成します。各特徴値は指定された範囲内にあります。特徴値はビットマップにエンコードされ、各特徴は8ビットを占めます。
パラメータ
feature_count (int): 生成する特徴の数
feature_max_values (List[int]): 各特徴の最大値のリスト。長さはfeature_countと等しくなければならない。
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
特徴値とビットマップを含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"features": [List of feature values],
"featureBitmap": Feature bitmap value
}アプリケーションシナリオ
ゲームキャラクターの属性生成(強さ、敏捷性、知性など)
装備属性のランダム化(攻撃、防御、速度など)
生物学的特性シミュレーション(遺伝子、特性など)
ランダムなシーン生成(地形、天候、環境など)
分布を生成する
名前
確率分布乱数生成器
関数
指定された確率分布の種類とパラメータに従って乱数を生成します。様々な一般的な確率分布をサポートします。
パラメータ
distribution_type (int): 配布タイプ:
1 = 均一分布(パラメータ: [min_value, max_value])
2 = 正規分布(パラメータ: [平均、標準偏差])
3 = 指数分布(パラメータ: [scale_parameter])
4 = 二項分布(パラメータ: [試行回数, 成功確率])
distribution_parameters (List[float]): 分布パラメータリスト
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
ランダム値と分布情報を含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"randomValue": Generated random value,
"distributionMetadata": {
"distributionType": Distribution type,
...Distribution parameters
}
}アプリケーションシナリオ
金融市場シミュレーション(リターン分布、リスク分析)
自然現象シミュレーション(粒子分布、ノイズ生成)
負荷テスト(ユーザー行動分布)
統計的サンプリング(実験データ生成)
ランダムイベントを生成する
名前
ランダムイベントトリガー
関数
与えられた確率に基づいて一連のイベントをトリガーします。各イベントには独立したトリガー確率があります。トリガーステータスをビットマップで記録することで、処理が容易になります。
パラメータ
event_count (int): イベントの総数
event_probabilities (List[int]): 各イベントのトリガー確率(0~1000、0~100%を表す)
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
イベント トリガーの結果を含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"triggeredEvents": Event trigger bitmap,
"eventResults": [
{
"eventId": Event ID,
"probability": Trigger probability,
"triggered": Whether triggered,
"randomValue": Random value
},
...
]
}アプリケーションシナリオ
ゲームのランダムイベント(プロットのトリガー、アイテムのドロップ)
確率効果判定(スキル発動、コンボ判定)
リスクイベントシミュレーション(障害予測、事故イベント)
複数の条件判定(複合確率イベント)
ランダムシードを生成する
名前
ランダムシードジェネレーター
関数
暗号化や高品質な乱数を必要とするその他のシナリオ向けに、高エントロピーの乱数シードを生成します。ランダム性を保証するために、ブロックチェーンハッシュをエントロピーソースとして使用します。
パラメータ
seed_length (int): 生成するシードの長さ(バイト単位)
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
ランダム シードを含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"randomSeed": "Random seed in hexadecimal format",
"entropy": Estimated entropy value
}アプリケーションシナリオ
キー生成(暗号化キー、署名シード)
セキュリティトークン(セッション識別子、認証トークン)
乱数初期化(PRNGシード、シミュレーション初期状態)
一意の識別子の生成(UUIDシード、ランダム識別子)
シャッフル配列
名前
ランダム配列シャッフラー
関数
入力配列をランダムにシャッフルし、各要素がどの位置に出現する確率も均等になるようにします。公平性を保つために、Fisher-Yatesシャッフルアルゴリズムを使用します。
パラメータ
input_array (リスト): シャッフルする配列。要素は任意の型にすることができます。
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
シャッフルされた配列を含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"shuffledArray": [Shuffled array]
}アプリケーションシナリオ
ゲームのシャッフル(トランプ、麻雀牌)
ランダムな順序(質問順、プレイリスト)
ランダムグループ分け(チーム割り当て、実験グループ分け)
データシャッフル(トレーニングデータセット、テストケース)
座標を生成する
名前
ランダム座標ジェネレータ
関数
指定された次元空間にランダムな座標点を生成します。各次元には独自の値の範囲があります。任意の次元数での座標生成をサポートします。
パラメータ
次元数(整数):座標次元数(1D、2D、3Dなど)
min_values (List[float]): 各次元の最小値のリスト
max_values (List[float]): 各次元の最大値のリスト
座標数 (int): 生成する座標点の数
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
ランダム座標を含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"coordinates": [
[x1, y1, z1, ...], # First point coordinates
[x2, y2, z2, ...], # Second point coordinates
...
]
}アプリケーションシナリオ
ゲームオブジェクトの配置(NPCの位置、アイテムの分布)
パーティクルシステム(エフェクト生成、パーティクル分布)
マップ生成(地形の高さ、資源の分布)
空間サンプリング(3Dモデリング、空間分析)
希少性を生成する
名前
希少性ランダムアロケータ
関数
指定された次元空間にランダムな座標点を生成します。各次元には独自の値の範囲があります。任意の次元数での座標生成をサポートします。
パラメータ
item_count: プロジェクトの数量
rarity_tiers: レア度レベルの配列
rarity_percentages: 各レアリティレベルの確率パーセンテージ
guaranteed_minimums: 各レア度レベルの保証数量(オプション)
salt (文字列, オプション): ランダム性を高めるための乱数ソルト値。デフォルトは''
返品
ランダムな希少度の配列を含む JSON 文字列。形式は次のようになります。
{
"requestId": "Generated request ID",
"rarityDistribution": [Rarity allocation result]
}アプリケーションシナリオ
ゲームアイテムドロップ(異なるレア度の装備、アイテム)
宝くじシステム(異なる確率の賞品)
リソースの割り当て(異なる希少性のリソース、材料)
ランダムイベントトリガー(異なる確率のイベント)
アプリケーションシナリオ
ゲーム開発
ランダムアイテムドロップ
キャラクター属性生成
マップのランダム生成
確率イベントトリガー
財務アプリケーション
リスクシミュレーション
投資ポートフォリオ分析
市場行動シミュレーション
テストデータ
ランダムテストケース生成
負荷テストデータ
性能試験サンプル
科学計算
モンテカルロシミュレーション
粒子システムシミュレーション
ランダムサンプリング
注記
すべての乱数生成はトラストチェーンのブロックチェーンハッシュに依存しているため、正常なネットワーク接続を確保してください。
重み付けランダムセレクタの重み値の範囲は0~1000で、0~100%の確率を表します。
確率分布パラメータは、特定の分布タイプに応じて正しいパラメータリストを提供する必要があります。
ランダム性を高めるために、本番環境ではソルトパラメータを使用することをお勧めします。
エラー処理
サービスは次のようなエラー タイプを返す可能性があります:
{
"error": "Error message",
"code": "Error code",
"requestId": "Request ID"
}一般的なエラーコード:
INVALID_PARAMS: パラメータエラーNETWORK_ERROR: ネットワーク接続エラーCHAIN_ERROR: ブロックチェーンアクセスエラーINTERNAL_ERROR: 内部サービスエラー
パフォーマンスの考慮
各乱数生成リクエストはブロックチェーンにアクセスする必要があり、一定の遅延が発生する可能性がある。
頻繁に使用する乱数をキャッシュすることをお勧めします
多数の同時リクエストを処理する場合はリクエスト頻度に注意してください
貢献ガイド
このプロジェクトの改善にご協力いただけるIssueとPull Requestの提出を歓迎いたします。提出前に以下の点をご確認ください。
コードはPEP 8仕様に準拠しています
適切なテストケースが追加される
関連文書が更新されました
ライセンス
このプロジェクトはMITライセンスを使用しています。詳細はLICENSEファイルをご覧ください。
Available Tools
10 toolsgenerate_basic_randomA
Basic Random Number Generator
Generate a random integer within the specified range
Args:
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
min_value (int, optional): Minimum value (inclusive). Defaults to 0.
max_value (int, optional): Maximum value (inclusive). Defaults to 1000000.
Returns:
str: JSON string containing the random number result
Application Scenarios:
1. Lottery systems
2. Game random numbers
3. Random ID generation
4. Test data generation
Inputs: max_value, min_value, salt.
generate_coordinateA
Random Coordinate Generator
Generate random coordinate points in a specified dimensional space, each dimension has its own value range.
Supports coordinate generation in any number of dimensions.
Args:
dimensions (int): Number of coordinate dimensions (1D, 2D, 3D, etc.)
min_values (List[float]): List of minimum values for each dimension
max_values (List[float]): List of maximum values for each dimension
coordinate_count (int): Number of coordinate points to generate
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing random coordinates, formatted as:
{
"requestId": "Generated request ID",
"coordinates": [
[x1, y1, z1, ...], # First point coordinates
[x2, y2, z2, ...], # Second point coordinates
...
]
}
Application Scenarios:
1. Game object positioning (NPC locations, item distribution)
2. Particle systems (effect generation, particle distribution)
3. Map generation (terrain height, resource distribution)
4. Spatial sampling (3D modeling, spatial analysis)
Inputs: coordinate_count (required), dimensions (required), max_values (required), min_values (required), +1 more.
generate_distributionA
Probability Distribution Random Generator
Generate random numbers according to specified probability distribution type and parameters.
Supports various common probability distributions.
Args:
distribution_type (int): Distribution type:
1 = Uniform distribution (parameters: [min_value, max_value])
2 = Normal distribution (parameters: [mean, standard_deviation])
3 = Exponential distribution (parameters: [scale_parameter])
4 = Binomial distribution (parameters: [trials, success_probability])
distribution_parameters (List[float]): Distribution parameter list
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing random value and distribution information, formatted as:
{
"requestId": "Generated request ID",
"randomValue": Generated random value,
"distributionMetadata": {
"distributionType": Distribution type,
...Distribution parameters
}
}
Application Scenarios:
1. Financial market simulation (return distribution, risk analysis)
2. Natural phenomena simulation (particle distribution, noise generation)
3. Load testing (user behavior distribution)
4. Statistical sampling (experimental data generation)
Inputs: distribution_parameters (required), distribution_type (required), salt.
generate_random_arrayA
Random Array Generator
Generate a random array of specified length
Args:
salt (str, optional): Random number salt value. Defaults to "".
array_length (int, optional): Array length. Defaults to 1.
min_value (int, optional): Minimum value. Defaults to 0.
max_value (int, optional): Maximum value. Defaults to 1000000.
allow_duplicates (bool, optional): Allow duplicate values. Defaults to True.
Returns:
str: JSON string containing the random array
Application Scenarios:
1. Batch random number generation
2. Random sampling
3. Test dataset generation
4. Random task assignment
Inputs: allow_duplicates, array_length, max_value, min_value, +1 more.
generate_random_eventA
Random Event Trigger
Trigger a series of events based on given probabilities, each event has an independent trigger probability.
Uses bitmap to record trigger status for easy processing.
Args:
event_count (int): Total number of events
event_probabilities (List[int]): Trigger probability for each event (0-1000, representing 0-100%)
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing event trigger results, formatted as:
{
"requestId": "Generated request ID",
"triggeredEvents": Event trigger bitmap,
"eventResults": [
{
"eventId": Event ID,
"probability": Trigger probability,
"triggered": Whether triggered,
"randomValue": Random value
},
...
]
}
Application Scenarios:
1. Game random events (trigger plot, drop items)
2. Probability effect determination (skill trigger, combo determination)
3. Risk event simulation (fault prediction, accident events)
4. Multiple condition determination (combined probability events)
Inputs: event_count (required), event_probabilities (required), salt.
generate_random_featureA
Random Feature Allocator
Generate a set of random feature values for objects, each feature value within its specified range.
Feature values are encoded into a bitmap, with each feature occupying 8 bits.
Args:
feature_count (int): Number of features to generate
feature_max_values (List[int]): List of maximum values for each feature, length must equal feature_count
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing feature values and bitmap, formatted as:
{
"requestId": "Generated request ID",
"features": [List of feature values],
"featureBitmap": Feature bitmap value
}
Application Scenarios:
1. Game character attribute generation (strength, agility, intelligence, etc.)
2. Equipment attribute randomization (attack, defense, speed, etc.)
3. Biological trait simulation (genes, traits, etc.)
4. Random scene generation (terrain, weather, environment, etc.)
Inputs: feature_count (required), feature_max_values (required), salt.
generate_random_seedA
Random Seed Generator
Generate high-entropy random seed for encryption or other scenarios requiring high-quality random numbers.
Uses blockchain hash as entropy source to ensure randomness.
Args:
seed_length (int): Length of seed to generate (in bytes)
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing random seed, formatted as:
{
"requestId": "Generated request ID",
"randomSeed": "Random seed in hexadecimal format",
"entropy": Estimated entropy value
}
Application Scenarios:
1. Key generation (encryption keys, signature seeds)
2. Security tokens (session identifiers, authentication tokens)
3. Random number initialization (PRNG seeds, simulation initial states)
4. Unique identifier generation (UUID seeds, random identifiers)
Inputs: seed_length (required), salt.
generate_random_weightedA
Weighted Random Selector
Randomly select an option based on weights
Args:
options (List[str]): List of options
weights (List[int]): Corresponding weight list (0-1000)
salt (str, optional): Random number salt value. Defaults to "".
Returns:
str: JSON string containing the selection result
Application Scenarios:
1. Lottery systems (prizes with different probabilities)
2. Random drops (weighted item drops)
3. Task assignment (based on priority)
4. A/B testing (experiment groups with different ratios)
Inputs: options (required), weights (required), salt.
generate_rarityC
Rarity Distributor Args: item_count: Number of items rarity_tiers: Array of rarity tiers rarity_percentages: Probability percentage for each rarity tier guaranteed_minimums: Minimum guaranteed count for each rarity tier (optional) salt: Additional entropy source
Inputs: item_count (required), rarity_percentages (required), rarity_tiers (required), guaranteed_minimums, +1 more.
shuffle_arrayA
Random Array Shuffler
Randomly shuffle the input array, ensuring each element has an equal probability of appearing in any position.
Uses Fisher-Yates shuffle algorithm to ensure fairness.
Args:
input_array (List): Array to be shuffled, elements can be of any type
salt (str, optional): Random number salt value for increased randomness. Defaults to "".
Returns:
str: JSON string containing the shuffled array, formatted as:
{
"requestId": "Generated request ID",
"shuffledArray": [Shuffled array]
}
Application Scenarios:
1. Game shuffling (playing cards, mahjong tiles)
2. Random ordering (question order, playlist)
3. Random grouping (team assignment, experiment grouping)
4. Data shuffling (training dataset, test cases)
Inputs: input_array (required), salt.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
The tools have overlapping purposes in random generation, with multiple tools generating random numbers or arrays (e.g., generate_basic_random, generate_random_array, generate_distribution). However, descriptions clarify distinctions like coordinate generation, distribution types, or weighted selection, helping agents differentiate between them. Some ambiguity remains, such as between generate_random_array and shuffle_array for array manipulation.
All tool names follow a consistent snake_case pattern with a clear 'generate_' or 'shuffle_' prefix, making them predictable and readable. The naming convention is uniform across all tools, with no mixing of styles or deviations, which aids in easy identification and usage.
With 10 tools, the count is reasonable for a random generation server, covering various aspects like basic numbers, coordinates, distributions, and shuffling. It's slightly heavy but well-scoped, as each tool addresses a specific niche in random generation without being excessive for the domain.
The toolset covers a broad range of random generation scenarios, including numbers, arrays, distributions, events, and seeds, with no obvious gaps for core functionalities. Minor gaps might include lack of tools for random string generation or more advanced statistical distributions, but the existing set supports most common use cases effectively.
Related MCP Connectors
Multi-chain wallet MCP. 18 tools: balance, swap, bridge, stake, claim. Pay-per-call USDC (x402 v2).
Chainlist MCP — registry of EVM chains
Non-custodial cross-chain crypto swap MCP — 1288+ assets, no KYC. Solana/EVM/Monero, RPC, oracle.
Related MCP Servers
- AlicenseAqualityCmaintenanceProduction-ready MCP server that provides LLMs with essential random generation abilities, including random integers, floats, choices, shuffling, and cryptographically secure tokens.7156 PyPI50MIT
- AlicenseBqualityDmaintenanceGenerates random integers within a specified range and random alphanumeric strings of specified length through MCP protocol integration.2MIT
- AlicenseAqualityDmaintenanceAn encrypted and secure random number generation server that complies with the MCP protocol, suitable for AI applications, LLMS, and other systems that require high-quality random numbers.72Apache 2.0
- AlicenseAqualityDmaintenanceMCP server providing true randomness capabilities to Claude, enabling cryptographically secure random number generation for games, decision-making, sampling, simulations, and any operation requiring genuine randomness.132MIT