TRPG Game
An advanced TRPG (Tabletop Role-Playing Game) server designed for automated, AI-driven adventures. This project leverages Large Language Models (LLMs) as the Keeper (KP), allowing the AI to lead, narrate, and manage the game, making every session dynamic and immersive.
Ask AI about TRPG Game
Powered by Claude ยท Grounded in docs
I know everything about TRPG Game. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MCP-TRPG-Game Server
An advanced MCP (Model Context Protocol) powered TRPG (Tabletop Role-Playing Game) server designed for automated, AI-driven adventures. This project leverages the revolutionary MCP technology to seamlessly connect Large Language Models (LLMs) with game mechanics, creating an intelligent AI Keeper (KP) that can dynamically lead, narrate, and manage immersive gaming sessions.
๐ฃ๏ธ Roadmap / Future Goals
- TRPG MCP Client โ UI for dice, character, multiplayer, and more
- Import Your Own Scenarios โ Custom scenario CSV import & editor
- Multi-Player Support โ Multiple players, sessions, real-time
๐ฎ Demo Video
https://github.com/user-attachments/assets/237294ee-6db8-4e5e-8d49-f028fc6b50d7
Key Features
- MCP-powered AI Keeper: Automated, intelligent game master
- Rich MCP toolset: Character, scenario, skill, dice, and event management
- Fast character creation and editing
- Flexible scenario and scene system
- Keeper assistant: NPC dialogue, scene description, random events
- Skill, attribute, sanity checks with dice rolling
- Persistent game records (SQLite)
- CSV seed data for easy import
- Modular service architecture
- Instant game start: Just type "I want to start playing TRPG"
- Language: Traditional Chinese (zh-TW), i18n planned
Getting Started
Prerequisites
-
Install .NET 10.0 SDK
- Download and install .NET 10.0 SDK
-
MCP-Compatible AI Client (Optional for enhanced AI integration)
- Cursor, Claude Desktop, VS Code with MCP extensions, or other MCP-enabled clients
- This enables seamless AI interaction with the TRPG server through MCP protocol
Setup & Launch
-
Build the Project
if you are version 1, please delete ./trpg.db file firstand
dotnet build -
Run the MCP-Enabled TRPG Server
Cursor
Go to:
Settings->Cursor Settings->Tools & MCPYou should see trpg-mcp in the list and enable it. If you donโt see it, clickNew MCP Serverand copy and paste the JSON below.{ "mcpServers": { "trpg-mcp": { "type": "stdio", "command": "dotnet", "args": [ "run" , "--project", "src/ToolBox/ToolBox.csproj", "--stdio" ] } } }if you want to use http mode
dotnet run --project src/ToolBox/ToolBox.csproj{ "mcpServers": { "trpg-mcp": { "type": "http", "url": "http://localhost:5000/mcp" } } }VS Code
Press
F1and enterMCP: List Servers.
You should see trpg-mcp in the listโclick to start the server.
If you donโt see it, pressF1and enterMCP: Open User Configuration, then copy and paste the JSON below.{ "servers": { "trpg-mcp": { "type": "stdio", "command": "dotnet", "args": [ "run" , "--project", "src/ToolBox/ToolBox.csproj", "--stdio" ] } } }if you want to use http mode
dotnet run --project src/ToolBox/ToolBox.csproj{ "servers": { "trpg-mcp": { "type": "http", "url": "http://localhost:5000/mcp" } } } -
Default Database
- Uses SQLite (
trpg.db) by default. The database is auto-created on first run.
- Uses SQLite (
-
API Testing
- Use
MCPTRPGGame.httpfor sample API requests and testing.
- Use
-
Quick Game Start with MCP
- Players can directly send the command "I want to start playing TRPG" via MCP-enabled clients
- The AI Keeper instantly accesses game tools through MCP to launch dynamic sessions
๐ง Available MCP Tools
The server provides 30+ specialized MCP tools for comprehensive TRPG management:
Core Game Tools
-
StartTrpgAdventureโ Instantly initialize a new TRPG session with step-by-step AI guidance -
GetAllScenariosAsyncโ List all available scenarios for selection -
GetScenarioByIdAsyncโ Get detailed info for a specific scenario -
GetAllCharactersAsyncโ List all player characters -
GetCharacterByIdAsyncโ Get a player character's current status -
CreateCharacterAsyncโ Create a new player character (CoC7 rules supported) -
CreateCharacterFromTemplateIdAsyncโ -
UpdateCharacterAsyncโ Update a player character's information -
UpdateCharacterAttributeAsyncโ Update a specific attribute of a player character -
DeleteCharacterAsyncโ Delete a player character by ID -
GetAvailableCharacterTemplatesโ List available character templates for creation
Dice & Check Tools
-
SkillCheckAsyncโ Perform a skill check for a character -
AttributeCheckAsyncโ Perform an attribute check for a character -
SanityCheckโ Perform a sanity check for a character -
SavingThrowAsyncโ Perform a saving throw for a character -
CalculateDamageAsyncโ Calculate damage for an attack -
RollDiceAsyncโ Roll dice using standard notation (e.g., 1d100)
AI Keeper Assistant Tools
-
GenerateSceneDescriptionAsyncโ Generate a vivid scene description (NPCs, items, actions) -
GenerateNpcDialogueAsyncโ Generate dynamic NPC dialogue suggestions -
SuggestChecksAndDifficultiesAsyncโ Suggest checks and difficulty levels for the current scene -
GenerateRandomEventAsyncโ Generate a random event for the scene or scenario -
GetGameProgressSuggestionsAsyncโ Suggest next steps based on game progress
All tools are designed for seamless AI integration through the MCP protocol and are accessible to both AI and human Keepers.
Directory Structure
src
โโโ Common (shared models and utilities)
โ โโโ seed (initial CSV data)
โโโ Modules
โ โโโ Game.Service (module for game logic)
โโโ ToolBox (tools for seeding and managing data)
Contact
For questions or suggestions, please contact the project maintainer.
