Bring Your Own AI
TxTavern is built MCP-first. Every feature is an MCP tool. Any AI that speaks the protocol can read and write your worlds, campaigns, lore, characters, and sessions.
What is MCP?
The Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. Instead of copy-pasting context into a chat window, your AI connects directly to TxTavern's API and has structured access to everything.
When you ask your AI "what happened in session 34?", it doesn't guess. It calls
get_game_session and reads the actual data. When you say "create an NPC
named Aldric, a blacksmith in Thornwick", it calls create_article with
the right fields. No hallucination. No manual data entry.
Connect your AI in three steps
Generate an API token
Sign in, go to Account Settings, and generate an API token. This authenticates your AI as you -- it sees what you see, does what you can do.
Add to your MCP config
Add TxTavern as an MCP server in your AI tool's configuration:
{
"mcpServers": {
"txtavern": {
"type": "url",
"url": "https://nemesis.txtavern.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
Start talking to your world
Your AI now has access to over 99 tools. Ask it to list your worlds, create an NPC, prep an encounter, or look up a rule. It has full context on your world's data.
Compatible AI tools
Claude Code
Anthropic's CLI assistant. Add TxTavern to your project's .mcp.json
and Claude becomes your DM assistant right in the terminal.
Cursor
The AI-first code editor. Configure MCP in Cursor's settings and access your world data alongside your code.
Windsurf
Codeium's AI IDE. MCP support lets you manage your campaign from the editor.
Custom agents
Build your own agent with the Claude API or any MCP client library. The Archivist pattern is a reference implementation.
The Archivist pattern
The Archivist is TxTavern's reference AI agent -- a DM assistant that reads session recaps, maintains a wiki, preps encounters, and tracks canon. It's not a product feature you enable. It's a pattern you implement with your AI of choice.
The pattern works like this: you keep a story/ directory of markdown files
alongside your TxTavern data. Your AI reads session recaps and fans out updates to
NPC pages, location pages, plot thread trackers, and the world overview. It distinguishes
canon (what happened at the table) from ideas (what might happen next). It runs wiki
operations -- ingest, query, and lint -- to keep the knowledge base healthy.
The MCP tools give the AI structured access to TxTavern's database. The markdown wiki gives it long-form narrative context. Together, they create an agent that knows your world deeply enough to be useful at the table.