Skip to main content
Glama
jnaskali

RPG MCP Server

by jnaskali

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

Related MCP server: Dice Roller MCP Server

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

Available Tools

6 tools
check_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
probabilityNo
critical_failureNo
critical_successNo

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not state what the tool returns, whether it uses randomness, or what critical success/failure mean for the output. The only behavioral hint is the default relationship between critical_failure and critical_success.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a single-sentence purpose followed by a concise parameter list. Every sentence adds value, with no redundancy or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool's output behavior is entirely unspecified; it does not describe the return value, how critical successes or failures affect results, or whether the check is random. Given that no output schema exists and annotations are absent, the description should have disclosed the outcome format and rules, making it incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds semantic meaning to all three parameters by explaining their ranges and defaults, such as 'Chance of success (0-100)' and 'Top % range for critical success (0-50)'. It also clarifies critical_failure's default behavior, compensating for the input schema's 0% description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('Check') and resource ('success'), distinguishing it from sibling tools like roll_dice. It focuses on probability-based success checks rather than general generation, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives, nor does it mention exclusions or sibling tools. Usage is only implied by the tool's name and one-sentence purpose, leaving the agent to infer appropriate contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_addressC

Generate random addresses.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNo
localeNoen_US

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing behavioral traits. It only states the obvious 'random' generation but does not mention output format, whether the result is deterministic, side effects, or constraints. For a tool with parameters like count and locale, the description adds little beyond what the name implies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, consisting of a single short sentence. It is front-loaded and has no waste, but it is under-specified, bordering on being a restatement of the tool name. It earns its place but does not go beyond minimal information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has two optional parameters and no output schema, the description is too sparse to be complete. It does not describe what the output looks like, how count affects the result, or the role of locale. The agent is left to infer these from parameter names, which is insufficient for reliable invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not mention or explain the 'count' and 'locale' parameters. The schema itself only provides defaults and titles, so an agent gets no meaningful semantic information about what these parameters control. The description fails to compensate for the missing schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Generate random addresses' uses a specific verb and resource, clearly distinguishing this tool from its siblings (generate_name, generate_corporation, etc.) that generate different types of random data. Though brief, it unambiguously states the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any exclusions, prerequisites, or scenarios where other generate_* tools might be preferred. The context from sibling tools is fully absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_corporationA

Generate a random corporation name from the local file.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses that the name is random and sourced from a local file, but it does not mention potential errors, side effects, or what the output looks like. For a generation tool, this is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no unnecessary words. It efficiently communicates the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a no-parameter random generator, the description is sufficiently complete: it states the action and the output type. However, it could have clarified the difference from generate_name or mentioned any failure modes, but overall it is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema already covers everything. The description does not need to add parameter information, and the baseline for 0 params is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Generate' with a clear resource 'random corporation name' and source 'local file'. This clearly distinguishes it from sibling tools like generate_address and generate_event, and even from generate_name by specifying 'corporation'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for when a random corporation name is needed, but it does not explicitly state when to use this tool over alternatives such as generate_name. No exclusions or alternative mentions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_eventA

Generate a random abstract RPG event.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry all behavioral disclosure. It states the tool generates a random event, implying a non-deterministic, likely side-effect-free operation. However, it does not mention output format, whether it modifies state, or any constraints, leaving some ambiguity.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence with no unnecessary words. It is concise and front-loaded, though it omits additional helpful details that could be included without bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is simple (no parameters, no output schema), the description is functional but minimal. It defines the purpose but does not explain the return value's structure or format, which is relevant since no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema covers everything. Per the baseline for zero-parameter tools, the description does not need to compensate for missing parameter explanations, earning a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb (generate) and the resource (a random abstract RPG event), making the tool's function unambiguous. While it doesn't explicitly distinguish from siblings like generate_corporation, the object type 'event' provides sufficient specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you need a random RPG event) but provides no explicit context on when to prefer this over sibling tools like roll_dice or check_success. The intended use case is implied rather than articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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').

ParametersJSON Schema
NameRequiredDescriptionDefault
countNo
genderNorandom
localeNoen_US

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden for behavioral disclosure. It only lists parameters and does not explain what the return value looks like, how randomness works, or what happens with invalid inputs. This is a significant gap for a tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, with a one-line summary followed by a clean list of parameters. Every sentence earns its place, and the format is immediately scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with three optional parameters and no output schema, the description adequately covers the inputs but fails to mention return value or error behavior. It is a minimum viable description, but it leaves the agent uncertain about what the tool actually returns (e.g., a single name vs. a list).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful detail beyond the schema: it specifies the count range (1-50) and gives concrete locale examples (en_US, de_DE, fr_FR). It also explicitly enumerates gender options. These constraints and examples are not present in the input schema, so the description enhances parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Generate random modern names.' This is a specific verb and resource, distinguishing it from sibling tools like generate_address, generate_corporation, and generate_event. The purpose is immediately and unambiguously clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any exclusions or prerequisites. The user is left to infer that it is for names, but no explicit context about usage scenarios is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

roll_diceA

Roll dice using RPG notation (e.g., '2d6', '1d20+5').

ParametersJSON Schema
NameRequiredDescriptionDefault
exprYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full behavioral burden. It explains the input format and that it supports modifiers, but it does not disclose the exact return value (e.g., whether it returns the sum, individual rolls, or a structured object). This is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, focused sentence. It is front-loaded and uses examples to convey the format efficiently. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, but with no output schema, the description should at least hint at what the output looks like. It does not. For a dice roller, the output is usually a number, but that is not confirmed. The description is adequate for basic use but leaves the return format ambiguous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description compensates by explaining the parameter semantics: 'expr' is an RPG notation string, with examples showing format. It adds meaning beyond the plain 'string' type, though it could be even more explicit about allowed expressions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: rolling dice using RPG notation. It includes concrete examples ('2d6', '1d20+5') that reinforce the purpose. The sibling tools are all generators (address, name, etc.), so roll_dice is distinctly identifiable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for rolling dice in RPG notation, providing clear context for when to use it. It does not explicitly name alternatives or exclusions, but the domain is obvious enough that no further guidance is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.2.0
    • First observedcheck_success
    • First observedgenerate_address
    • First observedgenerate_corporation
    • First observedgenerate_event
    • First observedgenerate_name
    • First observedroll_dice

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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
    -
  • A
    license
    A
    quality
    D
    maintenance
    Enables dice rolling for RPG games using standard dice notation, supporting complex expressions like keep/drop, reroll, exploding dice, and batch rolls.
    4
    3
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables 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.
    2
    MIT