Diceport

io.github.CloudCorpRecords由 GitHub 账号 CloudCorpRecords 发布v0.1.0更新于 Oct 29, 2026

Dice rolls, coin flips, and random numbers, reproducible with a seed.

已验证STDIO仅桌面

概览

AI 生成的概览

本地 MCP 服务器,可掷骰子、抛硬币和生成随机整数,支持用种子复现结果。

可以做什么
  • 按 NdM 记法掷骰子,返回每个点数、修正值和总和
  • 抛硬币,返回正面或反面
  • 在两个闭区间边界之间取一个随机整数
  • 传入可选的整数种子即可复现任意结果
适用场景
适合助手需要公平且可解释的随机结果的场景,例如桌游或游戏逻辑、随机抽取条目,或生成之后可用同一种子复现的随机结果。
运行要求
以本地 stdio 进程运行,可通过 npx 从 npm 包启动,或使用容器镜像;npx 方式需要 Node.js,容器方式需要 Docker。未声明任何账号、API 密钥、环境变量或请求头。
安装前请注意
未设种子的调用使用平台随机源,不保证密码学强度;设种子的调用完全确定且可预测,不要用于安全相关的随机性。该服务器只返回数值,不写入或发送数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Diceport,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

diceport

diceport rolls dice, flips coins, and picks random integers. It is built for the moments when a script or an agent needs a fair, explainable bit of chance: a roll reports every face that went into its total, and any call can take a seed that makes the outcome reproducible — same seed, same result, every time.

Install

bash
npx @reneturcios/diceport roll 2d6

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/diceport

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
# Roll dice in NdM notation, with an optional +N / -N modifierdiceport roll 2d6# 2d6: [3, 5] total 8diceport roll 3d8+2 --seed 42   # reproducible
# Flip a coindiceport flip                   # heads (or tails)diceport flip --seed 7 --json
# Pick an integer between two bounds, inclusivediceport random 1 100diceport random 1 100 --seed 42
diceport --version

Notation is NdM: roll N dice with M sides each. The count may be left off (d20 rolls one die) and a flat modifier may be appended (2d6+3, 1d100-5).

Exit codes: 0 on success, 1 when a roll or range cannot be done (bad notation, an inverted range — the error says why), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/diceport mcp

MCP client configuration:

json
{  "mcpServers": {    "diceport": {      "command": "npx",      "args": ["-y", "@reneturcios/diceport", "mcp"]    }  }}

Tools

ToolInputWhat it returns
roll_dicenotation (string, required, e.g. 2d6+3), seed (integer, optional)Every individual face rolled, the modifier, and the total.
flip_coinseed (integer, optional)heads or tails.
random_numbermin, max (integers, required), seed (integer, optional)One integer between min and max, inclusive.

Seeded calls use a mulberry32 generator, so a seed fully determines the outcome and any reported result can be replayed. Unseeded calls draw from the platform random source.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no networknpm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

来源:README.md,提交 1711e46

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分