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 分