Labsco
MCP SERVER

D&D MCP Server

by study-flamingo

Run a D&D 5e campaign from a chat window — characters, NPCs, locations, quests, combat, session notes and an adventure log, all saved between sessions.

Games, Entertainment & FandomVerified
Summary
It gives the model a memory the campaign can live in.

A model can already narrate a dungeon; what it cannot do is remember, three sessions later, how much gold the party has and which NPC owes them a favour. Putting characters, quests, game state and an event log behind tools means those facts survive the conversation and can be queried rather than recalled. The bulk character update is the small thing that makes combat workable — applying damage to the whole party is one call, not five.

What it is

A FastMCP server that gives a Dungeon Master — or a solo player — structured storage for a campaign. Everything hangs off one active campaign: character sheets with 5e stats, NPCs, locations, quests, combat encounters, session notes and a searchable event log, persisted to disk so a game picks up where it stopped.

What you get
  • Campaigns created, listed, described and switched between, so several games can share one installation — `create_campaign`, `get_campaign_info`, `list_campaigns`, `load_campaign`
  • Full 5e character sheets with ability scores and derived modifiers, hit points, armour class and inventory — created, read, updated singly or in bulk, and given items — `create_character`, `get_character`, `update_character`, `bulk_update_characters`, `add_item_to_character`, `list_characters`
  • NPCs and locations created, read and listed, with the connections between them recorded — `create_npc`, `get_npc`, `list_npcs`, `create_location`, `get_location`, `list_locations`
  • Quests with objectives and rewards, updated as they progress and filtered by status — `create_quest`, `update_quest`, `list_quests`
  • Combat run turn by turn: initiative order set at the start, turns advanced, encounter closed — `start_combat`, `next_turn`, `end_combat`
  • The party's current situation as one readable, writable state — location, session number, party level and funds, combat status, in-game date — `get_game_state`, `update_game_state`
  • Session notes recorded and read back, and an adventure log of events with types, filtering and search — `add_session_note`, `get_sessions`, `add_event`, `get_events`
  • Dice rolled in D&D notation such as `1d20` or `3d6+2`, and experience distributed across an encounter — `roll_dice`, `calculate_experience`
Requirements

No account and no key — campaign data is stored locally. Python 3.12+ and `uv` on your PATH. The package is `gamemaster-mcp` (0.1.0 in pyproject), installed from a clone with `uv pip install .` and launched with `uv run gamemaster-mcp`; the client config needs the project directory as its working directory. The README supplies a system prompt for the assistant — paste it in, because it is what tells the model to keep the campaign state updated rather than only answering questions. The project describes itself as under construction.