DM

ddb-mcp/ddb-mcp

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

8 stars 11 forks 质量 54 趋势 16

D&D Beyond MCP server for Claude — access characters, campaigns, sourcebooks, spells, and more

概览

A Model Context Protocol (MCP) server that gives Claude direct access to your D&D Beyond account — characters, campaigns, sourcebooks, spells, monsters, and more. Find the install path and register with Claude Code: Or edit ~/.claude/settings.json manually: The first time you use the server, you need to authenticate: 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. - : The number in the character URL — dndbeyond.com/characters/140476673 - : 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.

README

以下为原文 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

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:

在 GitHub 查看完整 README

安装

npx playwright install chromium
新手?先看 mcpskill.org 教程 →

配置

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