dice-server
If you are the rightful owner of dice-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for rolling dice.
🎲 Dice Server
A Model Context Protocol (MCP) server for rolling dice
🌟 Features
- Roll dice with any number of sides
- Roll multiple dice simultaneously
- Automatically calculate the total of all dice rolls
🚀 Installation
npm install @makimaki/dice-server
💡 Usage
As an MCP Server
- Add the server to your Claude.app configuration file:
{
"mcpServers": {
"dice": {
"command": "dice-server",
"env": {}
}
}
}
- Use it in Claude like this:
Please use the roll_dice tool to roll two six-sided dice.
Direct Usage in Code
import { Server } from '@modelcontextprotocol/sdk';
import { StdioServerTransport } from '@modelcontextprotocol/sdk';
// Create server instance
const server = new DiceServer();
await server.run();
🛠️ API
roll_dice
A tool for rolling dice
Parameters
sides
(number, optional): Number of sides on each die (default: 6)count
(number, optional): Number of dice to roll (default: 1, max: 10)
Return Value
{
"dice": "2d6",
"results": [3, 5],
"total": 8
}
🔧 Development
Setup
git clone https://github.com/yourusername/dice-server.git
cd dice-server
npm install
Running Tests
npm test
Building
npm run build
📝 License
MIT
👥 Contributing
Issues and Pull Requests are always welcome!
- Fork this repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m '✨ feat: Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request