Sponsored by Deepsite.site

RPG Generator MCP Server

Created By
guyroyse8 months ago
Content

RPG Generator MCP Server

A Model Context Protocol (MCP) server that generates random tabletop RPG content—campaign ideas and fantasy region attributes—built with TypeScript using the official MCP SDK.

What is this?

This project demonstrates how to build a simple Model Context Protocol (MCP) server that LLMs can use to generate random tabletop RPG content.

MCP is an open standard that provides a common way for AI models to connect with specialized tools and data sources. By implementing the MCP specification, this server allows LLMs to generate random campaign ideas and fantasy region attributes, which can help spark creativity by forcing connections between unrelated elements.

The server offers two main functions:

  • random_campaign_idea - Generates a random campaign idea by combining character types, settings, and movie inspirations
  • random_region_attributes - Generates random region tags, population levels, and population characteristics for fantasy world-building

Why Random Generators?

Just like gamemasters use random tables to spark creativity by forcing connections between seemingly unrelated elements, LLMs can break out of predictable patterns with randomized inputs. This project demonstrates how MCP can be used to extend an LLM's creative capabilities through specialized tool connections.

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/guyroyse/rpg-generator-mcp-server.git
cd rpg-generator-mcp-server
  1. Install dependencies:
npm install
  1. Build and install:
npm run build

Using the MCP Server

With Claude

  1. Open Claude in the Claude Desktop app

  2. Go to Settings, select Developer, and click on the Edit Config button. This will open the folder that contains your claude_desktop_config.json file.

  3. Add the server to the JSON file:

{
  "mcpServers": {
    "rpg-generator": {
      "command": "rpg-generator-mcp-server"
    }
  }
}
  1. Exit and restart Claude Desktop.
  2. Now, you can ask Claude to generate random campaign ideas or region attributes.

Example prompts:

  • "Generate a random campaign idea for my TTRPG"
  • "I need some random regions for my fantasy world"

Function Reference

random_campaign_idea

Parameters: None

Response: A string describing a campaign idea that combines:

  • Character types (e.g., "Mercenaries", "Escaped Prisoners", "Athletes")
  • Settings (e.g., "Feywild", "Mecha", "Urban Fantasy")
  • Movie inspirations (e.g., "Jurassic Park", "The Princess Bride", "Aliens")

Example response:

The players are Escaped Prisoners adventuring in a Mecha setting experiencing events similar to the movie Jurassic Park.

random_region_attributes

Parameters: None

Response: A markdown-formatted string containing:

  • Region Tags (2 random tags with descriptions)
  • Population Level (density and size of settlements)
  • Population Characteristic (cultural or societal trait)

Example response:

**Region Tags**
Feral Magic: Region where magic has become untamed and manifests as semi-sentient predatory phenomena.
Monastic Retreat: Area dotted with monasteries and meditation sites, often with unique fighting or magical traditions.

**Population Level**
Outpost: A tiny settlement of 10-50 individuals, possibly a trading post, watchtower, research station, or religious retreat. Extremely isolated with minimal facilities.

**Population Characteristic**
Military Tradition: Martial skills are highly valued, with many citizens receiving combat training regardless of their primary occupation. This might stem from a history of conflict, strategic location, or cultural values. Martial accomplishments bring prestige, and military leaders often hold political authority as well.

Extending the Server

This project can be easily extended with additional random generators. To add your own:

  1. Create a new generator function modelled after the existing ones.
  2. Add the generator as a tool in mcp-server.ts.
  3. Build

If you want to test your MCP server without building and installing, you can use the MCP Inspector:

npm run inspect

Acknowledgements

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
ChatWiseThe second fastest AI chatbot™
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
DeepChatYour AI Partner on Desktop
Tavily Mcp
CursorThe AI Code Editor
WindsurfThe new purpose-built IDE to harness magic
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code