Dice Roller

io.github.vandewilly由 GitHub 帳號 vandewilly 發布v0.1.0更新於 Oct 24, 2026

Roll dice using standard notation (2d6, 1d20+5), D&D stats, coin flips, and more!

已驗證STDIO僅桌面

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理依標準骰子記法擲骰、產生 D&D 屬性、擲硬幣並從選項中隨機挑選。

可以做什麼
  • 依 2d6、1d20+5、4d6kh3 等標準記法擲骰,支援保留最高或最低值
  • 重複擲同一組骰子多次,並回傳最小值、最大值、總和與平均值統計
  • 以 4d6 去掉最低值的方式產生 D&D 5e 角色屬性
  • 擲一次或多次硬幣,並擲百分位 d100 骰
  • 從給定的選項清單中隨機選出一項
適用情境
適合桌上角色扮演遊戲、需要隨機決定的場合,或任何希望助理給出真正隨機結果而非自行編造的情境。
執行需求
以本機程序執行,透過 pip 安裝 PyPI 套件 mcp-dice-roller,並以 python -m mcp_dice_roller 啟動。未宣告帳號、API 金鑰、環境變數或標頭。需要在桌面用戶端中設定。
安裝前請注意
結果來自伺服器自身的隨機數產生器,無法稽核,也不是密碼學安全;請勿用於安全敏感或賭博用途。它只讀取輸入並回傳結果,未宣告任何憑證或寫入權限。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Dice Roller,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP Dice Roller 🎲

A simple MCP (Model Context Protocol) server for rolling dice. Perfect for tabletop games, random decisions, and more!

Features

  • Standard Dice Notation - Roll any dice using notation like 2d6, 1d20+5, 3d8-2
  • Keep Highest/Lowest - Support for 4d6kh3 (keep highest 3) and 2d20kl1 (keep lowest)
  • D&D Stat Rolling - Quick character stat generation using 4d6 drop lowest
  • Coin Flips - Simple heads or tails
  • Random Picker - Choose randomly from a list of options
  • Percentile Dice - Roll d100 with tens and ones dice

Installation

bash
pip install mcp-dice-roller

Usage

With Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "dice-roller": {      "command": "python",      "args": ["-m", "mcp_dice_roller"]    }  }}

With VS Code

Add to your VS Code MCP settings:

json
{  "mcp.servers": {    "dice-roller": {      "command": "python",      "args": ["-m", "mcp_dice_roller"]    }  }}

Tools

roll_dice

Roll dice using standard notation.

roll_dice("2d6")       → Roll two 6-sided diceroll_dice("1d20+5")    → Roll d20 and add 5roll_dice("4d6kh3")    → Roll 4d6, keep highest 3roll_dice("2d20kl1")   → Roll 2d20, keep lowest (disadvantage)

Example Response:

json
{  "notation": "2d6+3",  "rolls": [4, 6],  "kept": [4, 6],  "subtotal": 10,  "modifier": 3,  "total": 13}

roll_multiple

Roll the same dice multiple times with statistics.

roll_multiple("1d20", 5)  → Roll d20 five times

Example Response:

json
{  "notation": "1d20",  "times": 5,  "totals": [15, 8, 20, 3, 12],  "statistics": {    "min": 3,    "max": 20,    "sum": 58,    "average": 11.6  }}

roll_dnd_stats

Generate D&D 5e character ability scores.

Example Response:

json
{  "method": "4d6 drop lowest",  "stats": [    {"rolls": [4, 3, 5, 6], "kept": [4, 5, 6], "total": 15},    {"rolls": [2, 4, 4, 3], "kept": [3, 4, 4], "total": 11},    ...  ],  "totals": [15, 11, 14, 13, 10, 16],  "sum": 79}

flip_coin

Flip a coin.

flip_coin()      → Flip onceflip_coin(10)    → Flip 10 times

pick_random

Pick randomly from options.

pick_random("pizza, burger, sushi, tacos")

Example Response:

json
{  "options": ["pizza", "burger", "sushi", "tacos"],  "selected": "sushi",  "total_options": 4}

roll_percentile

Roll d100 (percentile dice).

Example Response:

json
{  "tens_die": 7,  "ones_die": 3,  "result": 73}

Development

Setup

bash
# Clone the repositorygit clone https://github.com/vandewilly/mcp-dice-roller.gitcd mcp-dice-roller
# Install dependenciespip install -e ".[dev]"
# Run testspytest

Running Locally

bash
python -m mcp_dice_roller

MCP Registry

MCP Name: io.github.vandewilly/dice-roller

This server is published to the MCP Registry.

License

MIT License - see LICENSE for details.

Author

Vandewilly Silva (@vandewilly)

來源:README.md,提交 fa05662

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分