2D6 MCP
Provides a Discord bot with slash commands for dice rolling, rules queries, session management, and Discord webhook posting tools for automated messaging.
Click on "Install 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., "@2D6 MCPRoll 2d6+2 for my Persuasion check"
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.
2D6 MCP — AI GM Assistant
SPDX-License-Identifier: AGPL-3.0-only Copyright (C) 2026 Jupiter Industries (Liam Crowter) and the 2d6mcp maintainers
A system-agnostic Model Context Protocol (MCP) server and hosted Cloudflare Worker providing a mechanical engine, dice roller, rules reference, and AI-powered rulings assistant for tabletop RPGs. Supports sci-fi (OGL/Cepheus Engine SRD), fantasy (Dungeon World, CC-BY-3.0), generic percentile (Basic Roleplaying SRD, BRP OGL v1.0), and d20 fantasy (5E-compatible SRD, CC-BY-4.0) games.
Deployment Modes
Mode | Description | Cost |
Self-Hosted MCP Server | Run locally on your machine. Full BYOD support, MLX-powered audio transcription and ruling synthesis (macOS). Works in any AI harness (Claude, Kilo, Cursor, etc.) | Free (AGPL-3.0) |
Hosted Discord Bot | Deploy to Cloudflare Workers. Discord slash commands, Workers AI-powered rulings (Qwen3 MoE), web dashboard. Zero local setup beyond wrangler. | Free (self-deploy, AGPL-3.0) |
Related MCP server: Dice Rolling MCP Server
Features
Dice Engine —
2d6+1,3d6,d66, target numbers, effect marginsOGL Rules Database — Generated on first use from bundled seed data: Cepheus Engine SRD (OGL v1.0a)
Dungeon World Database — Generated on first use from bundled seed data: moves, classes, spells, monsters, GM tools (CC-BY-3.0)
Basic Roleplaying Database — Generated on first use from bundled seed data: BRP SRD 1.0.2 characteristics, skills, professions, weapons, armor, spot rules (BRP OGL v1.0)
5E-Compatible Database — Generated on first use from bundled seed data: d20 fantasy SRD classes, spells, monsters, feats, and rules (CC-BY-4.0)
AI Rulings — Ask rules questions, get cited answers from OGL/DW/BRP/5E-compatible/BYOD sources. Powered by Qwen3 MoE (Cloudflare) or MLX LLM (self-hosted)
Discord Bot — Slash commands (
/ask,/roll,/session) in your TTRPG server. Real-time rulings with source citationsBYOD Indexing — Ingest your own PDF/text/markdown files for local full-text search (self-hosted only)
Session Management — Start/end sessions, log transcripts, search what was said at the table
Cross-Platform AI — Cloudflare Workers AI (Whisper + LLM) works on any device, no GPU needed
Quick Start — Self-Hosted MCP Server
git clone https://github.com/crowterliam/2d6mcp.git
cd 2d6mcp
npm install
npm run build
npm run setup # create consent token for BYOD mode
npm run populate-ogl # generate the OGL rules database
npm run populate-dw # generate the Dungeon World rules database
npm run populate-brp # generate the Basic Roleplaying rules database
npm run populate-5ecompatible # generate the 5E-compatible rules database
npm run start # run the MCP server (stdio transport)Quick Start — Hosted Discord Bot (Cloudflare)
git clone https://github.com/crowterliam/2d6mcp.git
cd 2d6mcp
npm install
npm run setup-cloudThe interactive wizard guides you through:
Cloudflare login + account setup
Discord bot token + configuration
Worker deployment, D1 + R2 creation, rule seeding
Slash command registration
5 minutes, one command. Then paste the Interactions Endpoint URL in Discord Developer Portal.
MCP Client Configuration
{
"mcpServers": {
"2d6mcp": {
"command": "node",
"args": ["/absolute/path/to/2d6mcp/packages/server/dist/index.js"],
"env": {
"AGREE_BYOD_USE": "true",
"BYOD_PATH": "/path/to/your/rpg/files"
}
}
}
}BYOD — Non-Commercial Use Disclosure
BYOD (Bring Your Own Documents) mode enables local file ingestion for personal, non-commercial use only. By enabling BYOD (AGREE_BYOD_USE="true" or npm run setup), you confirm that:
You are the legal owner of the imported files or hold a valid license to use them.
This tool is provided strictly for personal, non-commercial automation and referencing.
The developers of this software do not condone piracy or the unauthorized distribution of copyrighted tabletop roleplaying materials.
BYOD is self-hosted only and is not available in the hosted Cloudflare Worker.
Tools
MCP Server Tools (Self-Hosted)
Tool | Description |
| Roll 2d6 with modifier, compare against target, return effect margin |
| Roll d20 with modifier, advantage/disadvantage, AC/DC comparison, critical hits and fumbles |
| Roll d100 with BRP-style roll-under, critical success, and fumble detection |
| Roll damage dice with optional type ( |
| Roll any dice notation ( |
| Roll on a named table from any rules system (use |
| Search the OGL database for rules, skills, careers, equipment, or tables |
| Search the Dungeon World database for moves, classes, spells, equipment, monsters, GM tools |
| Search the Basic Roleplaying database for characteristics, skills, professions, weapons, armor, spot rules |
| Search the 5E-compatible database for spells, monsters, classes, feats, and rules |
| Search the Orcus 4e-compatible database for classes, monsters, feats, and rules |
| Search your locally ingested BYOD files (requires consent) |
| Parse a character sheet file into structured JSON |
| Index/re-index all files in your BYOD directory |
| Delete the BYOD index to start fresh |
| List all indexed files with chunk counts and status |
| Show chunk structure for a specific indexed file |
| Index a single file by relative path |
| Retrieve full chunk content by file path + chunk index |
| Synthesize a rules ruling using local MLX LLM with OGL/DW/BRP/5E-compatible/BYOD citations |
| Take recent session transcript, detect rules question, synthesize ruling |
| Start a new game session for transcript logging and rulings tracking |
| End the active game session |
| List all recorded game sessions |
| Generate an AI summary for a session via MLX LLM |
| Log a transcript segment to the current session |
| Get recent transcript segments and rulings |
| Full-text search across session transcripts |
| Transcribe an audio file using local MLX Whisper |
| List in-progress audio transcriptions |
| Reset transcription progress |
| Permanently delete a session and all its data |
| Post messages to Discord webhooks with smart routing |
| Add a Discord webhook with name, URL, tags |
| Remove a stored Discord webhook by name |
| List all configured webhooks |
| Send a test message to verify webhook connectivity |
Discord Bot Commands (Hosted)
Command | Description |
| Ask a rules question — Workers AI Qwen3 MoE returns a cited ruling |
| Roll dice ( |
| Start a game session |
| End the current session |
| View recent transcript and rulings |
| Search session transcript |
| Show available commands |
Architecture
2d6mcp/
├── apps/
│ ├── worker/ # Cloudflare Worker — API, Discord bot, Workers AI, D1, R2
│ ├── bridge/ # Discord voice relay (VPS — raw UDP required)
│ ├── web/ # Vite + React SPA dashboard + landing (Phase 3)
│ └── recorder/ # Browser PWA fallback audio capture (Phase 4)
├── packages/
│ ├── server/ # MCP server — stdio transport, local MLX, BYOD, session DB
│ ├── shared/ # @2d6mcp/shared — dice, keywords, prompts, quality filter
│ ├── ogl/ # @2d6mcp/ogl — OGL rules database + queries
│ ├── dw/ # @2d6mcp/dw — DW rules database + queries
│ ├── brp/ # @2d6mcp/brp — BRP rules database + queries
│ └── 5ecompatible/ # @2d6mcp/5ecompatible — 5E-compatible rules database + queries
├── data/ # SQLite databases (shared)
├── tests/ # Vitest test suite (270 tests)
├── tsconfig.base.json
└── package.json # npm workspaces rootDeployment Model
CLOUDFLARE VPS (Hetzner, DO, etc.)
┌──────────────────────────────┐ ┌──────────────────────────────────────┐
│ API Worker (Hono) │ │ Bridge (Node.js + systemd) │
│ /api/interactions (Discord) │ │ Auto-joins voice channels │
│ /api/ask (Qwen3 MoE) │◄─│ Ring buffer → Worker /api/audio-ingest│
│ /api/roll (shared dice) │ │ Health /push-to-ask HTTP endpoint │
│ /api/auth/* (OAuth2+JWT) │ └──────────────────────────────────────┘
│ D1 (rules) + R2 (audio) │
└──────────────────────────────┘
│
Discord (slash commands live)Agent Modes
This project includes AI agent instructions for common coding assistants. See .kilo/agent/ for domain-specific modes:
Agent File | Domain |
| Master reference — all tools, workflows, environment vars |
| Dice rolling, effect margins, difficulty, boon/bane |
| Rules lookup, table rolling, OGL + BYOD search |
| UPP, characteristics, career paths, skills |
| BYOD sync, listing, inspection, troubleshooting |
Slash commands are in .kilo/command/ for quick access to common operations.
Build & Test
npm install # install all workspace dependencies
npm run build # compile all packages (tsc --build)
npm test # run 270 tests across 26 test files
npm run typecheck # type-check without emitting
npm run start # run the MCP server (packages/server/dist/index.js)Environment Variables
Self-Hosted MCP Server
Variable | Default | Description |
|
| Set to |
| — | Path to directory containing local RPG source files |
|
| Characters per chunk (500–50000) |
|
| Overlap between consecutive chunks |
|
| Maximum files to process per sync |
|
| Maximum chunks from any single file |
|
| Milliseconds per sync batch |
|
| Shared content cache database |
|
| Path to custom OGL SQLite database |
|
| Path to custom DW SQLite database |
|
| Path to custom BRP SQLite database |
|
| Path to custom 5E-compatible SQLite database |
|
| Path to custom Orcus SQLite database |
|
| MLX Whisper model |
|
| MLX LLM model |
|
| Session database location |
|
| STT backend: |
|
| LLM backend: |
Hosted Cloudflare Worker
Variable | Set via | Description |
|
| Discord bot token |
|
| Discord interactions public key |
|
| Discord application client ID |
|
| Discord OAuth2 client secret |
|
| HMAC secret for user JWT tokens |
|
| Worker base URL |
|
| Web dashboard URL |
License
This project uses a multi-license architecture:
Source code (
apps/**,packages/**, root config files): AGPL-3.0-onlyOGL game data (
data/ogl/**): OGL v1.0aDungeon World data (
data/dw/**): CC-BY-3.0Basic Roleplaying data (
data/brp/**): BRP Open Game License v1.05E-compatible SRD data (
data/5ecompatible/**): CC-BY-4.0
The BRP logo (BRP.png in the project root and data/brp/BRP.png) is a trademark of Chaosium Inc., displayed in compliance with Section 15 of the BRP Open Game License v1.0.

You are granted permission to reproduce the logo only for the purpose of labeling derivative works under the BRP OGL.
Full license documentation: LICENSE.md
Copyright © 2026 Jupiter Industries (Liam Crowter) and the 2d6mcp maintainers
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crowterliam/2d6mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server