Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Dnd Rules

БесплатноНе проверен

MCP server for D&D 5e rules lookup (spells, monsters, conditions, classes, magic items). Powered by Open5e. Defaults to 2024 SRD (5.5e); supports 2014 fallback.

GitHubEmbed

Описание

MCP server for D&D 5e rules lookup (spells, monsters, conditions, classes, magic items). Powered by Open5e. Defaults to 2024 SRD (5.5e); supports 2014 fallback. Companion to roll20-character-mcp-server.

README

An MCP server that looks up D&D 5e rules — spells, monsters, conditions, classes, magic items, rules sections — through the Open5e API. Defaults to the 2024 SRD (5.5e) and falls back to the original 2014 SRD on demand.

Designed to pair with roll20-character-mcp-server. The Roll20 server reads your character; this one looks up the rules. Together they answer questions like "I have Spirit Guardians prepared — what does it actually do at my level, and do I have a slot to cast it?"

What It Does

Tool Returns
dnd_search_spells Spells by name / level / school / class / ritual / concentration.
dnd_get_spell Full description, components, casting time, range, duration, source.
dnd_search_creatures Creatures by name / CR range / type / size.
dnd_get_creature Full stat block (AC, HP, speed, abilities, CR).
dnd_list_conditions All standard + third-party conditions.
dnd_get_condition Full description (Charmed, Frightened, Stunned, …).
dnd_search_rules Rules section search (Combat, Resting, Ability Checks, …).
dnd_get_rule Full rule text.
dnd_list_classes Classes (and 2024 subclasses, which are first-class entries).
dnd_get_class Class details.
dnd_get_race Race / species details.
dnd_get_background Background details.
dnd_search_magic_items Magic items by name / rarity / attunement.
dnd_get_magic_item Full magic item description.

All tools accept an edition arg: "2024" (default — the 5.5e ruleset most current campaigns use) or "2014" (the original 5e SRD). Switching edition rewires the API call to Open5e v2 (2024) or v1 (2014) under the hood and normalizes the response shape so the LLM doesn't see the difference.

Why Open5e (and not dnd5eapi.co)

dnd5eapi.co has a beautifully clean 2014 SRD but its 2024 endpoints are a stub — only conditions are populated, monsters has 3 entries, spells returns malformed JSON. Open5e has the actual 2024 SRD content (339 spells, 330 creatures, 24 classes + subclasses, 56 rules sections) under its srd-2024 source, and full 2014 coverage under v1 wotc-srd. One API, both editions, no second integration to maintain.

Setup

No auth. No env vars required.

npm install
npm run build
node build/index.js

For Claude Desktop, add to claude_desktop_config.json:

{
  "mcpServers": {
    "dnd-rules": {
      "command": "node",
      "args": ["/Users/<you>/justin-mcp-servers/dnd-rules-mcp-server/build/index.js"]
    }
  }
}

Smoke Test

npm run smoke

Exercises every category against live api.open5e.com and prints sample output. Includes a 2014/2024 Counterspell comparison so you can see the edition switch working (2014 = old auto-counter on level ≤ 3, 2024 = new Constitution save-based mechanics).

Edition Examples

dnd_get_spell({ query: "Counterspell" })
  → 2024: "The creature makes a Constitution saving throw…"

dnd_get_spell({ query: "Counterspell", edition: "2014" })
  → 2014: "If the creature is casting a spell of 3rd level or lower, its spell fails…"

dnd_search_creatures({ crMin: 1, crMax: 3, type: "undead" })
  → Ghast, Ghoul, Mummy, Wight, Specter, Will-o'-Wisp, …  (2024 SRD)

Architecture Notes

Edition routing. Open5e exposes both versions. v2 holds the new 2024 SRD with cleaner DRF filtering and richer object-shaped fields (school: {name, key}, rarity: {name, key, rank}). v1 holds the original 2014 SRD with flat string fields (school: "Abjuration", rarity: "Legendary"). The client normalizes v1 responses into v2-shaped TypeScript interfaces before they reach the formatters or the LLM, so you don't see the version skew.

Filter quirks. A few v2 endpoint quirks worth knowing about — they're encoded in the client:

  • Spells filter type and size via type__key / size__key, but creatures use the flat type=undead / size=large (no __key suffix). Discovered via probing.
  • Magic items' rarity filter is broken at the URL level — every variant returns the full set. The client fetches a wider window and filters rarity client-side.
  • Conditions live mostly in the core source, not srd-2024 — so the conditions tools ignore the edition arg and just query without a source filter.

Default source.

  • edition: "2024" → Open5e v2 with document__key=srd-2024 (official WotC 2024 / 5.5e).
  • edition: "2014" → Open5e v1 with document__slug=wotc-srd (original 5e Core Rules).

Override via documentKey per call to query other sources: a5e-ag (Advanced 5th Edition), tob / tob2 / tob3 (Kobold Press Tome of Beasts), cc (Creature Codex), dmag (Deep Magic), or "" (empty string) to query everything.

Roadmap

Done

  • 14 tools across spells, creatures, conditions, rules, classes, races, backgrounds, magic items.
  • Edition-aware routing (2024 / 2014) with response normalization.
  • Open5e v2 schema quirks handled (creature filter naming, magic item rarity client-side filter).
  • Exact-name match preference over substring (so Fireball doesn't return Delayed Blast Fireball first).

Planned

  • Companion tool: dnd_compare_editions — fetch the same item in both editions and diff the descriptions ("what changed for Counterspell between 2014 and 2024?").
  • Class-spell-list expansion: given a class + level, return the full prepared/known spell list filtered to what's available.
  • Universal text search across all categories at once (dnd_search) for "I heard about a spell that…" queries.
  • Light response caching (Open5e is fast and rate-limit-friendly, but identical lookups within a session don't need to re-hit the wire).

Out of scope

  • D&D Beyond integration. Their API isn't open and reverse-engineering their auth isn't worth the maintenance cost when Open5e covers the SRD properly.

License

Private / personal use. Open5e content is licensed Creative Commons Attribution 4.0 (the 2024 SRD ships as CC-BY 4.0); third-party sources retain their original licenses.

from github.com/justinritchie/dnd-rules-mcp-server

Установка Dnd Rules

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/justinritchie/dnd-rules-mcp-server

FAQ

Dnd Rules MCP бесплатный?

Да, Dnd Rules MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Dnd Rules?

Нет, Dnd Rules работает без API-ключей и переменных окружения.

Dnd Rules — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Dnd Rules в Claude Desktop, Claude Code или Cursor?

Открой Dnd Rules на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Fetch

Web content fetching and conversion for efficient LLM usage.

автор: Community

Roblox Studio

Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce

paralovавтор: paralov

AWS KB Retrieval

Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.

modelcontextprotocolавтор: modelcontextprotocol

Spring AI MCP Server

Provides auto-configuration for setting up an MCP server in Spring Boot applications.

автор: Community

llm-analysis-assistant

A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also

xuzexin-hzавтор: xuzexin-hz

MCP-Agent

A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)

lastmile-aiавтор: lastmile-ai

Spring AI MCP Client

Provides auto-configuration for MCP client functionality in Spring Boot applications.

автор: Community

mcp.natoma.ai

A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)

автор: Community

MCPHub

Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.

автор: Community

MCP Servers Rating and User Reviews

Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)

автор: Community

Compare Dnd Rules with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai