An AI Game Master for tabletop RPG campaigns —
open source, self-hosted, and cheaper than a coffee.

A solo session runs ~$0.28 in API usage. Four players for three hours: ~$0.70. No subscription. No platform fees.

How It Works

🎲
Rules in Code, Not Prompts
Full SRD 5.2.1 rules engine — combat, spells, conditions, character progression. Deterministic. Testable. No hallucinated hit points.
🧠
Claude as Your Game Master
Claude handles narration, NPC behavior, and world reactions. It receives structured game state, not raw rulebooks. The numbers come from your code.
🐳
One Command to Play
docker compose up — that's it. Game server, database, web client. Add your Anthropic API key and start your adventure.

Three Ways to Play

🌐
In Your Browser
Open the web client, create a campaign, build a character. Solo or invite friends via join code.
📱
At the Table
Shared display on a laptop. Each player joins on their phone via QR code. Claude narrates through the speakers.
💬
On Discord
Add the Tavern bot to your server. Play in a text channel, join voice — Claude speaks as the GM.

Get Running in Minutes

git clone https://github.com/t11z/tavern
cd tavern
cp .env.example .env
# Add your ANTHROPIC_API_KEY to .env
docker compose up

Then open localhost:3000 and roll for initiative.

About Tavern

Tavern is an open-source project that brings tabletop RPGs to everyone — with an AI that handles the storytelling while your code handles the rules. Built on the SRD 5.2.1 under the Open Game License, powered by Claude, and designed to be self-hosted on anything from a Raspberry Pi to a cloud server. No accounts, no subscriptions, no platform lock-in. Just your API key and a story waiting to be told.

Contribute

Join the Adventure

Tavern is Apache 2.0 licensed and built in the open. Whether you're fixing SRD mechanics, writing world presets, improving the narrator, or building a new client — there's a seat at the table.

Read the Contributing Guide

Good First Contributions

Rules Engine mechanics SRD data corrections World presets (no code required) Documentation improvements

The Party