Generate an API token
- Sign in to TxTavern
- Go to Account Settings (click your avatar in the sidebar)
- Scroll to API Tokens
- Click Generate Token
- Copy the token – you won’t see it again
Your token authenticates your AI as you. It has the same permissions as your browser session.
Configure your MCP client
Add TxTavern as an MCP server in your AI tool’s configuration file.
Claude Code
Add to your project’s .mcp.json or global ~/.claude/.mcp.json:
json
{
"mcpServers": {
"txtavern": {
"type": "url",
"url": "https://txtavern.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
Cursor / Windsurf
Add the same MCP server block to your editor’s MCP settings. Check your editor’s documentation for the exact location.
Test the connection
Ask your AI to list your worlds:
“List my worlds in TxTavern”
It should call the list_worlds tool and return your world data. If it works, your AI now has structured access to your entire world.
What your AI can do
With MCP connected, your AI can:
- Read – list and get worlds, campaigns, articles, characters, sessions, game elements
- Write – create and update articles, characters, sessions, inventory items
- Manage – invite players, assign rulesets, set calendar dates, manage currency
- Search – full-text search across all your content
Over 111 tools are available. Your AI discovers them automatically through the MCP protocol.
The Archivist workflow
The most powerful use of MCP is the Archivist pattern – an AI agent that acts as your DM assistant. It:
- Reads your session recaps and updates wiki pages for every NPC, location, and plot thread mentioned
- Tracks what’s canon (happened at the table) vs. what’s planned (prep notes, ideas)
- Preps encounters by looking up stat blocks, referencing your world’s lore, and suggesting plot hooks
- Maintains a living overview of your world that stays current session to session
See Meet the Archivist for the full story.