Dice MCP
Enables tabletop RPG dice rolling through natural language, supporting standard dice formulas, modifiers, exploding dice, and d20 prompts for ability checks, saving throws, attack rolls, and damage rolls.
README
Dice MCP
dice-mcp is a local Model Context Protocol (MCP) server for tabletop role-playing dice rolls. It uses Streamable HTTP at http://127.0.0.1:8000/mcp.
Run locally
This project uses uv. From the repository root, start the server with:
uv run dice-mcp
The server listens only on localhost. Leave it running while using it from an MCP host, then stop it with Ctrl+C.
Tool
roll_dice
Roll one or more dice and add a modifier.
| Parameter | Type | Description |
|---|---|---|
sides |
integer | Number of sides on each die. |
amount |
integer | Number of dice to roll. |
modifier |
integer | Optional value added to the sum of the rolls; defaults to 0. |
exploding |
boolean | Optional; rerolls a die that reaches its maximum value. Defaults to false. |
The result contains displayable individual rolls, their unmodified sum, the modifier, and the final total. An exploded die is marked with *; for example, an exploding d6 result might be {"rolls": ["6*", "3"], "sum": 9, "modifier": 2, "total": 11}.
Dice formulas
The dice utilities also parse conventional dice notation, ready for a formula-based MCP tool:
from dicemcp.dice import parse_formula, roll_formula
parse_formula("2d20+4")
roll_formula("6W6")
Both d/D and the German W/w separator are supported, as are modifiers such as d20-1. An omitted amount means one die.
Prompts
The server provides MCP prompts for common d20 tabletop workflows:
ability_checksaving_throwattack_roll(setadvantage=truefor a D&D attack roll that keeps the higher of2d20)damage_rolladvantage_roll(D&D advantage rolls2d20and keeps the higher die; setdisadvantage=trueto keep the lower die)
They instruct the model to call roll_dice and report the relevant dice and total. They are system-neutral guidance based on familiar d20 conventions.
Add it to LM Studio
Start the server in a terminal first:
uv run dice-mcp
Then, in LM Studio, open the Program tab, choose Install, then Edit mcp.json. Add this entry inside mcpServers:
{
"dice-mcp": {
"url": "http://127.0.0.1:8000/mcp"
}
}
Save the configuration, enable the server in a chat, and ask a dice-related question such as: “Make a Dexterity check with a +3 modifier.” LM Studio supports local MCP servers from version 0.3.17 and uses Cursor-compatible mcp.json notation; see its MCP server guide for current setup details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.