Sponsored by Deepsite.site

Dice Roll

Created By
lpbayliss7 months ago
A Model Context Protocol (MCP) server for simulating dice rolls with support for standard dice notation and Fate/Fudge dice. It provides tools to parse dice notation strings (like "3d6+4") and generate random dice rolls. Integrates with MCP-compatible clients like Claude Desktop and features full input/output validation using Zod schemas. It supports both standard dice (NdS+M format) and Fate/Fudge dice (NdF format) commonly used in tabletop role-playing games.
Content

server-dice-roll

A Model Context Protocol (MCP) server for simulating dice rolls with support for standard dice notation and Fate/Fudge dice.

Features

  • Dice Notation Parsing: Parse standard dice notation strings like 2d6, 1d20+5, or 4dF
  • Multiple Dice Types: Support for both standard dice and Fate/Fudge dice
  • Random Rolling: Generate truly random dice rolls with accurate probability distributions
  • Validation: Full input and output validation using Zod schemas
  • MCP Integration: Seamlessly integrates with any MCP-compatible client like Claude Desktop

Usage

This MCP server provides two main tools:

1. Parse Dice Notation

Parses a dice notation string and returns the structured representation.

parse_dice_roll_notation
  input: { notation: "3d6+4" }
  output: { type: "standard", count: 3, sides: 6, modifier: 4 }

2. Roll Dice

Rolls dice based on a dice roll configuration and returns the results.

dice_roll
  input: { type: "standard", count: 3, sides: 6, modifier: 4 }
  output: { rolls: [5, 2, 6], total: 17, original: "3d6+4" }

Installation and Setup

Using with Claude Desktop

Add this server to your Claude Desktop configuration:

{
  "mcpServers": {
    "dice": {
      "command": "npx",
      "args": ["-y", "server-dice-roll"]
    }
  }
}

Using with npm/npx

# Install globally
npm install -g server-dice-roll

# Run the server
mcp-server-dice-roll

# Or run directly with npx
npx server-dice-roll

Understanding Dice Notation

Dice notation is a system used in tabletop role-playing games to represent different dice rolls.

Standard Notation

The standard format is NdS+M where:

  • N is the number of dice to roll (optional, defaults to 1)
  • d indicates a die roll
  • S is the number of sides on each die
  • +M is a modifier to add to the total (optional)

Examples:

  • d6 - Roll one 6-sided die
  • 2d10 - Roll two 10-sided dice and sum the results
  • 3d8+5 - Roll three 8-sided dice, sum the results, and add 5

Fate/Fudge Dice

Fate dice (also known as Fudge dice) are special 6-sided dice with values of -1, 0, and +1 (two sides each).

Format: NdF where:

  • N is the number of dice to roll
  • dF indicates Fate dice

Example:

  • 4dF - Roll four Fate dice (results in values between -4 and +4)

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Author

Created by Luke Bayliss hello@lukebayliss.com

Release Process

This project uses a single integrated workflow for versioning, releases, and publishing:

  1. Version Bump Labels: Each PR to the main branch should include exactly one version bump label:

    • patch - For backwards-compatible bug fixes
    • minor - For backwards-compatible new features
    • major - For breaking changes
    • If no label is specified, patch is applied by default
  2. Sequential Workflow: The integrated Release and Publish workflow consists of three sequential jobs:

    • Job 1: Version Bump - Updates version in package.json and creates a git tag
    • Job 2: Release Creation - Creates a GitHub release with changelog
    • Job 3: Publish - Publishes the package to npm
  3. Automated Triggers: The workflow runs automatically in these scenarios:

    • When a PR is merged to main (using the PR's version label)
    • When changes are pushed directly to main (using patch version)
    • When manually triggered via GitHub Actions
    • When a tag is manually pushed (skips version bump, only creates release and publishes)

All these steps run in a coordinated workflow with proper dependencies to ensure reliability.

PR Requirements

All PRs should include exactly one version bump label (patch, minor, or major). If no label is specified, the system will automatically add the patch label as the default. PRs with multiple version labels will still be blocked from merging.

Manual Versioning

To manually trigger a version bump without creating a PR:

  1. Go to Actions > Version Bump workflow
  2. Click "Run workflow"
  3. Select the branch and bump type (patch, minor, major)
  4. Click "Run workflow"

The rest of the process (creating release and publishing) will happen automatically.

Server Config

{
  "mcpServers": {
    "dice": {
      "command": "npx",
      "args": [
        "server-dice-roll"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
DeepChatYour AI Partner on Desktop
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.