Dice MCP Server

Dice MCP Server

Provides comprehensive TRPG dice rolling functionality including standard notation, advantage/disadvantage mechanics, and success-counting dice pools. It enables users to perform complex dice logic and track roll history through an MCP-compliant interface.

Category
Visit Server

README

Dice MCP Server

A Model Context Protocol (MCP) server that provides TRPG dice rolling functionality for multiple game systems.

Features

  • Standard dice notation: 1d20, 2d6+3, 4d6, 1d100, 3d20-2d20+2
  • Fudge/FATE dice: 4dF, 4dF+3 — each die rolls -1, 0, or +1
  • Keep highest / lowest: 4d6kh3, 2d20kl1
  • Advantage / Disadvantage: D&D 5e style (bool ON/OFF)
  • Bonus / Penalty dice: CoC style — extra tens dice on d100 (int 0-2)
  • Critical hit / fumble: Natural 20/1 detection (bool ON/OFF)
  • Target check: Two modes — at_least (D&D: ≥) / at_most (CoC: ≤)
  • Success degrees: System-specific degree calculation
    • coc: Regular / Hard / Extreme / Critical / Fumble
    • pf2e: Crit Success / Success / Failure / Crit Failure (±10 margin, nat 20/1 shift)
    • pbta: Strong Hit / Weak Hit / Miss (fixed thresholds)
  • Dice pool: WoD, Shadowrun — success counting, exploding, double successes
    • Botch/Glitch detection (bool ON/OFF)
  • Reroll: Re-roll last roll with same parameters (Inspiration, Lucky, etc.)
  • Roll history: Track and review recent rolls per session

Quick Start (uvx)

{
  "mcpServers": {
    "dice": {
      "command": "uvx",
      "args": ["roleplaying-dice-mcp"]
    }
  }
}

Config: macOS ~/Library/Application Support/Claude/claude_desktop_config.json / Windows %APPDATA%\Claude\claude_desktop_config.json

Alternative: pip / Docker

pip install roleplaying-dice-mcp
roleplaying-dice-mcp
docker build -t dice-mcp-server . && docker run -i dice-mcp-server

Tools

roll_dice

Roll dice using standard TRPG notation.

Parameter Type Default Description
notation string required Dice expression: 1d20+5, 4d6kh3, 4dF+2, 1d100
advantage bool false Roll d20 twice, take higher (1d20 only)
disadvantage bool false Roll d20 twice, take lower (1d20 only)
bonus_dice int 0 CoC bonus dice (0-2, 1d100 only) — extra tens, keep lowest
penalty_dice int 0 CoC penalty dice (0-2, 1d100 only) — extra tens, keep highest
target int DC/AC/skill value for success check
target_mode string "at_least" "at_least" (D&D: ≥) or "at_most" (CoC: ≤)
critical bool false Nat 20/1 detection. With degrees="pf2e", shifts degree ±1 step
degrees string "coc" / "pf2e" / "pbta" — enables degree calculation

Examples:

// D&D 5e: advantage + critical + DC
{ "notation": "1d20+5", "advantage": true, "target": 15, "critical": true }

// D&D ability scores
{ "notation": "4d6kh3" }

// FATE
{ "notation": "4dF+3" }

// CoC: bonus die + degrees
{ "notation": "1d100", "bonus_dice": 1, "target": 65, "target_mode": "at_most", "degrees": "coc" }
// → 1d100 (보너스 ×1): [43, 73] → 43
// → 판정: 하드 성공! (43 ≤ 32)  ← wait, depends on roll

// PF2e: degrees with nat 20/1 shift
{ "notation": "1d20+8", "target": 20, "critical": true, "degrees": "pf2e" }

// PbtA: fixed thresholds
{ "notation": "2d6+1", "degrees": "pbta" }

roll_pool

Dice pool with success counting.

Parameter Type Default Description
pool int required Number of dice (1-50)
sides int 10 Sides per die
target int 8 Success threshold (≥)
explode bool false Reroll on max value
double_on int Double success at this value or higher
count_ones bool false Botch/Glitch detection

When count_ones is enabled:

  • WoD Botch: 0 successes + any 1s
  • Shadowrun Glitch: Half+ dice are 1s
  • Shadowrun Critical Glitch: Glitch + 0 successes
// WoD: 7d10, exploding, botch detection
{ "pool": 7, "target": 8, "explode": true, "count_ones": true }

// Shadowrun: 8d6, target 5, glitch detection
{ "pool": 8, "sides": 6, "target": 5, "count_ones": true }

reroll

Re-roll the last roll_dice or roll_pool with identical parameters. No arguments.

get_history / clear_history

Tool Parameter Description
get_history limit (default 10) Retrieve recent roll records
clear_history Clear all history

System Coverage

System Coverage Key Features Used
D&D 5e 95% notation, advantage, critical, target, 4d6kh3
CoC 7e 85% d100, bonus/penalty dice, degrees=coc, at_most
PF2e 85% d20+mod, degrees=pf2e, critical (nat 20/1 shift)
PbtA 90% 2d6+mod, degrees=pbta
FATE 95% 4dF+mod
WoD 90% roll_pool, explode, count_ones (botch)
Shadowrun 85% roll_pool (d6), count_ones (glitch)
Savage Worlds 50% exploding works, but no wild die or raise counting

Project Structure

├── server.py              # MCP server — tools & handlers
├── dice_parser.py         # Notation parser (NdM, NdF, kh/kl)
├── history.py             # Roll history manager
├── src/roleplaying_dice_mcp/  # PyPI package
├── tests/test_trpg_scenario.py
├── pyproject.toml
├── Dockerfile
└── README.md

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured