D&D Beyond MCP Server

D&D Beyond MCP Server

An MCP server that provides Claude direct access to D\&D Beyond accounts to manage characters, campaigns, and sourcebook content. It enables users to search for spells and monsters, retrieve character data, and read owned digital books through an authenticated session.

Category
访问服务器

README

D&D Beyond MCP Server

A Model Context Protocol (MCP) server that gives Claude direct access to your D&D Beyond account — characters, campaigns, sourcebooks, spells, monsters, and more.

Features

Tool Description
ddb_login Authenticate with D&D Beyond (Wizards ID). Run once to save your session to disk.
ddb_list_characters List all characters in your account with ID, level, race, and class.
ddb_get_character Fetch full character JSON from the D&D Beyond character API.
ddb_download_character Save a character's full JSON data to a local file.
ddb_list_campaigns List all campaigns you're part of (as DM or player).
ddb_get_campaign Fetch campaign details — DM, description, and active characters.
ddb_list_library List all sourcebooks you own, purchased, or have shared with you.
ddb_read_book Read content from an owned sourcebook, optionally by chapter slug.
ddb_search Search for spells, monsters, magic items, races, classes, or feats.
ddb_navigate Navigate to any D&D Beyond URL and return its text content.
ddb_interact Click, fill, or screenshot the currently loaded browser page.
ddb_current_page Return the text content of whatever page is currently loaded.

Prerequisites

Installation

Option A — Install directly from GitHub (recommended)

npm install -g "https://github.com/ddb-mcp/ddb-mcp/archive/refs/heads/main.tar.gz"

Then install the browser:

npx playwright install chromium

Find the install path and register with Claude Code:

npm root -g
# outputs something like /usr/local/lib/node_modules
claude mcp add dndbeyond node /usr/local/lib/node_modules/ddb-mcp/dist/index.js

Option B — Clone and build manually

git clone https://github.com/ddb-mcp/ddb-mcp.git
cd ddb-mcp
npm install
npx playwright install chromium

Register with Claude Code:

claude mcp add dndbeyond node /absolute/path/to/ddb-mcp/dist/index.js

Or edit ~/.claude/settings.json manually:

{
  "mcpServers": {
    "dndbeyond": {
      "command": "node",
      "args": ["/absolute/path/to/ddb-mcp/dist/index.js"]
    }
  }
}

Usage

First-time login

The first time you use the server, you need to authenticate:

ddb_login

A browser window (Chrome for Testing) will open and navigate to the D&D Beyond login page. Complete the login using your Wizards ID account. Once you're redirected back to D&D Beyond, your session is automatically saved to ~/.config/ddb-mcp/session.json and reused on all future calls.

You only need to log in once. If your session expires, just run ddb_login again.

Example prompts

List your characters:

List all my D&D Beyond characters

Get full character data:

Get the full character sheet for character ID 140476673

List your campaigns:

What campaigns am I part of on D&D Beyond?

Get campaign details:

Show me the details for campaign 6709239, including all the player characters

Search for spells:

Search D&D Beyond for spells named "Fireball"

Search for monsters:

Find the Beholder stat block on D&D Beyond

Read a sourcebook:

Show me the table of contents for the Player's Handbook
Read the Barbarian class section from the Player's Handbook

Download a character:

Download the character data for Roland Stonehelm to my Downloads folder

Finding character and campaign IDs

  • Character ID: The number in the character URL — dndbeyond.com/characters/140476673
  • Campaign ID: The number in the campaign URL — dndbeyond.com/campaigns/6709239

You can also use ddb_list_characters and ddb_list_campaigns to get IDs without leaving Claude.

Book slugs for ddb_read_book

Use ddb_list_library to get the slug for any book you own. Examples:

Book Slug
Player's Handbook (2024) dnd/phb-2024
Dungeon Master's Guide (2024) dnd/dmg-2024
Monster Manual (2024) dnd/mm-2024
Player's Handbook (2014) dnd/phb-2014

To read a specific chapter, pass the chapter path after the book slug:

ddb_read_book("dnd/phb-2024", "character-classes/barbarian")

Upgrading

To upgrade to the latest release, run the install command again — npm will overwrite the existing installation:

npm install -g "https://github.com/ddb-mcp/ddb-mcp/archive/refs/heads/main.tar.gz"

To install a specific tagged version:

npm install -g "https://github.com/ddb-mcp/ddb-mcp/archive/refs/tags/v1.0.2.tar.gz"

Then restart Claude Code and run /mcp to reconnect the server.

Session storage

Your session is saved to ~/.config/ddb-mcp/session.json. This file contains browser cookies and local storage from your D&D Beyond login. Keep this file private — it grants access to your account.

To log out or reset your session, delete the file:

rm ~/.config/ddb-mcp/session.json

Development

# Run in development mode (no build step needed)
npm run dev

# Build
npm run build

# Watch mode
npm run build:watch

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选