D&D Beyond MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DDB_NO_SANDBOX | No | Set to 1 to disable Chromium sandboxing. Required in some container/CI environments. | |
| DDB_CHARACTER_CACHE_TTL | No | Character sheet cache lifetime in seconds. Lower values give fresher HP/spell slot data during live play at the cost of more API calls. | 60 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Every rules answer carries a 'Rules:' line or an inline tag — [2024], [2014], [third-party], [homebrew], [playtest] or [edition not stated] — naming the ruleset, and says when the edition shown differs from the one requested. Pass this on to the user. Content defaults to 2024; if the user's table plays 2014, pass rules_edition: '2014'.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| ddb_loginA | Launch a browser and log into D&D Beyond. A Chrome window will open for you to complete login (you have up to 3 minutes) — it closes automatically once your session is saved. After that, character tools work without any browser. |
| ddb_close_browserA | Close the background browser window if one is open. Useful after running ddb_navigate, ddb_interact, or ddb_get_page. |
| ddb_logoutA | Revoke this server's local access to D&D Beyond: blocks any further authenticated tool call immediately, deletes the saved session file on disk, and closes any open browser context. Safe to call repeatedly, including when you were never logged in. This is a LOCAL logout only — it does NOT log your account out on the D&D Beyond website, and it does not call any D&D Beyond endpoint. Run ddb_login again afterward to establish a fresh session. |
| ddb_clear_cacheA | Wipe in-process caches so the next call re-fetches from D&D Beyond. Use this when search results look like the SRD/Open5e fallback (e.g. 2024 cantrips missing from spell results) after you've logged in — the partial compendium build is cached for up to 5 minutes and this forces an immediate retry. cache='spells' (default) clears just the spell/reference compendium; 'all' wipes every cache. |
| ddb_list_charactersA | List all characters in your D&D Beyond account, including their ID, level, race, and class, as JSON delimited in <untrusted_dndbeyond_content> tags (campaign names are the DM's text; species and class names can be homebrew). Requires login — run ddb_login first if you haven't already. |
| ddb_get_character_rawA | Returns raw 300–500 KB character JSON, delimited in <untrusted_dndbeyond_content> tags (it holds the player's free text). Requires confirm_large_response: true. Use ddb_get_character instead for all normal use. Requires login — run ddb_login first if you haven't already. |
| ddb_download_characterA | Download a character's full JSON data to a local file. Requires login — run ddb_login first if you haven't already. |
| ddb_get_characterA | Parse and display a character sheet. Use sections to reduce output: summary (vitals+stats), combat (adds actions/weapons), spells (spellcasting only), inventory, features, concentration, notes (backstory, traits, bonds), or full (default). Requires login — run ddb_login first if you haven't already. The 'Rules:' line under the character's name gives the ruleset of the character's classes and lists content from other rulesets; that content is also tagged inline ([2014], [2024], [homebrew], …). |
| ddb_character_lookupA | Look up the full description of a spell, feat, class feature, subclass feature, racial trait, background feature, or equipped item by name. Supports partial and fuzzy name matching (e.g. 'cutting' finds Cutting Words, 'sheild' finds Shield). Accepts either a numeric character_id or a character_name. Requires login — run ddb_login first if you haven't already. Each result carries a 'Rules:' line naming the entry's ruleset (a custom item reads 'custom item'); a list of matches tags each line instead, except custom items, which stay untagged. |
| ddb_search_monstersA | Search the D&D Beyond monster compendium by name, CR, type, size, or source. Returns a summary list with each entry's source and edition tag. Where a monster exists in both editions, only the rules_edition version is listed and the other is counted as hidden. A source lists the book's entries of either edition (no twin hiding; at most 50 unless list_all) and wins over rules_edition; a book of the other edition adds a note. Lists at most 50 matches, with the exact total and a hint on narrowing; list_all: true lists every match (use only after a search has reported the total and size). Use ddb_get_monster for the full stat block. Works logged out (free D&D Beyond content; the rest is listed as not available without logging in), and falls back to the Open5e SRD when D&D Beyond can't be reached. source: "homebrew" requires login. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_get_monsterA | Get the full stat block for a specific monster from the D&D Beyond compendium. Matches by name: exact, then partial, then D&D Beyond's closest hit when it is close to the name (otherwise "not found" with near matches); with source, only an exact name in that book counts. Shows the rules_edition version, or the other edition when that is the only one found or the only one available to the account (the output says which). A source picks a specific book and wins over rules_edition; when the version shown is not the rules_edition one, a note says so. Works logged out (free D&D Beyond content; locked content shows the SRD text when there is one, else a notice to log in), and falls back to the Open5e SRD when D&D Beyond can't be reached. source: "homebrew" requires login. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_get_campaignA | Fetch campaign information including player characters from a D&D Beyond campaign, as JSON delimited in <untrusted_dndbeyond_content> tags (campaign, character and user names are other people's text). Requires login — run ddb_login first if you haven't already. |
| ddb_list_campaignsA | List all D&D Beyond campaigns you are part of (as DM or player), as JSON delimited in <untrusted_dndbeyond_content> tags (campaign and user names are other people's text). Requires login — run ddb_login first if you haven't already. |
| ddb_get_partyA | Fetch a compact summary of every character in a campaign. Returns HP, AC, initiative, passive scores, ability scores, and skills for the whole party in one call. Requires login — run ddb_login first if you haven't already. Each member's 'Rules:' line gives the ruleset of their classes and lists content from other rulesets; classes, subclass, species and background from another ruleset are also tagged in the header. |
| ddb_navigateA | Navigate to any D&D Beyond URL and return the page's text content. Only dndbeyond.com URLs are allowed. The browser stays open after this call for follow-up ddb_interact or ddb_get_page calls. Call ddb_close_browser when finished. |
| ddb_interactA | Interact with the currently loaded D&D Beyond page by clicking, filling a form field, or taking a screenshot. The 'click' and 'fill' actions require confirm_click / confirm_fill: true — safety gates to prevent prompt injection on rendered DDB pages from triggering unintended state changes (deleting a character, leaving a campaign, posting to a forum). Screenshots are unguarded — they are read-only. |
| ddb_get_pageA | Return the text content of the currently loaded page in the browser. The browser stays open — call ddb_close_browser when finished. |
| ddb_search_siteA | Search D&D Beyond for spells, monsters, magic items, races, classes, or feats. Each category lists the rules_edition version of an entry and counts the other edition's hidden twins. With category "all", the sections share one search header and one combined footer (a reply where every section came from the Open5e fallback has no combined header); a single category keeps its own header and footer. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_list_libraryA | List all books and sourcebooks you own in your D&D Beyond library. Requires login — run ddb_login first if you haven't already. Each book carries an edition tag ([2024], [2014], …). |
| ddb_read_bookA | Read a D&D Beyond book. Accepts either a slug (e.g. dnd/phb-2024) or a plain title (e.g. "Player's Handbook" or "monster manual") — the server resolves titles against your library automatically. Specify chapter_slug for a chapter, query to jump to a heading, and max_chars to control response size. Requires login — run ddb_login first if you haven't already. A 'Rules:' line under the title names the book's ruleset. |
| ddb_get_conditionA | Look up the rules text for a D&D condition (Blinded, Charmed, Exhaustion, Grappled, etc.): SRD 5.2 (2024) by default, SRD 5.1 (2014) on request. No login required. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_spellsA | Search the full D&D Beyond spell compendium by name, level, school, concentration, or ritual. First call builds the compendium (slow); subsequent calls are instant. Requires login for D&D Beyond content; without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_get_spellA | Get the full description of any spell in the D&D Beyond compendium by name. Not limited to a character's known spells. Requires login for D&D Beyond content; without it, falls back to the Open5e SRD. A source picks one book's version and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_equipmentA | Search the D&D Beyond item/equipment compendium by name, rarity, or type. Covers mundane weapons (Longsword, Shortbow), armour (Plate, Chain Mail), adventuring gear, and magic items. Filter by rarity='common' to see mundane equipment along with Common magic items (rarity matches exactly, so 'common' excludes Uncommon). Requires login for D&D Beyond content; without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_get_equipmentA | Get the full stats and description of any item or equipment in the D&D Beyond compendium by name. Works for mundane weapons (e.g. 'Longbow'), armour (e.g. 'Plate'), adventuring gear, and magic items. Requires login for D&D Beyond content; without it, falls back to the Open5e SRD. A source picks one book's version and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_racesA | Search all D&D Beyond races and subraces (including homebrew). Not character-specific. Requires login for D&D Beyond content (run ddb_login); without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_classesA | Search all D&D Beyond classes with hit die and spellcasting. Requires login for D&D Beyond content (run ddb_login); without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_backgroundsA | Search all D&D Beyond backgrounds (including homebrew). Requires login for D&D Beyond content (run ddb_login); without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_featsA | Search feats by name or prerequisite text. Requires login for D&D Beyond content (run ddb_login); without it, falls back to the Open5e SRD. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_class_featuresA | Search class, subclass and optional class features by name, class or subclass, or level gained. Requires login — run ddb_login first if you haven't already. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_racial_traitsA | Search racial traits, including optional ones, by name or species. Requires login — run ddb_login first if you haven't already. A source lists one book's entries and wins over rules_edition. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_search_rulesA | Search the SRD rules chapters by keyword, across chapter and section names and text: SRD 5.2 (2024) by default, SRD 5.1 (2014) with rules_edition '2014'. When the requested SRD has no match (SRD 5.2 on Open5e has no Rules Glossary, so e.g. grappling is only in SRD 5.1), the other SRD's chapters are listed and the reply says so. Returns matching chapters with their slugs and matching sections. Use ddb_get_rules to read one. No login required. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_get_rulesA | Get SRD rules text by chapter or section name or slug (e.g. 'Combat', 'Damage and Healing', 'Cover', 'Grappling', 'attacking'). A chapter returns all its sections. Use query to jump to a keyword within long text. For conditions use ddb_get_condition; for non-SRD rules use ddb_read_book. No login required. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_rate_encounterA | Rate the difficulty of a D&D encounter. Defaults to 2024 XDMG rules (Low/Moderate/High, no multiplier). Set rules_edition to '2014' for the classic DMG XP threshold method (Easy/Medium/Hard/Deadly with encounter multiplier). Monsters are looked up in the compendium automatically — supply 'cr' directly for homebrew. A name that is not found or has no known CR is listed with a note to supply 'cr'; one that matches several different creatures (e.g. 'Red Dragon') lists the candidates with their CRs and asks for the full name. Nothing is guessed. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_encounter_crA | Given a party and a target difficulty, returns the CR to aim for — broken down by encounter shape (solo boss, duo, squad, horde). Defaults to 2024 XDMG rules; set rules_edition to '2014' for classic DMG. No monster lookup required. Use with ddb_rate_encounter to verify a specific monster list. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. |
| ddb_roll_treasureA | Generate a treasure reward using the 2024 XDMG treasure tables (default). Provide either a CR directly or a list of monster names — CR is resolved automatically by name (exact, then partial; official entries only — a name that matches nothing, several different creatures, or a creature with no known CR is reported rather than guessed). treasure_type 'hoard' makes one roll using the highest CR and includes magic items (requires character_level); 'individual' rolls once per monster and sums the results. Limits (rejected requests return an error, never silently truncated): at most 20 monster entries, at most 100 per entry, and at most 200 characters per monster name — these per-entry restrictions apply to hoard requests too, not just individual. 'individual' additionally caps the total rolls (sum of all entry counts) at 100. Returns 2024 content by default; set rules_edition to '2014' for 2014 rules. The 'Rules:' line or [tag] in the output names the ruleset. Only 2024 treasure tables exist: '2014' still rolls them and says so, but resolves monster CRs from 2014 stat blocks. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 36 tools
Most tools are clearly scoped by resource and action, and the ddb_ prefix helps. However ddb_search_site broadly overlaps with the specialized ddb_search_* tools for spells, monsters, equipment, races, classes, and feats, and ddb_character_lookup overlaps with several name-lookup/search tools, so an agent may hesitate between them.
All tools share the ddb_ prefix and almost all follow a snake_case verb_noun pattern (ddb_list_characters, ddb_get_monster, ddb_search_spells). Minor deviations like ddb_character_lookup and ddb_encounter_cr keep it from being fully uniform but do not seriously impair readability.
36 tools is well above the comfortable range for agent selection, and the surface includes a generic search tool plus many specialized search/get pairs for adjacent content types. While D&D Beyond is a broad domain, the count is heavy and partly redundant rather than tightly scoped.
Core read workflows are strong: characters, campaigns, monsters, spells, equipment, rules, conditions, encounter difficulty, and treasure all have appropriate coverage. But several compendium categories (feats, races, classes, backgrounds, class features, racial traits) offer search without a corresponding general get-detail tool, leaving notable dead ends outside character-specific lookup.