mcp-dice is an MCP server that enables Large Language Models to simulate dice rolls using standard tabletop gaming notation. It connects MCP-compatible clients, such as Claude Desktop, to an execution environment that parses and evaluates dice formulas like 1d20, 3d6, or 2d8+1. Role-playing game players, game designers, and AI developers use this server to eliminate hallucinated randomness when running tabletop sessions, probability simulations, or random decision processes through conversational agents. Instead of letting an LLM arbitrarily invent roll outcomes, mcp-dice computes actual random outcomes and returns structured data including individual die results, modifiers, totals, and timestamps. This ensures consistency and transparency for game masters and players interacting with AI assistants for rule verification, combat resolution, and character generation.
Category: Other & General Purpose
Tags: dice, gaming, probability, random
uv is installed on your system. 2. Add the server to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows): json { "mcpServers": { "dice": { "command": "uvx", "args": ["mcp-dice"] } } } 3. Alternatively, install automatically via Smithery with: npx @smithery/cli install mcp-dice --client claude. 4. Restart Claude Desktop to use the dice rolling tool.Part of MCP Servers
mcp-dice processes standard tabletop dice notation, such as 1d20, 3d6, or 2d8+1. It calculates true random outcomes and returns structured JSON responses containing individual dice rolls, modifiers, the calculated sum, the final total, the original notation, and execution timestamps.
You can install mcp-dice using Smithery with the command npx @smithery/cli install mcp-dice --client claude. Alternatively, you can configure it manually in your Claude Desktop configuration file using uvx to run the mcp-dice command directly.
mcp-dice works with Claude Desktop on macOS and Windows via WSL. It can also be inspected and tested with the standard MCP Inspector debugging tool by running npx @modelcontextprotocol/inspector uvx mcp-dice.
The server accepts a JSON object with a notation field containing the dice string, such as 2d6+3. It evaluates the string and returns individual rolls, base sums, and modifier totals in a structured format.