dice-mcp
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., "@dice-mcproll 3d10"
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.
Dice MCP Server
サイコロを振った結果を返す MCP (Model Context Protocol) サーバーです。Python で実装されており、MCP Streamable HTTP トランスポート(仕様バージョン: 2025-03-26)で動作します。
概要
MCP クライアントから接続すると、以下のツールが利用できます。
ツール名 | 説明 |
| 任意の面数のサイコロを任意の回数振り、各ダイスの出目と合計値を返します |
Related MCP server: Dice MCP Server
前提条件
ローカル実行
Python 3.12 以上
pip
Docker での実行
Docker Engine 24.0 以上
Docker Compose v2
インストール
ローカル実行
git clone https://github.com/your-org/dice-mcp.git
cd dice-mcp
pip install -r requirements.txtDocker での実行
docker compose build実行方法
ローカル実行
# デフォルト設定(0.0.0.0:8000)で起動
python server.py
# ポートを変更する場合
PORT=9000 python server.pyDocker での実行
# イメージのビルドとコンテナの起動
docker compose up -d
# ログの確認
docker compose logs -f
# 停止
docker compose down起動後、エンドポイント http://localhost:8000/mcp で MCP サーバーが利用可能になります。
ツールの仕様
roll_dice
サイコロを振り、結果を返します。
パラメータ
パラメータ | 型 | デフォルト | 説明 |
| integer |
| サイコロの面数(2 以上の整数) |
| integer |
| 振る回数(1〜100 の整数) |
レスポンス
フィールド | 型 | 説明 |
| array[integer] | 各ダイスの出目リスト |
| integer | 出目の合計値 |
| integer | 使用したサイコロの面数 |
| integer | 振った回数 |
例
// リクエスト(6面ダイスを 2 個振る)
{
"name": "roll_dice",
"arguments": {
"sides": 6,
"count": 2
}
}
// レスポンス
{
"results": [3, 5],
"total": 8,
"sides": 6,
"count": 2
}MCP クライアントからの接続
Claude Desktop
claude_desktop_config.json に以下を追記します。
{
"mcpServers": {
"dice-mcp": {
"url": "http://localhost:8000/mcp"
}
}
}VS Code (GitHub Copilot)
ワークスペースの .vscode/mcp.json に以下を追記します。
{
"servers": {
"dice-mcp": {
"type": "http",
"url": "http://localhost:8000/mcp"
}
}
}その他の MCP クライアント
MCP Streamable HTTP トランスポートをサポートする任意のクライアントから、以下のエンドポイントに接続できます。
http://localhost:8000/mcp環境変数
変数名 | デフォルト | 説明 |
|
| サーバーのバインドアドレス |
|
| サーバーのポート番号 |
.env.example をコピーして .env を作成することで設定を変更できます。
cp .env.example .envファイル構成
dice-mcp/
├── server.py # MCP サーバーの実装
├── requirements.txt # Python 依存パッケージ
├── Dockerfile # コンテナ定義
├── docker-compose.yml # Docker Compose 設定(ローカル開発用)
├── .dockerignore # Docker ビルド除外設定
├── .env.example # 環境変数のテンプレート
├── mcp.json # MCP サーバーマニフェスト(API ディスカバリ・登録用)
├── openapi.yaml # OpenAPI 仕様書(API 登録用)
└── README.md # このファイルライセンス
MIT
This server cannot be deployed
Related MCP Connectors
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
NumbersAPI MCP — wraps numbersapi.com (free, no auth)
D&D 5e MCP — wraps the D&D 5th Edition API (free, no auth)
Host your MCP tool over streamable HTTP in one command.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that provides tools for rolling dice using standard notation, flipping coins, and selecting random items from lists. It supports advanced tabletop gaming features such as character stat generation and keep-highest/lowest mechanics.6MIT
- AlicenseAqualityDmaintenanceProvides comprehensive TRPG dice rolling functionality including standard notation, advantage/disadvantage mechanics, and success-counting dice pools. It enables users to perform complex dice logic and track roll history through an MCP-compliant interface.2MIT
- AlicenseAqualityDmaintenanceEnables dice rolling for RPG games using standard dice notation, supporting complex expressions like keep/drop, reroll, exploding dice, and batch rolls.43MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides random dice rolling capabilities for AI assistants.-