Logo vun D&D 5E MCP 服务器

D&D 5E MCP 服务器

Communautéit
heffrey78

DND MCP Server

Editeurheffrey78
Repositorydnd-mcp
SproochTypeScript
Forks
11
Stären
22
Disponibel Tools
0
Transporttypstdio
Kategorien
Linken
  • Tools mat KI-Workflows verbannen

    D&D 5E MCP 服务器 stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    22 Stären an 11 Forks aus dem verlinkte Repository.

D&D 5E MCP Server

An MCP server that gives AI assistants access to D&D 5th Edition content from the Open5e API: spells, monsters, classes, species, equipment, rules references, plus encounter-building and character-build helpers. It uses Open5e's v2 API.

Requirements

  • Node.js 20 or newer (developed against Node 26)
  • Network access to api.open5e.com

Setup

bash
npm install
npm run build

Connecting a client

The server speaks JSON-RPC over stdio. Point your MCP client at the built entry point:

json
{
  "mcpServers": {
    "dnd-5e": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/absolute/path/to/dnd-mcp"
    }
  }
}

Set cwd to wherever you cloned this repository. A starting point is in mcp.json.

Verify it responds:

bash
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"1"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | node dist/index.js

Tools

Every tool except get_api_stats also takes two optional arguments that restrict it to some sourcebooks:

  • ruleset: "5e-2014", "5e-2024" or "a5e";
  • sources: Open5e document keys, e.g. ["srd-2014", "toh"].

Without them, searches cover every source Open5e serves. Each result carries a source label (document key, title and ruleset), and lookups by name prefer the 2024 SRD, then the 2014 SRD. Character builds default to the 2024 SRD only (see ADR-008); pass ruleset: "5e-2014" or sources: ["srd-2014"] for the older rules. An unknown ruleset or document is an error. A build that mixes editions, e.g. sources: ["srd-2024", "open5e"], uses 2014 species and backgrounds the way the 2024 Player's Handbook allows: the species keeps its traits, and ability increases come from the background. To add backgrounds without adding anything else, pass background_sources to generate_character_build, e.g. background_sources: ["toh"] for Tome of Heroes' 19 backgrounds.

Universal search

ToolDescriptionRequired
unified_searchSearch across all D&D content types (spells, monsters, items, races, classes, etc.) with intelligent ranking and filteringquery

Spells

ToolDescriptionRequired
search_spellsSearch spells by name, level, school or class list-
get_spell_detailsGet detailed information about a specific D&D 5E spellspell_name
get_spell_by_levelGet all spells of a specific levellevel
get_spells_by_classGet the spells on a class's spell list, lowest level first; filter by level or max_levelclass_name

Classes and species

ToolDescriptionRequired
search_classesList D&D 5E base classes with their features and subclass names-
get_class_detailsGet a class: hit die, proficiencies, features by level, spell slots and subclasses with their featuresclass_name
search_racesSearch species, including subspecies whose names omit the parent (Lightfoot for Halfling)-
get_race_detailsGet a species with what it inherits resolved: size, speed, combined ability increases, parent traitsrace_name

Monsters

ToolDescriptionRequired
search_monstersSearch monsters by name, challenge rating, type or environment-
get_monsters_by_crGet monsters by challenge ratingchallenge_rating
get_monsters_by_cr_rangeGet monsters within a challenge rating range, optionally by environment and typemin_cr, max_cr

Equipment and items

ToolDescriptionRequired
search_weaponsSearch for D&D 5E weapons with property filtering-
search_magic_itemsSearch magic items by name, rarity, category or attunement-
get_magic_item_detailsGet detailed information about a specific D&D 5E magic itemitem_name
search_armorSearch for D&D 5E armor with filtering options-
get_armor_detailsGet detailed information about a specific D&D 5E armorarmor_name

Character options

ToolDescriptionRequired
search_featsSearch for D&D 5E feats with filtering options-
get_feat_detailsGet detailed information about a specific D&D 5E featfeat_name
search_backgroundsSearch for D&D 5E character backgrounds with filtering options-
get_background_detailsGet detailed information about a specific D&D 5E backgroundbackground_name

Rules reference

ToolDescriptionRequired
search_conditionsSearch for D&D 5E conditions and status effects-
get_condition_detailsGet a condition, with its wording for the requested rulesetcondition_name
get_all_conditionsGet all D&D 5E conditions for quick reference-
search_sectionsSearch rules sections by name or text-
get_section_detailsGet a rules section by name or keysection_name
get_all_sectionsList every rules section by name, key and chapter, without the text-

DM tools

ToolDescriptionRequired
build_encounterBuild a balanced encounter for a party, sampling monsters from the whole CR rangeparty_size, party_level, difficulty
calculate_encounter_difficultyCalculate the difficulty of a custom encounter with specific monstersparty_size, party_level, monsters

Player tools

ToolDescriptionRequired
generate_character_buildGenerate a build: species, class and subclass, background, ability scores, hit points, spells, feats and a level-by-level plan-
compare_character_buildsGenerate and compare multiple character builds with different optionsbuild_options
get_build_recommendationsGet character build recommendations based on party composition and campaign needsexisting_party, campaign_type

Diagnostics

ToolDescriptionRequired
get_api_statsGet API performance and caching statistics-

Development

bash
npm run dev               # watch mode
npm run build             # compile to dist/
npm run lint              # eslint over src/
npm test                  # unit tests, no network (builds first)
npm run test:integration  # live Open5e API tests
npm run test:all          # both suites

Tests use Node's built-in test runner. test/unit/ mocks fetch, so it runs offline and fast; test/integration/ exercises the real API and the real server process. See docs/testing.md.

Known quirks

  • Duplicate names across books. A search for fireball returns every sourcebook's Fireball, each labelled with its source. Detail lookups pick one (2024 SRD first); pass ruleset or sources to choose another.
  • Uneven upstream filtering. Open5e ignores many filter parameters and returns the whole collection. The client sends only verified parameters and matches the rest locally; see docs/api-filters.md.
  • Gaps in Open5e's data are reported, not guessed. Examples: no 2014 SRD spell lists the Paladin, and some Tome of Heroes heritages have no source for their size. Look in a build's warnings or a species' resolved.unresolved.
  • Builds are opinionated. Game rules (spell slots, hit points, ASIs) come from the SRD, but the scoring choices that pick a class, species or spell are judgment calls, collected in src/character-build/heuristics.ts. Multiclass builds are not supported; allow_multiclass: true is rejected.
  • unified_search count vs items. For classes the reported count can exceed the number of returned items, because classes are listed whole and then ranked against the query.

Documentation

Data source and licence

Content comes from the Open5e API, which serves material published under the OGL and Creative Commons licences. This server is MIT licensed; the game content it returns is governed by its own licences. Each item's source names the document it comes from.

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "heffrey78-dnd-mcp": {
      "command": "",
      "args": []
    }
  }
}

D&D 5E MCP 服务器 MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal D&D 5E MCP 服务器 verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

D&D 5E MCP 服务器 als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu D&D 5E MCP 服务器 an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "heffrey78-dnd-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "dnd-mcp-server"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu D&D 5E MCP 服务器. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu D&D 5E MCP 服务器.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat D&D 5E MCP 服务器?
D&D 5E MCP 服务器
Jo. Ech hunn et gelies.
Dat hunn ech mat D&D 5E MCP 服务器 fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server D&D 5E MCP 服务器 benotzt?

D&D 5E MCP 服务器 ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech D&D 5E MCP 服务器 MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir D&D 5E MCP 服务器 mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat D&D 5E MCP 服务器 MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann D&D 5E MCP 服务器 verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech D&D 5E MCP 服务器 MCP mat TypingMind?

D&D 5E MCP 服务器 leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt D&D 5E MCP 服务器 MCP an TypingMind zur Verfügung?

D&D 5E MCP 服务器 stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir D&D 5E MCP 服务器 MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann D&D 5E MCP 服务器 eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇