d20-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@d20-mcpRoll 4d6kh3 for ability scores"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ฒ d20-mcp
๐น๐ท Tรผrkรงe README iรงin tฤฑklayฤฑn / Click here for Turkish README
A powerful MCP (Model Context Protocol) server for dice rolling in RPG games. Built with FastMCP and the d20 library, this server brings comprehensive dice mechanics to Claude and other MCP clients.
Perfect for D&D, Pathfinder, and any tabletop RPG that uses standard dice notation!
โจ Features
๐ฏ Simple Rolls: Quick
1d20+5expressions with instant results๐ Detailed Analysis: See every die roll with AST breakdown
โก Batch Rolling: Roll multiple expressions efficiently
โ Syntax Validation: Check expressions before rolling
๐ฎ Advanced Mechanics: Keep/drop, reroll, exploding dice, and more
๐ค LLM-Optimized: Comprehensive tool descriptions for AI understanding
Related MCP server: Dice Roller MCP Server
๐ Quick Start
Easy Setup (Remote MCP)
The quickest way to use d20-mcp - no installation needed!
Open Claude Desktop
Go to Settings โ Connectors
Click Add Custom Connector
Enter the URL:
https://d20-mcp.fastmcp.app/mcp
Note: Remote MCP support is currently in beta and available for Claude Pro, Max, Team, and Enterprise users.
Local Installation (Alternative)
For local installation with uvx:
uvx --from git+https://github.com/saidsurucu/d20-mcp d20-mcpClaude Desktop Configuration (Local)
Add this to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"d20-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/saidsurucu/d20-mcp",
"d20-mcp"
]
}
}
}Restart Claude Desktop completely (Quit and reopen), then look for the ๐จ hammer icon!
๐ธ Screenshot

๐ฎ Usage Examples
Once installed, try these prompts with Claude:
Basic Rolling
Roll 1d20+5 for my attackCharacter Creation
Roll 6 sets of 4d6kh3 for ability scoresCombat
Roll attack (1d20+7) and damage (2d8+4) for my greatswordWith Advantage
Roll 2d20kh1+5 for my Perception check with advantageComplex Expressions
Roll (1d4+1)*2 for Magic Missile damage๐ ๏ธ Available Tools
roll
Quick dice rolls returning total and formatted result. Perfect for standard gameplay.
Use for: Attack rolls, ability checks, damage, saving throws
roll_detailed
Comprehensive breakdown with AST structure showing individual die values and operations.
Use for: Character creation, debugging complex rolls, transparency
roll_batch
Roll multiple different expressions in one operation.
Use for: Combat rounds, rolling all ability scores, party checks
validate_syntax
Validate expressions without rolling (no randomness).
Use for: Testing complex expressions, user input validation
๐ Supported Dice Notation
Basic
1d20- Roll one 20-sided die3d6- Roll three 6-sided diced20- Equivalent to 1d20
Keep/Drop
4d6kh3- Keep highest 34d6kl1- Keep lowest 14d6p1- Drop lowest 1
Reroll
1d20rr<10- Reroll until โฅ101d20ro1- Reroll 1s once
Exploding Dice
1d6e- Explode on max1d6e6- Explode on 6
Min/Max
1d20mi10- Minimum 101d20ma20- Maximum 20
Arithmetic
1d20+5- Addition2d6-1- Subtraction3d6*2- Multiplication(1d4+1)*2- Parentheses
Advanced
2d20kh1+5- Advantage in D&D2d20kl1+2- Disadvantage8d6 [fire]- Annotated damage (withallow_comments)
๐ฏ Common RPG Use Cases
D&D 5e Character Creation
Roll me 6 ability scores using 4d6 keep highest 3Attack with Advantage
I have advantage on this attack. Roll 2d20kh1+8Critical Hit
I crit! Roll 4d6+2d6+5 for my sneak attack damageMultiple Saves
Roll saves for 4 party members: 1d20+5, 1d20+2, 1d20+7, 1d20+3๐ง Development
Local Testing
# Clone the repository
git clone https://github.com/saidsurucu/d20-mcp.git
cd d20-mcp
# Run with uv
uv run server.py
# Or with Python directly (after installing dependencies)
python server.pyProject Structure
d20-mcp/
โโโ server.py # Main MCP server with 4 tools
โโโ pyproject.toml # Project configuration
โโโ README.md # English documentation
โโโ README.tr.md # Turkish documentation
โโโ LICENSE # MIT License๐ค Contributing
Contributions are welcome! Feel free to:
Report bugs
Suggest new features
Submit pull requests
Improve documentation
๐ License
MIT License - see LICENSE file for details.
๐ Credits
Built with:
๐ Learn More
Made with โค๏ธ for the TTRPG community
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/saidsurucu/d20-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server