Skip to main content
Glama
sandeepgandhi500

Dice Roller MCP Server

Dice Roller MCP Server

A Model Context Protocol (MCP) server that flips coins and rolls dice, including standard dice notation and D&D mechanics.

Purpose

This MCP server gives Claude a simple, dependency-free way to generate random results for tabletop games, D&D sessions, or any "let's leave it to chance" moment.

Related MCP server: Dice Roller MCP Server

Features

Current Implementation

  • flip_coin - Flip one or more coins and get Heads/Tails results

  • roll_dice - Roll dice using standard notation (e.g. d20, 2d6+3, 4d6-1)

  • roll_advantage - Roll 2d20 and keep the higher, D&D advantage mechanic

  • roll_disadvantage - Roll 2d20 and keep the lower, D&D disadvantage mechanic

  • roll_ability_scores - Generate D&D ability scores (4d6, drop lowest) for one or more stats

Prerequisites

  • Docker Desktop with MCP Toolkit enabled

  • Docker MCP CLI plugin (docker mcp command)

  • No API keys or external services required — this server is fully self-contained

Installation

See the step-by-step instructions provided alongside these files.

Usage Examples

In Claude Desktop, you can ask:

  • "Flip a coin"

  • "Flip 5 coins"

  • "Roll 2d6+3"

  • "Roll a d20"

  • "Roll with advantage, +5 modifier"

  • "Roll with disadvantage"

  • "Roll me a set of D&D ability scores"

  • "Generate 6 ability scores for a new character"

Architecture

Claude Desktop → MCP Gateway → Dice Roller MCP Server (local, no external calls)

Development

Local Testing

# Run directly
python dice_server.py

# Test MCP protocol
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | python dice_server.py

Adding New Tools

  1. Add the function to dice_server.py

  2. Decorate with @mcp.tool()

  3. Use a single-line docstring and string parameter defaults (param: str = "")

  4. Update the catalog entry with the new tool name

  5. Rebuild the Docker image

Troubleshooting

Tools Not Appearing

  • Verify the Docker image built successfully

  • Check catalog and registry files

  • Ensure Claude Desktop config includes the custom catalog

  • Restart Claude Desktop

Unexpected Errors

  • Check container logs with docker logs <container_name>

  • Confirm dice notation matches the expected format, e.g. NdM, NdM+K, or NdM-K

Security Considerations

  • No API keys or secrets are used by this server

  • Running as a non-root user inside the container

  • No external network calls are made

License

MIT License

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables dice rolling mechanics for tabletop RPGs including standard dice notation, coin flips, advantage/disadvantage rolls, exploding dice, and maintains a history of recent rolls. Supports D\&D 5e mechanics and various gaming dice types (d4, d6, d8, d10, d12, d20, d100).
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides comprehensive dice rolling functionality for tabletop games and RPGs, supporting standard dice notation, D\&D ability score generation, advantage/disadvantage rolls, and skill checks against difficulty classes.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides comprehensive dice rolling, coin flipping, and tabletop RPG mechanics for AI assistants like Claude. It enables real-time tabletop gaming through features such as standard NdM notation, advantage/disadvantage rolls, and D\&D character stat generation.
    1
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables dice rolling for RPG games using standard dice notation, supporting complex expressions like keep/drop, reroll, exploding dice, and batch rolls.
    4
    3
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandeepgandhi500/dice-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server