Dnd Rules
FreeNot checkedMCP 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.
About
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
typeandsizeviatype__key/size__key, but creatures use the flattype=undead/size=large(no__keysuffix). Discovered via probing. - Magic items'
rarityfilter 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
coresource, notsrd-2024— so the conditions tools ignore the edition arg and just query without a source filter.
Default source.
edition: "2024"→ Open5e v2 withdocument__key=srd-2024(official WotC 2024 / 5.5e).edition: "2014"→ Open5e v1 withdocument__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
Fireballdoesn't returnDelayed Blast Fireballfirst).
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.
Installing Dnd Rules
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/justinritchie/dnd-rules-mcp-serverFAQ
Is Dnd Rules MCP free?
Yes, Dnd Rules MCP is free — one-click install via Unyly at no cost.
Does Dnd Rules need an API key?
No, Dnd Rules runs without API keys or environment variables.
Is Dnd Rules hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Dnd Rules in Claude Desktop, Claude Code or Cursor?
Open Dnd Rules on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
Roblox Studio
Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce
by paralovAWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
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
by xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
by lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
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.
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)
Compare Dnd Rules with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
