dice-mcp
Click on "Install 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: MCP Dice Roller
前提条件
ローカル実行
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yus04/dice-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server