dndbeyond-mcp
A local MCP server that provides access to D&D Beyond character sheets, SRD content (spells, monsters, items), a dice roller, and optional campaign tools via undocumented endpoints.
README
D&D Beyond MCP
A local Model Context Protocol server that gives Claude access to D&D Beyond character sheets, an SRD content search, a dice roller, and (optionally) your campaigns.
Heads up: D&D Beyond has no official public API. The character and campaign tools use undocumented internal endpoints that Wizards of the Coast can change or remove without notice. The spell/monster/item search uses the open-licensed Open5e SRD API, which is stable. Keep usage personal and within D&D Beyond's terms of service.
Tools
| Tool | What it does | Needs auth? |
|---|---|---|
get_character |
Fetch a public character sheet by ID (stats, HP, inventory, spells) | No |
roll_dice |
Roll standard notation: 2d6+3, 4d6, adv d20+5, dis d20 |
No |
search_spells |
Search SRD spells | No |
search_monsters |
Search SRD monster statblocks | No |
search_magic_items |
Search SRD magic items | No |
list_campaigns |
List campaigns on your account | Yes (cobalt cookie) |
get_campaign |
Details for one campaign | Yes (cobalt cookie) |
The character tool only works if the sheet's privacy is set to Public (or Campaign Only) on
D&D Beyond. Find the character ID in the sheet URL: dndbeyond.com/characters/<ID>.
Setup
-
Install Python 3.10+ and the dependencies:
cd dndbeyond-mcp python3 -m pip install -r requirements.txt -
Test that it starts (Ctrl+C to stop — it waits for a client over stdio):
python3 server.py
Testing
A smoke test verifies tool registration, the dice roller (offline), the SRD search (live), and optionally a real character sheet:
python tests/test_smoke.py
To also test a public character sheet, pass its ID (from a
dndbeyond.com/characters/<ID> URL):
python tests/test_smoke.py --character 24998307
Offline checks always run; the live SRD search is reported as SKIP (not a
failure) if you have no network. A clean run ends with smoke test passed.
Connect to Claude Desktop
Edit your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this server (use the absolute path to server.py, and your real python3 path if needed):
{
"mcpServers": {
"dndbeyond": {
"command": "python3",
"args": ["/Users/seansanve/dndbeyond-mcp/server.py"],
"env": {
"DDB_COBALT_COOKIE": ""
}
}
}
}
Replace the path above with wherever this folder lives on your machine. If you use a virtualenv, point
commandat that venv's python (e.g./Users/seansanve/dndbeyond-mcp/.venv/bin/python) so themcpandhttpxdependencies are available.
Restart Claude Desktop. You should see the dndbeyond tools appear. Try:
- "Roll
adv d20+7for me." - "Look up the fireball spell."
- "Fetch D&D Beyond character 12345678."
Enabling the campaign tools (optional)
list_campaigns and get_campaign need your login session:
- Log in to dndbeyond.com in your browser.
- Open DevTools (F12) → Application → Cookies →
https://www.dndbeyond.com. - Copy the value of the
CobaltSessioncookie. - Paste it as
DDB_COBALT_COOKIEin the configenvabove (or in a local.envfile — see.env.example).
This cookie is a login secret — keep it private. It expires periodically; when the campaign tools start failing with auth errors, refresh it.
Notes & limitations
- Undocumented endpoints break sometimes. If
get_characteror the campaign tools return unexpected errors, the endpoints may have changed — check D&D Beyond's network traffic in DevTools to find the current URL and updateserver.py. get_characterreturns a readable summary by default; passraw=truefor the full JSON.- The campaign endpoints (
/api/campaign/stt/...) are best-effort and the least stable part of this server; they may need adjusting for your account. - SRD search only covers open-licensed content, not paid D&D Beyond sourcebooks.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。