- Home
- MCP servers
- Dice Roller
Dice Roller
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vandewilly-mcp-dice-roller": {
"command": "python",
"args": [
"-m",
"mcp_dice_roller"
]
}
}
}You can run an MCP server that handles dice rolling and related utilities, then use an MCP client to request rolls, stat generation, coin flips, and other randomization features. This guide shows you how to install, start, and interact with the server, plus practical usage patterns you can apply in tabletop games and decision making.
How to use
To use the server, start it locally and connect your MCP client to the running process. The server exposes a set of dice-rolling and randomization tools, including standard dice notation evaluation, keeping highest/lowest dice, D&D style stat rolling, coin flips, random picking from a list, and percentile dice. You can invoke these tools from your MCP client by calling the corresponding functions and passing the required parameters.
How to install
Prerequisites you need on your machine:
-
Python (3.x) installed and available on your PATH
-
pip (Python package installer) available
Step 1: Install the MCP Dice Roller package
pip install mcp-dice-roller
Step 2: Run the MCP Dice Roller server locally
python -m mcp_dice_roller
Step 3: Connect your MCP client
Use your MCP client to connect to the locally running server. The client will expose functions that map to the server’s capabilities, such as rolling dice, generating D&D-style stats, flipping coins, choosing randomly from options, and rolling percentile dice.
Step 4: Optional client configuration examples
{
"mcpServers": {
"dice_roller": {
"command": "python",
"args": ["-m", "mcp_dice_roller"]
}
}
}
Step 5: Verify the server is responding
Call a simple tool to verify the server is responding, such as requesting a basic roll. You should receive a structured response detailing the notation used, the individual rolls, any kept dice, and the final total.
With Claude Desktop
Configure Claude Desktop to connect to the server by adding the MCP server entry to your Claude configuration file, pointing to the Python runtime and module that runs the MCP Dice Roller.
With VS Code
Configure your MCP settings in VS Code to start the server via Python using the -m flag for the mcp_dice_roller module.
Notes on usage patterns
- Roll two six-sided dice: use the notation 2d6. - Roll a d20 and add a modifier: use 1d20+5. - Roll 4d6 and keep the highest three for character stats: use 4d6kh3. - Roll a coin flip: use the coin flip tool. - Pick a random option from a list: use the random picker tool with a comma-separated list of choices.
Additional content and tools
The server provides several practical tools for tabletop play and decision making, including rolling dice with standard notation, keeping specific dice, generating D&D-style stats, flipping coins, selecting from options, and performing percentile rolls.
Troubleshooting
If you don’t receive a response from the server, ensure Python is installed and that the server process started successfully on your machine. Check that the command you used to start the server matches the runtime shown in the examples. If your client cannot connect, verify there are no network or port restrictions preventing communication with the local MCP server.
Available tools
roll_dice
Roll dice using standard notation and return the notation, individual rolls, kept dice, subtotal, modifier, and total.
roll_multiple
Roll the same dice multiple times and return a list of totals along with a summary of statistics (min, max, sum, average).
roll_dnd_stats
Generate D&D 5e ability scores using the 4d6 drop lowest method, returning detailed roll data and total scores.
flip_coin
Flip a coin once or multiple times and return the results.
pick_random
Choose randomly from a list of options and return the selected item.
roll_percentile
Roll percentile dice (d100) and return the tens and ones results along with the final value.