RPG MCP Server

RPG MCP Server

Enables playing RPGs with LLMs through tools for dice rolling (e.g., '1d6'), success checks with criticals, and random event generation.

Category
Visit Server

README

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.


Example screenshot of RPG MCP in use


Features

  • check_success(probability, critical_rate) - Determines success/failure with optional critical results
  • roll_dice(expr) - Rolls dice using standard RPG notation (e.g., '1d6', '2d8+3')
  • generate_event() - Generates random RPG events for plot twists and surprises
  • list_tools() - Lists all available tools

Installation

Prerequisites

  • Python 3
  • uv - A fast Python package installer

Setup

  1. Clone the repository:
git clone https://github.com/jnaskali/rpg-mcp.git
cd rpg-mcp
  1. Install dependencies with uv:
uv sync

Configuration

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.

[!IMPORTANT]
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.

Screenshot of a working test

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

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.

Official
Featured