Claude Code built my RPG world engine. Now it can also run the game, as the game master, over MCP.
retained text
I've been building Chronicle with Claude Code: you build a fantasy world, and an AI game master runs it for the people you invite. I've worked on and off with it to introduce new systems, construct the UI, and even make live battlemaps. The core design is that the AI narrates and the engine decides. The map, HP, coin, inventory, travel times and what every NPC thinks of you are database rows, and every fight plays out on a battle map where code works out positions and damage. The model only gets tools to call. So I made the model swappable for my own agent. In a private world, you paste one command: `claude mcp add --scope user --transport http chronicle <url> --header "Authorization: Bearer <token>"` That also drops a `\`chronicle-storyteller\`\` subagent into \~/.claude/agents. From then on, Claude Code is the game master. You tell it what your hero does, and it takes the turn. Chronicle makes no model calls of its own, so it runs on the Claude plan you already pay for. You're also able to use it to construct and build a world from scratch! Things I learned getting Claude Code to be a reliable game master: 1. **Context explodes fast**. Playing in the main conversation filled about 250k tokens in 3turns. Now each turn spawns a throwaway subagent (Sonnet 5.5) that loops`\`work`\` → `\`submit\``until the turn is done. The main conversation just calls`\`take\_turn\`\`and then \`\`last\_scene\`\`. 2. **Big tool results get spilled to a file.** Claude Code writes MCP results over about 25ktokens out to disk, so the game master's briefing is paged in 40k-character chunks. 3. **It paraphrases.** Claude kept retelling the scene in its own words instead of showingwhat the engine produced. \`last\_scene\` returns the exact text, with an instruction torelay it word for word. 4. **Tools can't block on the agent's own work.** If a tool waits for something only theagent can do, it deadlocks. Long operations run in the background, and every callreturns the next job, the result, or "still working". 5. **Slim the tool list.** The game master has about 40 world tools. Agents get their namesonly, plus a \`search\_tools\` call for the exact arguments. A turn takes about a minute with a Sonnet helper (30-60 seconds when I last timed one), which is close to the hosted game master. The catch: it only works in private worlds, so you can't run it in a shared world everyone plays. Video made with opus 5.5 too! free to build and try out here: [https://chroniclerpg.xyz](https://chroniclerpg.xyz)
document fetched 2026-10-04 00:22 · canonical https://reddit.com/r/ClaudeAI/comments/1wwbv68/claude_code_built_my_rpg_world_engine_now_it_can