Skip to main content
Glama

DM20 Protocol

DM20 Protocol

A comprehensive Model Context Protocol server for managing AI-assisted Dungeons & Dragons campaigns, built with FastMCP 2.9+.

  • For Groups — A toolkit to help run campaigns more effectively

  • For Solo Players — A complete virtual D&D experience with AI as the DM

  • For Worldbuilders — Tools to create rich, interconnected game worlds

Status: Under active development. See Roadmap for what's next.

Features

  • Campaign Management — Create and switch between multiple campaigns

  • Character Builder — Auto-populated characters from loaded rulebooks (Standard Array, Point Buy, Roll 4d6, Manual). Starting spells and properly typed equipment auto-populated from rulebook data. Creation dice rolls recorded on the character sheet

  • Character Creation Wizard — Guided step-by-step or Quick Build modes. Asks player name, character level, race, class, ability scores, skills, equipment, and spells. Completeness validation after creation ensures nothing is missing

  • Level-Up & Progression — Automatic HP, class features, spell slots, ASI/feats on level-up

  • Character Sheets — Full D&D 5e stats, inventory, spellcasting, death saves, creation roll history

  • Sheet Sync — Bidirectional Markdown↔JSON sync: edit YAML frontmatter in Obsidian or any editor, DM approves changes

  • D&D Beyond Import — Import characters from D&D Beyond (URL or JSON file)

  • Rest & Recovery — Long rest, short rest with hit dice, spell slot management, death saves

  • NPCs & Locations — Rich world-building with relationships and connections

  • Quest Tracking — Objectives, status, rewards, and branching paths

  • Combat System — Initiative, turns, attack/spell resolution, active effects, concentration tracking, ASCII tactical maps, AoE targeting, encounter builder

  • Compendium Packs — Export/import campaign content as portable JSON packs with conflict resolution (skip, overwrite, rename), selective filtering, and full backups

  • Narrative Fog of War — Progressive location discovery (undiscovered → glimpsed → explored → fully mapped), sensory hints for hidden features, narrator-aware descriptions

  • Party Knowledge — Track what the party knows about the world, with source attribution and bidirectional NPC knowledge sharing

  • Multi-User Permissions — Role-based access (DM, Player, Observer) with output filtering, session coordination, and private messaging — zero overhead in single-player

  • Party Mode — Multi-player web relay: players connect from their phones/tablets via QR code, each getting a personal game interface with narrative feed, character sheet, and action input — all filtered by the permission system. WebSocket real-time push, combat turn coordination, reconnection with message replay, and JSONL queue persistence

  • Rules Edition Selection — Choose between D&D 2024 revised rules and 2014 classic rules when creating a campaign. Both SRD and 5etools data sources loaded automatically

  • Multi-Source Rulebooks — Load rules from SRD, Open5e, 5etools, or custom JSON

  • PDF Rulebook Library — Import and query your own PDFs and homebrew content

  • Bilingual Play — Italian/English D&D terminology resolution (500+ terms)

  • Session Notes — Per-session summaries, XP, loot, attendance

  • Adventure Log — Searchable timeline of all campaign events

  • Context Auto-Refresh — /dm:refrill saves the session and provides instructions to clear context. Two-layer protection: proactive DM trigger at ~65% + automatic PreCompact hook at ~83.5%

  • Dice & Utilities — Rolls, XP calculations, rules lookup

  • 86 MCP Tools — Full list in the User Guide

Related MCP server: World Anvil MCP Server

Installation

3 Steps to Play D&D

You don't need to install anything beforehand. One command sets up everything:

bash <(curl -fsSL https://raw.githubusercontent.com/Polloinfilzato/dm20-protocol/main/install.sh)

The installer asks a few questions (which MCP client you use, where to put your data), handles all dependencies automatically, and configures everything. When it's done:

cd ~/dm20    # go to your play directory
claude       # start Claude Code — the MCP server connects automatically

That's it. You're ready to play. Type /dm:help to see what you can do, or jump straight in with /dm:start.

Using Claude Desktop instead? Just restart it after installation — the MCP server is already configured. Use the MCP tools directly instead of slash commands.

The installer offers two modes. Most users should pick "User" — it's the default:

User (recommended)

Developer

Who it's for

Players who want to play D&D

Contributors who want to modify the code

What it installs

A single dm20-protocol command

Full source code repository

Disk footprint

Minimal (~50 MB)

Full dev environment (~200+ MB)

Prerequisites

None (auto-installed)

None (auto-installed)

How to update

Re-run the install command with --upgrade

git pull && uv sync

Add voice narration

Re-run with --voice

uv sync --extra voice

Running bash install.sh from inside an existing clone? The installer auto-detects it and switches to Developer mode.

Supported platforms: macOS (Apple Silicon & Intel), Linux (x86_64/arm64), Windows via WSL. See Installer Details for the full breakdown.

Want to know what happens under the hood? The Installer Guide covers the full architecture, every edge case we handle, and why we built it this way.

Compatibility

This server implements the open Model Context Protocol standard. It works with any MCP-compatible client — not just Claude.

Platform / Client

Status

macOS + Claude Code

Tested (Intel & Apple Silicon)

macOS + Claude Desktop

Tested (Intel & Apple Silicon)

Linux + Claude Code

Supported, community testing welcome

Linux + Claude Desktop

Supported, community testing welcome

Windows (via WSL)

Supported, community testing welcome

Cursor, Windsurf, Cline, VS Code Copilot

Supported, community testing welcome

OpenAI Codex, Gemini CLI, Amazon Q

Supported, community testing welcome

We're confident in cross-platform support (the installer and server are designed for it), but we can only mark combinations as "Tested" once a contributor confirms them. If you try one of the untested combinations and it works (or doesn't), please open an issue — it helps everyone.

For detailed per-client setup instructions, config file locations, and platform-specific notes, see the MCP Client Setup Guide.

Manual Install

Requires uv.

uv tool install "dm20-protocol @ git+https://github.com/Polloinfilzato/dm20-protocol.git"

Then add to your MCP client's config file (see MCP Client Setup Guide for your client's config path):

{
  "mcpServers": {
    "dm20-protocol": {
      "command": "dm20-protocol",
      "env": {
        "DM20_STORAGE_DIR": "/path/to/your/data"
      }
    }
  }
}

Note: Some clients (like Claude Desktop) don't inherit your shell PATH. Use the absolute path instead: "command": "/Users/you/.local/bin/dm20-protocol" (find it with which dm20-protocol).

On Linux, if dm20-protocol is not found after install, run uv tool update-shell or add ~/.local/bin to your PATH manually.

git clone https://github.com/Polloinfilzato/dm20-protocol.git
cd dm20-protocol
uv sync

Then add to your MCP client's config file (see MCP Client Setup Guide for your client's config path):

{
  "mcpServers": {
    "dm20-protocol": {
      "command": "uv",
      "args": ["run", "python", "-m", "dm20_protocol"],
      "cwd": "/absolute/path/to/dm20-protocol",
      "env": {
        "DM20_STORAGE_DIR": "/path/to/your/data"
      }
    }
  }
}

Note: Claude Desktop doesn't inherit your shell PATH. Use absolute paths for both command and cwd. Find uv with which uv.

Quick Start

Once your MCP client is configured, try these natural language commands to get started:

Create a new campaign called "The Lost Kingdom"
Load the D&D 5e rules: load_rulebook source=srd
Create a level 3 High Elf Wizard named Lyra with Standard Array
Create a location called "Silverdale", a peaceful village surrounded by ancient forests
Create an NPC named Marta, an elderly herbalist who lives in Silverdale
Create a quest called "The Missing Amulet" given by Marta

The AI will use DM20's tools automatically — no special syntax needed. Just describe what you want in plain English. With a rulebook loaded, the Character Builder auto-populates HP, proficiencies, features, equipment, and spell slots from official rules.

For the full list of 86 tools and advanced usage, see the User Guide. For a complete example campaign, see example/dnd/.

Playing the Game

Claude Code includes slash commands that turn Claude into a complete Dungeon Master. Each command injects a detailed DM persona with situation-specific instructions and a dual-agent architecture (Narrator + Arbiter running in parallel).

/dm:start Curse of Strahd           ← start session (once)
/dm:action I explore the tavern      ← exploration, social, any non-combat action
/dm:action I talk to the innkeeper

/dm:combat Wolves burst from the woods!   ← starts combat
/dm:combat I attack with my longsword     ← each combat turn needs /dm:combat
/dm:combat I cast Shield as a reaction    ← still in combat
                                          ← combat ends automatically when enemies fall

/dm:action I search the wolf den     ← back to exploration after combat
/dm:save                             ← save and stop

Important: Use /dm:combat for every action during combat, not just to start it. /dm:action cannot advance combat turns — it's designed for exploration and social encounters only.

Other MCP Clients (Claude Desktop, Cursor, etc.)

Without Claude Code, use DM20's tools through natural language. Add the recommended system prompt to your client's system prompt field for the best experience — it includes the full game loop, combat protocol, and DM behavior guidelines.

The AI will chain tools automatically based on your requests. The experience is good, but slash commands provide more consistent results because they inject context-specific instructions on every message.

By default, when you search your PDF rulebooks with ask_books, the system uses keyword matching — it finds results that contain the exact words you typed. This works well for specific lookups like "fireball" or "fighter".

With RAG (Retrieval-Augmented Generation) enabled, the system understands meaning, not just words. For example:

You ask

Keyword search finds

RAG search also finds

"tanky melee class"

Nothing (no rulebook contains "tanky")

Fighter, Paladin, Barbarian subclasses

"healing without magic"

Pages mentioning both "healing" and "magic"

Healer feat, Herbalism Kit, Hit Dice recovery

"sneaky ranged build"

Partial matches at best

Rogue/Ranger multiclass options, Skulker feat

To enable it, run this from inside Claude Code:

/dm:install-rag

This installs ChromaDB (~200 MB), a local vector database that runs entirely on your machine — no cloud services, no API keys. The command auto-detects your setup and handles platform quirks automatically.

uv sync --extra rag

Note: RAG is not available on macOS Intel (x86_64) due to missing ML library support. Everything else works perfectly without it — keyword search covers most use cases just fine.

Optional: Voice Narration

By default, DM20 narrates through text only. With voice enabled, the DM reads narration and NPC dialogue aloud in real time using text-to-speech (TTS) — no cloud subscriptions or API keys needed.

On Apple Silicon, DM20 uses a 3-tier engine system that picks the best engine for each context. Other platforms use Edge-TTS for all tiers:

Tier

When used

Apple Silicon

Other platforms

Speed

Combat, quick actions

Kokoro — offline

Piper — offline

Quality

DM narration, NPC dialogue

Qwen3-TTS — offline

Edge-TTS — internet

Fallback

If above tiers fail

Edge-TTS — internet

Edge-TTS — internet

First-use note (Apple Silicon): The Qwen3-TTS model downloads ~1.2 GB from Hugging Face on first narrated session. The --voice install step itself is only ~50 MB (packages). The model is then cached and never re-downloaded.

To add voice narration to an existing install:

bash <(curl -fsSL https://raw.githubusercontent.com/Polloinfilzato/dm20-protocol/main/install.sh) --voice

After installation, activate voice inside Claude Code with /dm:profile — it shows an interactive menu to set the interaction mode. Or set it directly:

configure_claudmaster interaction_mode="narrated"

Audio plays in your browser, not the terminal. Run /dm:party-mode, open the URL shown, and leave that tab playing. For LAN sessions (everyone at the same table), only one device should have audio on — mute the browser tab on player devices to avoid the same narration playing from multiple speakers simultaneously.

The complete voice setup walkthrough — interaction modes, 3-tier engine details, and LAN vs remote scenarios — is in the User Guide.

uv sync --extra voice

Development

git clone https://github.com/Polloinfilzato/dm20-protocol.git
cd dm20-protocol
uv sync --group dev

Run tests:

uv run pytest tests/

Run the server locally:

uv run python -m dm20_protocol

Solo Play — AI Dungeon Master

DM20 Protocol includes a complete AI Dungeon Master system for solo D&D play. Claude becomes your DM — narrating the world, roleplaying NPCs, running combat, and tracking all game state automatically.

Game Commands

Command

What it does

/dm:start [campaign]

Begin or resume a game session

/dm:action I search the room

Process any player action

/dm:combat goblins ambush us!

Start or manage combat

/dm:save

Save session and pause

/dm:profile [tier]

Switch model quality: quality, balanced, economy

How It Works

The system uses a dual-agent architecture where two specialized LLM agents run in parallel on every player action:

  • Narrator — Rich scene descriptions, NPC dialogue, atmospheric text

  • Arbiter — Mechanical resolution, dice rolls, rule adjudication

A DM Persona (.claude/dm-persona.md) orchestrates the game loop: gather context, decide what happens, execute via tools, update state, narrate the outcome. A Python-side Archivist agent handles data retrieval and game state tracking without consuming LLM tokens.

Model Profiles let you trade quality vs token cost with a single command. All profiles use Opus with different effort levels — medium effort matches Sonnet quality with ~76% fewer output tokens:

Profile

Model + Effort

CC Agents

Best for

quality

Opus, effort high

Opus

Boss fights, key story moments

balanced

Opus, effort medium

Opus

General play (default)

economy

Opus, effort low

Haiku

Stretching token budgets

Switch mid-session with /dm:profile economy or via configure_claudmaster(model_profile="quality"). The profile updates both the Python-side config and the Claude Code agent files at once.

Interaction Modes control how the DM communicates with players. They are orthogonal to model profiles — any combination of mode × profile is valid (3 × 3 = 9 combos):

Mode

Text

TTS Audio

STT Input

Voice Deps

classic

Yes

No

No

None

narrated

Yes

Yes

No

[voice]

immersive

Yes

Yes

Yes

[voice]

Set at campaign creation with create_campaign(interaction_mode="narrated") or switch mid-session via configure_claudmaster(interaction_mode="immersive"). Default is classic (text-only, no extra dependencies). Non-classic modes require pip install dm20-protocol[voice].

Note: Model profiles and effort levels are a Claude-specific feature. The effort parameter is only supported on Anthropic's Opus models via the Claude API. If you're using dm20-protocol with a different MCP client or LLM backend, the effort setting will have no effect — the system still works, but you won't get the quality/cost scaling that effort provides. CC agent file updates (.claude/agents/*.md) are specific to Claude Code.

Based on academic research showing multi-agent GM outperforms single-agent approaches. Built on the Claudmaster architecture with session persistence, difficulty scaling, and configurable narrative style.

See the Player Guide for how to play, or the Roadmap for what's next.

Documentation

Credits

This project started as a fork of gamemaster-mcp by Joel Casimir, who created the initial foundation for D&D campaign management via MCP.

Component

Origin

Lines

Original code (v0.1.0 foundation)

Joel Casimir

~3.9%

New code (library system, claudmaster, tools, tests)

DM20 Protocol contributors

~96.1%

The project has since been extensively rewritten and expanded with 66 MCP tools, a multi-source rulebook system, a PDF library, the Claudmaster dual-agent AI DM, and comprehensive test coverage.

License

MIT License

Available Tools

97 tools
add_death_saveA

Record a death saving throw result.

Tracks successes and failures. At 3 successes, the character stabilizes (HP set to 1, death saves reset). At 3 failures, the character dies.

Inputs: character_name_or_id (required), success (required), player_id.

add_eventC

Add an event to the adventure log.

Inputs: event_type (required), description (required), title, session_number, +4 more.

add_item_to_characterC

Add an item to a character's inventory.

Inputs: character_name_or_id (required), item_name (required), description, quantity, +4 more.

add_session_noteC

Add notes for a game session.

Inputs: session_number (required), summary (required), title, events, +7 more.

add_spellB

Add a spell to a character's spells known list.

Inputs: character_name_or_id (required), spell_name (required), spell_level (required), school, +7 more.

apply_effectA

Apply an ActiveEffect to a character (SRD condition or custom effect).

For SRD conditions (blinded, charmed, deafened, exhaustion, frightened, grappled, incapacitated, invisible, paralyzed, petrified, poisoned, prone, restrained, stunned), uses the standard condition template.

For custom effects, creates a new ActiveEffect with the provided modifiers.

Inputs: character_name_or_id (required), effect_name (required), source, duration, +1 more.

approve_sheet_changeA

Approve or reject pending player edits from a character sheet.

When approved, changes are applied to the character's JSON data. When rejected, the sheet is regenerated from the current server data, overwriting the player's edits.

Inputs: character_name (required), approve.

ask_booksA

Ask a natural language question across all your rulebooks.

Uses keyword expansion with D&D concept synonyms and TF-IDF scoring to find relevant content across all indexed PDF and Markdown sources.

Examples: - "What options do I have for a melee spellcaster?" - "Find a class good for a dragon-themed character" - "What healing spells are available?" - "Show me tanky fighter options" - "Classes with nature magic"

Args: query: Natural language question or search query limit: Maximum number of results to return (default: 10)

Returns: Formatted search results grouped by source

Inputs: query (required), limit.

build_encounter_toolA

Return encounter suggestions with monster compositions based on party size, level, and difficulty.

Uses the D&D 5e encounter building rules (DMG Chapter 3) to calculate XP budgets and suggest balanced encounters. When rulebooks are loaded, suggests specific monsters.

Inputs: party_size (required), party_level (required), difficulty, creature_type, +1 more.

bulk_update_charactersC

Update properties for multiple characters at once by a given amount.

Inputs: names_or_ids (required), hp_change, temp_hp_change, strength_change, +5 more.

calculate_experienceC

Calculate experience points for an encounter.

Inputs: party_size (required), party_level (required), encounter_xp (required).

check_for_updatesA

Check if a newer version of dm20-protocol is available.

Compares the installed version with the latest on GitHub. Returns update status, current/latest versions, and upgrade command if needed. Call this at session start to notify the user about available updates.

Inputs: no named parameters.

check_sheet_changesA

List pending player edits from character sheet files.

Shows changes detected from player-edited Markdown sheets that are waiting for DM approval.

Inputs: no named parameters.

combat_actionA

Resolve a combat action via the pipeline, apply results, and return a formatted outcome.

Supports weapon attacks (melee/ranged) and saving throw spells. Automatically applies damage to the target's HP, triggers concentration checks, and reports the full mechanical outcome. This is additive -- it does not replace manual roll_dice workflows.

Inputs: attacker (required), target (required), action_type, weapon_or_spell, +5 more.

configure_claudmasterA

Configure the Claudmaster AI DM settings for the current campaign.

Call with no arguments to view current configuration. Provide specific fields to update only those settings (partial update). Set model_profile to switch all model settings at once (quality/balanced/economy). Set interaction_mode to switch how the DM communicates (independent of model_profile). Set reset_to_defaults=True to restore all settings to their default values.

Inputs: llm_model, temperature, max_tokens, narrative_style, +8 more.

create_campaignA

Create a new D&D campaign.

The rules_version parameter selects which edition of the D&D 5e rules to use for this campaign. '2024' uses the revised 2024 rules, '2014' uses the original 5th edition rules.

The interaction_mode parameter controls how the DM communicates:

  • classic: Text-only, no voice dependencies required.

  • narrated: DM responses delivered as TTS audio + text via WebSocket.

  • immersive: Narrated + player STT input from browser.

Interaction mode and model profile are independent axes — any combination is valid.

Inputs: name (required), description (required), dm_name, setting, +2 more.

create_characterA

Create a new player character.

When a rulebook is loaded, auto-populates the character with saving throws, proficiencies, starting equipment, features, HP, spell slots, and more from the class, race, and background definitions. Requires a rulebook to be loaded (use load_rulebook source="srd" first).

Without a rulebook, returns an error message asking to load one first.

Inputs: name (required), character_class (required), class_level (required), race (required), +16 more.

create_locationC

Create a new location.

Inputs: name (required), location_type (required), description (required), population, +3 more.

create_npcC

Create a new NPC.

Inputs: name (required), description, bio, race, +4 more.

create_questC

Create a new quest.

Inputs: title (required), description (required), giver, objectives, +2 more.

delete_campaignA

Delete a campaign permanently. This cannot be undone.

Inputs: name (required).

delete_characterC

Delete a character from the current campaign. Accepts character name, ID, or player name.

Inputs: name_or_id (required).

disable_library_sourceA

Disable a library source for the current campaign.

Removes a library source from the campaign's enabled content. The source will no longer be available for use in this campaign.

Args: source_id: The source identifier (use list_enabled_library to see enabled sources)

Inputs: source_id (required).

discover_adventuresA

Discover D&D adventures by theme, keyword, level range, or storyline.

Search and browse official D&D 5e adventure modules from the 5etools index. Results are grouped by storyline and presented without spoilers.

Empty query with no filters returns a summary of all available storylines.

Keyword mapping examples:

  • "vampire", "gothic", "horror" → Ravenloft

  • "school", "magic school" → Strixhaven

  • "dragon", "cult" → Tyranny of Dragons

  • "heist" → Keys from the Golden Vault, Waterdeep

  • "space" → Spelljammer

Inputs: query, level_min, level_max, storyline, +1 more.

enable_library_sourceA

Enable a library source for the current campaign.

Adds a library source to the campaign's enabled content. You can enable the entire source or filter by content type and specific items.

Examples: - enable_library_source("tome-of-heroes") - Enable all content - enable_library_source("tome-of-heroes", content_type="class") - Enable all classes - enable_library_source("tome-of-heroes", content_type="class", content_names=["dragon-knight"]) - Enable specific class

Inputs: source_id (required), content_type, content_names.

end_claudmaster_sessionB

End or pause a Claudmaster AI DM session, saving all state.

Inputs: session_id (required), mode, summary_notes, campaign_path.

end_combatB

End the current combat encounter.

Inputs: no named parameters.

equip_itemA

Equip an item from inventory to an equipment slot.

Moves the item from the character's inventory to the specified equipment slot. If the slot is already occupied, the current item is automatically unequipped back to inventory first.

Inputs: character_name_or_id (required), item_name_or_id (required), slot (required), player_id.

export_character_sheetA

Export a character to a Markdown sheet file.

Generates a beautiful Markdown character sheet with YAML frontmatter in the campaign's sheets/ directory. The sheet can be viewed in any Markdown editor, with optional Meta-Bind support for Obsidian.

Inputs: name_or_id (required), player_id.

export_packA

Export campaign content as a portable compendium pack.

Creates a JSON pack file containing selected campaign entities (NPCs, locations, quests, encounters). Supports selective export by entity type, location filter, or full campaign backup.

The pack is saved to the packs/ directory inside the data folder.

Inputs: name (required), description, author, tags, +3 more.

extract_contentA

Extract content from a PDF source and save as CustomSource JSON.

Extracts the full content definition from a PDF source based on the table of contents entry. The extracted content is saved to the library/extracted/{source_id}/ directory in CustomSource JSON format, ready to be loaded by the rulebook system.

Examples: - extract_content("tome-of-heroes", "Fighter", "class") - extract_content("phb", "Elf", "race") - extract_content("phb", "Fireball", "spell")

Args: source_id: The source identifier (use list_library to see available sources) content_name: Name of the content to extract (as shown in TOC) content_type: Type of content (class, race, spell, monster, feat, item)

Returns: Success message with path to extracted file, or error message

Inputs: source_id (required), content_name (required), content_type (required).

get_campaign_infoB

Get information about the current campaign.

Returns campaign information including name, description, counts of various entities, and current game state.

Inputs: no named parameters.

get_characterB

Get detailed character information. Accepts character name, ID, or player name.

Inputs: name_or_id (required).

get_class_infoA

Get full class definition from loaded rulebooks.

Works without a campaign loaded (uses global rulebook manager). When a campaign is active, its rulebook manager takes priority.

Inputs: name (required), level.

get_claudmaster_session_stateC

Get the current state of a Claudmaster AI DM session.

Inputs: session_id (required), detail_level, include_history, history_limit.

get_eventsC

Get events from the adventure log.

Inputs: limit, event_type, search.

get_game_stateC

Get the current game state.

Inputs: no named parameters.

get_library_tocB

Get the table of contents for a specific library source.

Returns the full hierarchical table of contents extracted from the PDF or Markdown source, with page numbers and content types.

Args: source_id: The source identifier (use list_library to see available sources)

Inputs: source_id (required).

get_locationC

Get location information.

Inputs: name (required), discovery_filter, player_id.

get_monster_infoA

Get monster stat block from loaded rulebooks.

Works without a campaign loaded (uses global rulebook manager). When a campaign is active, its rulebook manager takes priority.

Inputs: name (required).

get_npcB

Get NPC information.

Inputs: name_or_id (required), player_id.

get_party_statusB

Get the current status of the Party Mode server.

Shows server info, connected players, and action queue stats.

Inputs: no named parameters.

get_race_infoA

Get full race definition from loaded rulebooks.

Works without a campaign loaded (uses global rulebook manager). When a campaign is active, its rulebook manager takes priority.

Inputs: name (required).

get_release_notesB

Fetch the latest release notes from the CHANGELOG.

Returns the most recent changelog entries (Unreleased + last released version) from the GitHub repository. Use this to show users what's new.

Inputs: no named parameters.

get_sessionsB

Get all session notes.

Inputs: no named parameters.

get_spell_infoA

Get spell details from loaded rulebooks.

Works without a campaign loaded (uses global rulebook manager). When a campaign is active, its rulebook manager takes priority.

Inputs: name (required).

import_character_fileA

Import a character from a local JSON file into the current campaign.

Currently supports D&D Beyond JSON format. Save the JSON from your browser's developer tools (Network tab -> character request -> Response).

Inputs: file_path (required), player_name, source_format.

import_from_dndbeyondA

Import a public D&D Beyond character into the current campaign.

Provide a D&D Beyond character URL (e.g., https://www.dndbeyond.com/characters/12345678) or just the numeric character ID. The character must be set to Public on D&D Beyond.

Inputs: url_or_id (required), player_name.

import_packA

Import a compendium pack into the current campaign.

Loads a CompendiumPack JSON file and imports its entities (NPCs, locations, quests, encounters) into the active campaign. Handles name conflicts via the chosen conflict mode. Regenerates all entity IDs and re-links cross-references.

Use preview=true for a dry-run that shows what would happen without changing anything.

Inputs: file_path (required), conflict_mode, preview, entity_filter.

level_up_characterA

Level up a character by one level.

Increments level, calculates HP increase, adds class features, updates spell slots for casters, handles ASI at appropriate levels, and manages subclass selection. Requires a rulebook to be loaded.

Multiclass: if class_name is a class the character doesn't have yet, this acts as a multiclass dip — adding that class at level 1.

Inputs: name_or_id (required), class_name, hp_method, asi_choices, +3 more.

list_campaignsB

List all available campaigns.

Inputs: no named parameters.

list_charactersB

List all characters in the current campaign.

Returns a list of all player characters with their basic information.

Inputs: no named parameters.

list_enabled_libraryB

List all library sources enabled for the current campaign.

Returns a formatted list of all library sources that have been enabled for use in the current campaign, including any content filters.

Inputs: no named parameters.

list_libraryA

List all sources in the library with their content summaries.

Returns a formatted list of all PDF and Markdown sources in the library, showing their index status and content counts.

Inputs: no named parameters.

list_locationsB

List all locations in the current campaign.

Returns a list of all locations with their basic information.

Inputs: no named parameters.

list_npcsB

List all NPCs in the current campaign.

Returns a list of all non-player characters with their basic information.

Inputs: no named parameters.

list_packsA

List all available compendium packs in the packs directory.

Scans the packs/ directory for JSON pack files and returns their names, descriptions, entity counts, and file paths.

Inputs: no named parameters.

list_questsC

List quests, optionally filtered by status.

Returns a list of quests with their basic information and status.

Inputs: status.

list_rulebooksB

List all active rulebooks in the current campaign.

Inputs: no named parameters.

load_adventureA

Load a D&D adventure module and integrate it with your campaign.

This tool orchestrates the complete adventure loading workflow:

  1. Downloads and parses adventure content from 5etools (or uses cached version)

  2. Creates a new campaign or uses the current one

  3. Binds the module to the campaign for progress tracking

  4. Auto-populates Chapter 1 entities (locations, NPCs, starting quest) to begin play

The tool respects spoiler boundaries: only Chapter 1 content is revealed. Later chapters remain hidden until you progress through the adventure.

Examples:

  • load_adventure("CoS") - Load Curse of Strahd into current campaign

  • load_adventure("LMoP", "Lost Mine Campaign") - Create new campaign for Lost Mine of Phandelver

  • load_adventure("SCC-CK", populate_chapter_1=False) - Load Strixhaven intro without auto-population

Common adventure IDs:

  • CoS: Curse of Strahd

  • LMoP: Lost Mine of Phandelver

  • HotDQ: Hoard of the Dragon Queen

  • PotA: Princes of the Apocalypse

  • OotA: Out of the Abyss

  • ToA: Tomb of Annihilation

  • WDH: Waterdeep: Dragon Heist

  • WDMM: Waterdeep: Dungeon of the Mad Mage

  • BGDIA: Baldur's Gate: Descent into Avernus

Use the discover_adventures tool to search for more adventures by theme or level range.

Inputs: adventure_id (required), campaign_name, populate_chapter_1.

load_campaignC

Load a specific campaign.

Inputs: name (required).

load_rulebookB

Load a rulebook into the current campaign.

Inputs: source (required), version, path.

long_restA

Perform a long rest for a character.

Resets spell slots, restores hit dice (half of total, minimum 1), clears death saves, and optionally restores HP to maximum.

Inputs: character_name_or_id (required), restore_hp, player_id.

next_turnB

Advance to the next turn in combat.

Inputs: no named parameters.

open_library_folderA

Open the library folder where users can drop PDF and Markdown rulebooks.

Creates the library/pdfs/ directory if it doesn't exist, then opens it in the system file manager (Finder on macOS, file manager on Linux).

Returns the absolute path to the folder with instructions on next steps.

Inputs: no named parameters.

party_get_prefetchA

Retrieve a pre-generated narrative variant for a combat turn.

If the prefetch engine has a cached variant for this turn, returns a refined narrative instantly (no main-model call needed). On cache miss, falls back to full generation with the main model.

Call this right after party_thinking, before writing your own narrative. If 'cached' is true in the response, use 'narrative' as your starting point and adjust only the details that differ from actual game state.

Inputs: turn_id (required), outcome (required), roll, damage, +1 more.

party_kick_playerA

Kick a player from the Party Mode session.

Disconnects their WebSocket, revokes their token, and deactivates them in the PC registry. They will need a new token to rejoin.

Inputs: player_name (required).

party_knowledgeA

Query what the party knows about the world.

Searches the party's collective knowledge — facts they have learned through NPC interactions, observation, investigation, reading, and other means. Returns matching facts with details on how they were learned.

Use with no arguments to list all known facts. Provide a topic to search for specific knowledge. Optionally filter by source or acquisition method.

Inputs: topic, source_filter, method_filter.

party_pop_actionA

Pop the next pending player action from the Party Mode queue.

Returns the action details (player_id, action_id, text, timestamp) and remaining queue count, or reports that the queue is empty.

Inputs: no named parameters.

party_refresh_tokenA

Generate a new token and QR code for a player, invalidating their old token.

Use when a player needs a new connection link (lost QR code, security concern, or after being kicked and readmitted).

Inputs: player_name (required).

party_resolve_actionA

Resolve a player action and broadcast the response to connected players.

After processing a player action (rolling dice, narrating outcome, updating state), call this tool to push the response to the WebSocket broadcast queue.

Inputs: action_id (required), narrative (required), private_messages, dm_notes.

party_thinkingA

Signal to players that the DM is preparing the next narrative.

Call this immediately after party_pop_action to give players instant visual feedback (animated dots + message) while you think and generate the response. The indicator disappears automatically when you call party_resolve_action.

Inputs: message.

player_actionC

Process a player action in the current Claudmaster session.

Inputs: session_id (required), action (required), character_name, context.

remove_effectA

Remove an active effect from a character by ID or name.

If an exact effect ID is provided, removes that specific instance. If a name is provided, removes all effects with that name.

Inputs: character_name_or_id (required), effect_id_or_name (required).

remove_itemB

Remove an item from a character's inventory.

Removes the specified quantity of an item. If quantity is greater than or equal to the item's current quantity, the item is removed entirely.

Inputs: character_name_or_id (required), item_name_or_id (required), quantity, player_id.

remove_spellC

Remove a spell from a character's spells known list.

Inputs: character_name_or_id (required), spell_name_or_id (required), player_id.

roll_diceC

Roll dice with D&D notation.

Inputs: dice_notation (required), advantage, disadvantage, label.

scan_libraryA

Scan the library folder for new PDF/Markdown files and index them.

Scans the library/pdfs/ directory for PDF and Markdown files, extracts table of contents from new or modified files, and saves indexes for quick searching.

Returns a summary of files found and indexed.

Inputs: no named parameters.

search_libraryB

Search across all indexed library content.

Searches TOC entries by title across all indexed PDF and Markdown sources. Can filter by content type (class, race, spell, etc.).

Args: query: Search term (case-insensitive, searches in titles) content_type: Filter by content type (default: all) limit: Maximum results to return (default: 20)

Inputs: query, content_type, limit.

search_rulesA

Search for rules content across all loaded rulebooks.

Works without a campaign loaded (uses global rulebook manager). When a campaign is active, its rulebook manager takes priority.

Examples: - search_rules(query="fire", category="spell") - Find spells with 'fire' in name - search_rules(class_filter="ranger", category="spell") - All ranger spells - search_rules(query="cure", class_filter="ranger", category="spell") - Ranger spells with 'cure' in name

Inputs: query, category, limit, class_filter.

send_private_messageB

DM can send private messages to individual players via this tool.

Messages are stored in the session coordinator and can be retrieved by the recipient player. Only visible to the specified recipient.

Inputs: player_id (required), content (required), sender_id.

short_restB

Perform a short rest for a character.

Optionally spend hit dice to regain hit points. Each hit die rolled adds 1dX + CON modifier HP (minimum 1 per die).

Inputs: character_name_or_id (required), hit_dice_to_spend, player_id.

show_mapA

Render the current tactical map as ASCII art.

Shows positions of all combat participants on a grid. Returns 'No tactical map active' if no positions are set or no combat is active.

Inputs: highlight_aoe.

start_claudmaster_sessionC

Start or resume a Claudmaster AI DM session.

Inputs: campaign_name (required), module_id, session_id, resume.

start_combatC

Start a combat encounter.

Inputs: participants (required).

start_party_modeA

Start the Party Mode web server for multi-player sessions.

Launches a background HTTP server that allows multiple players to connect via their phones or browsers. Automatically generates authentication tokens and QR codes for each player character in the current campaign.

Returns connection URLs and QR code file paths for each player.

Inputs: port.

stop_party_modeA

Stop the Party Mode web server and disconnect all players.

Gracefully shuts down the server and closes all WebSocket connections.

Inputs: no named parameters.

summarize_sessionA

Generate structured SessionNote from a raw session transcription.

This tool accepts either raw transcription text or a path to a transcription file, then generates a comprehensive structured summary including events, NPCs encountered, quest updates, and combat encounters. The tool leverages campaign context (characters, NPCs, locations, quests) to enrich the summary.

For large transcriptions (>200k characters ≈ 50k tokens), the tool automatically chunks the input into overlapping segments for processing.

Args: transcription: Raw text or file path containing session transcription session_number: Session number for this recording detail_level: Amount of detail in the generated summary speaker_map: Optional mapping of generic speaker labels to character names

Returns: Prompt for LLM to generate SessionNote

Inputs: transcription (required), session_number (required), detail_level, speaker_map.

sync_all_sheetsA

Regenerate all character sheets for the current campaign.

Useful after bulk changes or to ensure all sheets are up to date.

Inputs: no named parameters.

unequip_itemA

Unequip an item from an equipment slot back to inventory.

Moves the equipped item back to the character's inventory and clears the slot.

Inputs: character_name_or_id (required), slot (required), player_id.

unload_rulebookB

Remove a rulebook from the current campaign.

Inputs: source_id (required).

update_characterC

Update a character's properties.

Supports scalar field updates, ability score changes, and list add/remove operations for conditions, proficiencies, languages, and features. List parameters accept JSON arrays (e.g. '["poisoned","prone"]') or comma-separated strings (e.g. 'poisoned,prone').

Inputs: name_or_id (required), name, player_name, description, +32 more.

update_game_stateC

Update the current game state.

Inputs: current_location, current_session, current_date_in_game, party_level, +3 more.

update_questC

Update quest status or complete objectives.

Inputs: title (required), status, completed_objective.

use_spell_slotA

Use a spell slot, decrementing available slots for the given level.

Validates that the character has slots at this level and that at least one is still available. Returns remaining slot count.

Inputs: character_name_or_id (required), slot_level (required), player_id.

validate_character_rulesB

Validate a character against loaded rulebooks.

Inputs: name_or_id (required).

validate_packA

Validate a compendium pack file without importing it.

Checks the pack for schema conformance, version compatibility, entity count consistency, and required fields. Returns a detailed validation report.

Inputs: file_path (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 97 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is notable overlap in some areas. For example, 'ask_books', 'search_library', and 'search_rules' all involve searching content, which could cause confusion. Similarly, 'import_character_file' and 'import_from_dndbeyond' both import characters but from different sources, potentially leading to misselection. However, descriptions help clarify differences, preventing severe ambiguity.

    Naming Consistency4/5

    Tool names generally follow a consistent verb_noun pattern, such as 'add_death_save', 'create_character', and 'list_campaigns'. There are minor deviations, like 'ask_books' (verb_noun but less common) and 'party_get_prefetch' (noun_verb_noun), but overall the naming is predictable and readable across the set.

    Tool Count2/5

    With 97 tools, the count is excessive for a D&D campaign management server, making it overwhelming and difficult to navigate. While the domain is broad, many tools could be consolidated or grouped (e.g., multiple import/export tools) to reduce complexity. This high number detracts from usability and coherence.

    Completeness5/5

    The tool set provides comprehensive coverage for D&D campaign management, including character creation, combat, rulebook handling, campaign administration, and multi-player features. There are no obvious gaps; it supports CRUD operations for entities like characters, NPCs, and quests, and includes advanced functionalities like AI DM sessions and party mode, ensuring agents can handle all typical workflows.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A comprehensive Model Context Protocol server for managing Dungeons & Dragons campaigns with tools for characters, NPCs, locations, quests, combat encounters, and session tracking.
      30
      16
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server that interfaces with the World Anvil API to facilitate AI-assisted worldbuilding and D\&D campaign management. It allows users to manage articles, maps, and RPG-specific resources like session notes and timelines through natural language.
      1
      1
      BSD 3-Clause
    • A
      license
      Not graded
      quality
      C
      maintenance
      An MCP server that enables AI agents to act as dynamic dungeon masters for text-based RPGs with dynamically generated rule systems and comprehensive game state management.
      15
      MIT