drio
Open app

mcp-dice: A MCP Server for Rolling Dice

Source

A MCP server enabling LLMs to roll dice

Catalog onlyCatalog onlySTDIO

Overview

mcp-dice is a Model Context Protocol (MCP) server that allows Large Language Models (LLMs) to roll dice based on standard dice notation. It outputs individual rolls and the total sums of the rolls, making it useful for games and simulations requiring randomness.

To utilize mcp-dice, you must have uv installed. Then, you can run the server using a command like uvx mcp-dice, and you can send input via JSON format to get the dice rolls.

  • Supports various dice notations (e.g., 1d20, 3d6, 2d8+1). - Returns individual roll results and their total sum. - Integrates easily with external applications like Claude Desktop. - Provides debugging support through MCP Inspector.
  1. Rolling dice for tabletop games such as Dungeons & Dragons.
  2. Generating random numbers for simulations and tests.
  3. Assisting developers in debugging applications that use dice rolls.

Add to your AI client

Use these steps to connect mcp-dice: A MCP Server for Rolling Dice in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-dice-yamaton": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-dice-yamaton"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-dice-yamaton": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-dice-yamaton"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-dice-yamaton": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-dice-yamaton"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-dice-yamaton": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-dice-yamaton"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-dice-yamaton": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-dice-yamaton"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-dice-yamaton": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-dice-yamaton"
      ]
    }
  }
}

FAQ

Can mcp-dice handle multiple dice rolls at once?

Yes, it can handle complex notations, such as `3d6`, which rolls three six-sided dice at once.

Is there a graphical interface for mcp-dice?

Currently, it operates via command line and JSON inputs, with no dedicated graphical interface.

Where can I find the installation instructions?

Full installation steps are available in the project documentation on the GitHub page.