RPG MCP Server
Click on "Deploy 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., "@RPG MCP Server Roll 2d6 for damage."
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.
RPG MCP Server
A simple MCP (Model Context Protocol) server for playing RPGs with Large Language Models. It provides tools for dice rolling, success checks, and random event generation.
Features
check_success(probability, critical_rate)- Determines success/failure with optional critical resultsroll_dice(expr)- Rolls dice using standard RPG notation (e.g., '1d6', '2d8+3')generate_event()- Generates random RPG events for plot twists and surpriseslist_tools()- Lists all available tools
Related MCP server: Dice Roller MCP Server
Installation
Prerequisites
Python 3
uv - A fast Python package installer
Setup
Clone the repository:
git clone https://github.com/jnaskali/rpg-mcp.git
cd rpg-mcpInstall dependencies with uv:
uv syncConfiguration
Add the following to your MCP client's configuration file (e.g., mcp.json in Claude Desktop or other MCP-compatible clients):
{
"mcpServers": {
"rpg-mcp": {
"command": "/usr/bin/uv",
"args": [
"run",
"python",
"app.py"
],
"cwd": "/PATH_TO/rpg-mcp/"
}
}
}Replace /PATH_TO/rpg-mcp/ with the actual path to your rpg-mcp directory.
Usage
Once configured, the LLM can call the tools to:
Roll dice for attacks, damage, or skill checks
Determine action outcomes with customizable success probabilities
Generate random events to drive the narrative forward
Example Prompt
Include instructions in your prompt like:
"Call check_success whenever a player character attempts something with a chance of failure, and generate_event to generate a random event at the start of a new scene or when moving to a new location."
The event generation system is inspired by Mythic Game Master Emulator.
Tool calling works best with models that support function calling, such as Claude, GPT-4, Mistral, Llama, or Qwen.
Examples
Test the server by asking the LLM to generate a random event. The unique format should make it clear whether the tool is working or if the LLM is hallucinating results.
Available Tools
6 toolscheck_successB
Check for success based on a given probability.
Args: probability: Chance of success (0-100). Default 80. critical_success: Top % range for critical success (0-50). Default 5. critical_failure: Bottom % range for critical failure. Defaults to critical_success value.
Inputs: probability, critical_failure, critical_success.
generate_addressC
Generate random addresses.
Inputs: count, locale.
generate_corporationA
Generate a random corporation name from the local file.
Inputs: no named parameters.
generate_eventA
Generate a random abstract RPG event.
Inputs: no named parameters.
generate_nameA
Generate random modern names. Args: count: Number of names (1-50). gender: 'male', 'female', or 'random'. locale: Locale code (e.g., 'en_US', 'de_DE', 'fr_FR').
Inputs: count, gender, locale.
roll_diceA
Roll dice using RPG notation (e.g., '2d6', '1d20+5').
Inputs: expr (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct purpose: address generation, corporation generation, success checking, dice rolling, event generation, and name generation. There is no overlap between these functions, and check_success vs roll_dice are clearly different mechanics.
All tool names follow a verb_noun pattern. Four use the 'generate_' prefix, while the other two use clear action verbs ('check_success', 'roll_dice'). The naming is predictable and consistent in structure.
Six tools is well within the ideal range for an RPG assistant, covering both generation and resolution without unnecessary bloat. Each tool is useful and distinct, making the set well-scoped.
The set covers core RPG needs: dice rolling, probability checks, and varied random generation (names, events, addresses, corporations). Some possible additions like item or character generation are missing, but the essential workflows are present.
Related MCP Connectors
Play and build AI RPG worlds: your agent tells the story, Worldtable keeps HP, items and the map.
A persistent tabletop RPG with an AI dungeon master. Agents and humans share one table.
Fair, reproducible randomness for agents: dice, coins, integers, list picks, shuffles, with seeds.
Fair, reproducible randomness for agents: dice, coins, integers, list picks, shuffles, with seeds.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides 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.-
- FlicenseNot gradedqualityDmaintenanceProvides 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-
- AlicenseNot gradedqualityCmaintenanceEnables AI to act as Game Master for tabletop RPGs with deterministic dice, five-tier outcomes, FitD-style stress, combat tracking, clocks, investigations, NPC relationships, and world generation via 134 tools over MCP.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables 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.-