How to run an AI D&D campaign

An AI can't run a D&D campaign it can't remember.

Solo with Claude or ChatGPT, on an AI Game Master platform, or a human GM with an assistant at prep time: every version works for a session or two, and every version drifts by session ten unless the world persists outside the chat. This page is how to pick the setup that fits how you play, and how to keep it consistent. Grimoire, the campaign manager for TTRPG GMs, is the persistence: typed NPCs, factions, quests, and canon any MCP client reads live.

Give your AI a world

Free tier includes MCP. We never charge for AI tokens.

What is an AI D&D campaign?

An AI D&D campaign is any game where an AI helps run the world: Claude or ChatGPT as a solo DM, an AI Game Master platform, or a human GM prepping with an assistant. Every version shares one failure mode: the AI forgets. The fix is a persistent, structured world state the AI can query instead of re-read.

You know the moment. Session three, and the baron your party buried in session one is suddenly alive and hosting a feast. The anti-magic knight casts a spell. Your homebrew rules quietly regress to Forgotten Realms defaults, because the model stopped remembering your world and started remembering the average of everyone's.

Which kind do you want

Two questions pick your setup

Are you playing alone or with people? Do you want strict rules and continuity, or a freeform story? Answer both and the right tool category falls out. Only two of the four need a world that persists.

SoloFreeform story

An AI text-adventure app, or a general model with no setup

Fastest start. Contradictions are part of the fun, so nothing needs to persist.

SoloRules and continuity

Claude or ChatGPT narrating, with the world kept in Grimoire

The model reads open threads and canon at the top of every session and files the recap at the end.

Needs a state layer

With a groupFreeform story

A human GM improvising, an assistant for ideas

The assistant drafts rumors and names on demand. The table is the memory.

With a groupRules and continuity

A human GM with Grimoire as the campaign database, an assistant at prep

The assistant answers "what does the duke know" from your records, and the players get a portal.

Needs a state layer

The AI Game Master platforms run a scene well and are the faster start for a packaged solo game. The question this page answers is what happens to that campaign at session ten, and the honest answer is that it depends on whether the world lives inside one chat history or in a database you own.

Generation is not memory

A model generates the next plausible token, and plausible is not the same as true in your world. Context windows end, chats reset, and the summaries that carry a campaign across those resets compress away exactly the detail that mattered.

Uploading your lore helps, until retrieval returns three paragraphs that mention the Compact instead of the one fact you needed. Retrieval returns prose. Grimoire returns typed state.

This page states the thesis; why AI forgets your campaign, the full explainer, proves it mechanism by mechanism.

The architecture question

Three ways an AI can "know" your campaign

Same question, three architectures. Watch what each one actually does with it.

Generation (a plain chat)

How it answers

Invents a plausible leader, confidently.

Failure mode

Plausible is not true. Every retelling drifts a little further from your canon, and the drift compounds.

Retrieval (uploaded lore, RAG)

How it answers

Returns three paragraphs that mention the Compact.

Failure mode

You get prose to re-read, not the fact you needed, and stale uploads answer for the world as it was two arcs ago.

Typed state (Grimoire over MCP)

How it answers

Returns the faction record's leader field, plus the relationships that changed it, from the live database.

Failure mode

It only knows what you or your AI recorded. An empty database answers nothing.

Only the third survives session thirty.

Three ways in

Bring your own AI. The world stays put.

Solo with Claude or ChatGPT as your DM

Connect over MCP in three clicks. The model opens each session by querying narrative state: open threads, recent recaps, canon facts. It writes the session back as a recap when you finish. Next week the world is still there, in the same state you left it. Free on Grimoire's free tier, free on Claude.ai's free tier: end-to-end free to try.

Playing on an AI Game Master platform

The platform runs the scene, and the good ones run it well. But none of them is designed to be your permanent world record, and your canon should not live and die inside one vendor's chat history. Keep the world in Grimoire: typed, exportable, yours. Any MCP client can query it, and the campaign outlives whatever you play it on.

Human GM, AI at prep time

The assist-not-replace path: you run the table, the assistant drafts rumors, checks continuity, and answers "what does the duke know" from your records instead of its imagination. That workflow has its own page: AI for Dungeon Masters, not AI as the DM.

Concrete proof

The session-open query

Pick up our campaign where we left off. What's open?

get_narrative_state

open_threads (3): The ransom note, unanswered 5 sessions quiet

The Tidewrit Compact's empty chair · stakes: leaderless

Vellhollow burns · opened last session

last_recap: S21: the party fired the granary to cover their escape

canon_facts (2): Abbess Maraveth is dead (S21) · the Compact's charter names no successor

Last session you left Vellhollow burning and the Tidewrit Compact leaderless. Three threads are open, and the ransom note has sat unanswered for five sessions. Where do you start?

No pasted recap. No "as we discussed." The model asked the world.

Narrative state is one query of many: the same connection reads entities and their fields, relationships, knowledge graphs, the Campaign Bible, and World Foundations. Everything it reads comes from the typed campaign database underneath.

The difference, row by row

What changes when the world persists

Most systems remember text. Grimoire models the world. Here is what that means across a campaign's life.

A single chat running your game The same chat + a persistent state layer
Session two Starts from a summary of a summary Starts from a narrative-state query: open threads, recent recaps, canon
Old canon Drifts as the context ages out Read live from typed records on every question
Your homebrew rules Regress toward genre defaults Pinned in World Foundations and the Campaign Bible
Secrets and reveals Everything is one transcript Visibility tiers; GM Secrets stay server-side
The world, long-term Lives inside one vendor's chat history A database you own and export; any MCP client connects

Rows describe the two architectures as of July 2026, not any specific product; Grimoire is the state layer in the right-hand column, and connecting it takes OAuth, not config files.

When you don't need a state layer

A one-shot doesn't need one. Pure improv AI fiction, where contradictions are part of the fun, doesn't need one either; that is a real and legitimate way to play. And if you want a fully packaged play experience with zero setup, an AI Game Master platform will have you rolling faster tonight. The state layer earns its keep when you intend to come back to the same world next week, and the week after that.

Three clicks, no config files

  1. Add https://api.ttrpg.bot/mcp as a custom connector in your AI client.

  2. Sign in with OAuth and approve access.

  3. Pick which campaign the AI may see. Scoping is enforced server-side.

The full walkthrough, tool list, and every client's setup path live on the Grimoire MCP page, with the step-by-step in the MCP setup guide.

Grimoire MCP

We never charge for AI tokens. Bring your own client.

The template

The session-zero prompt

Once the connector is on, paste this as the first message of the campaign chat. It tells the model to read the campaign before it says a word, to treat your records as the only truth, and to file the recap when you stop. Edit the last line for your table.

You are helping me run my D&D campaign. The campaign lives in Grimoire, which you can reach through the connected tools.

Before you answer anything, read the campaign: call current_campaign, then get_constitution, then get_campaign_context, then get_narrative_state.

Treat the campaign's records as the only source of truth. If the records do not cover something, say so and ask me before inventing it. My homebrew overrides anything you know about the default setting.

Open every session by telling me what is still hanging: open threads, the last recap, and anything marked canon since. Close every session by filing a recap as a session_recaps entity and logging a progression on each thread we touched.

Never reveal anything marked GM Secret to my players.

The same instructions live as an installable Claude Skill in the Grimoire MCP repository, with the full read-before-write sequence, the visibility rules, and recipes for parsing prep notes and filing recaps. Paste the prompt if you want to start now; install the skill if you want the model to do it every time without being told.

FAQ

AI D&D campaign questions, answered

Can Claude or ChatGPT run a D&D campaign?

Yes, and they are good at it for a session or two. The failure is longitudinal: context ends, memory compresses, canon drifts. With a persistent state layer connected over MCP, the model queries your world instead of trying to remember it, and a long campaign holds together.

How do I make an AI Dungeon Master remember my campaign?

Three routes, honestly ranked: pasting summaries works for a few sessions and then compounds errors; uploading lore documents helps but retrieval returns prose you re-read rather than facts you query; a typed state layer (what Grimoire is) gives the AI structured records to read and update live, which is the only route that scales past session ten.

Is Grimoire an AI Dungeon Master?

No. Grimoire never runs the game, narrates a scene, or generates your world. It is the campaign database underneath whichever AI does: you bring Claude, ChatGPT, or any MCP client, and Grimoire is what that client reads and writes. If you want a packaged AI DM experience, an AI Game Master platform is the faster start; Grimoire is where the world lives so the campaign outlasts any one tool.

What does a connected AI actually see?

What you choose: entities and their fields, relationships, knowledge graphs, open threads, session recaps, the Campaign Bible and World Foundations. Player-scoped access respects visibility tiers, and GM Secrets are enforced server-side.

Does it cost anything to try?

No. Grimoire's free tier includes MCP, and Claude.ai's free tier supports a custom connector. End-to-end free to try, and we never charge for AI tokens.

Can I run a solo AI campaign in a genre other than fantasy?

Yes. The genre engine reshapes the schema for Sci-Fi, Horror, Post-Apocalyptic, Modern, Superhero, or Historical worlds, so the state layer fits whatever your AI is running.

What is the difference between this and uploading my world doc to a chat project?

A snapshot versus a live query. Uploaded docs freeze the world at upload time and answer by similarity search over prose. Grimoire is queried live on every call, so yesterday's session is already in today's answers, as structure rather than text.

Can I play D&D with AI?

Yes, in three shapes. Solo, with a general model like Claude or ChatGPT narrating, or with an AI text-adventure app or an AI Game Master platform that packages the experience. With a group, a human GM runs the table and uses an assistant for prep, rumors, and continuity checks. Pick by two questions: are you playing alone or with people, and do you want strict rules and continuity or freeform story. The chooser on this page maps the four answers to the right setup.

Is there a free AI D&D DM?

The free tiers of Claude.ai and ChatGPT can both narrate a campaign, and both support a custom connector, so the whole setup on this page costs nothing: a free Grimoire campaign plus a free AI client. AI Game Master platforms generally offer free tiers as well; what they do not offer is a world you own outside their chat history.

Can the AI generate my campaign for me?

The connected model can draft as much as you want: a region, a villain, a session's worth of encounters. Grimoire itself never generates anything. What it does is file what the AI drafts as typed records (NPCs, locations, factions, quests) with real relationships, so the generated material becomes canon the next session can build on instead of text that scrolls away.

Your AI brings the voice. Grimoire keeps the world.

Typed entities, knowledge graphs, GM Secrets, and canon that survives the chat ending. Free tier, no credit card, MCP included.

Start your world