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 分