Public
Like
mcp-mythic
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v19View latest version
A Mythic Game Master Emulator 2nd Edition implementation as an MCP server. Perfect for solo RPGs or GM-less sessions.
| Tool | Description |
|---|---|
check_scene | Start a scene - Normal, Altered, or Interrupted? |
roll_fate | Ask a yes/no question with given odds |
get_chaos | Get current Chaos Factor (1-9) |
set_chaos | Set Chaos Factor to specific value |
adjust_chaos | Increment or decrement Chaos Factor |
characters | Manage NPCs list (add/remove/list/roll) |
threads | Manage plot threads (add/remove/list/roll) |
When starting a new scene, roll d10 vs Chaos Factor:
| Result | When | Meaning |
|---|---|---|
| Normal | Roll > Chaos | Scene proceeds as expected |
| Altered | Roll ≤ Chaos, even | Same scene with a twist |
| Interrupted | Roll ≤ Chaos, odd | Completely different scene |
Ask the oracle a yes/no question with odds from impossible to has_to_be.
Results: Yes, No, Exceptional Yes, Exceptional No, or Random Event (on doubles).
Represents how out of control the story is (1-9). After each scene:
- Scene went as expected → decrease chaos
- Scene spiraled out of control → increase chaos
Manage NPCs and plot threads using the Mythic 2e chunking system:
Structure:
- 25 slots organized into 5 groups of 5
- Items can appear up to 3 times (for weighting)
Actions:
add- Add item to next empty slot (same item up to 3x)remove- Remove all occurrences of an itemlist- View the current listroll- Random selection using weighted chunking
The Chunking Mechanic:
- Roll to select a group (die size based on item count)
- Roll d10 to select slot within group (1-2=S1, 3-4=S2, etc.)
- If slot is empty → CHOOSE any item that fits, or reroll
Adding important items multiple times increases their probability of being rolled!
const response = await openai.responses.create({
model: "gpt-4o",
input: "Add 'The Dark Lord' to the characters list, then start a new scene",
tools: [{
type: "mcp",
server_label: "mythic",
server_url: "YOUR_ENDPOINT_URL",
require_approval: "never",
}],
});
# Add a character curl -X POST YOUR_ENDPOINT_URL \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"characters","arguments":{"action":"add","name":"Gandalf"}}}' # Roll on characters curl -X POST YOUR_ENDPOINT_URL \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"characters","arguments":{"action":"roll"}}}' # List threads curl -X POST YOUR_ENDPOINT_URL \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"threads","arguments":{"action":"list"}}}'
You: Add Frodo, Sam, and Gandalf to the characters list.
Add "Destroy the Ring" as a thread (twice since it's important).
AI: [adds characters and threads]
✅ Added "Frodo" to slot 1
✅ Added "Sam" to slot 2
✅ Added "Gandalf" to slot 3
✅ Added "Destroy the Ring" to slot 1
✅ Added "Destroy the Ring" to slot 2
You: Start a new scene - we're entering Moria.
AI: [checks scene] 🔄 Scene Altered - Roll: 4 vs Chaos 5
The scene happens, but something's different...
You: Roll a random character to see who causes trouble.
AI: [rolls characters] 🎲 Gandalf
Group roll: 2 → Group 1
Slot roll: 5 → Slot 3
You: Is there a Balrog here? (very_unlikely)
AI: [rolls fate] 🎲 Exceptional Yes - Roll: 3 vs threshold 20
Not just a Balrog... something worse!
- mcp-dice - Minimal MCP server example
- mcp-tester - Test any MCP server
- Mythic GME 2e - Original game