Provides comprehensive tools for managing D&D 5e campaigns, including character sheets, NPCs, combat encounters, quests, locations, and game mechanics like dice rolling
D&D MCP Server
A comprehensive Model Context Protocol (MCP) server for managing Dungeons & Dragons campaigns. This server provides tools for managing characters, NPCs, locations, quests, combat encounters, session notes, and more.
Features
Campaign Management
- Create and manage multiple campaigns
- Switch between campaigns
- Track campaign metadata (name, description, DM, setting)
Character Management
- Complete character sheets with D&D 5e stats
- Ability scores with automatic modifier calculation
- Hit points, armor class, and combat stats
- Inventory and equipment management
- Spellcasting support
NPC Management
- Create and track non-player characters
- Manage relationships and locations
- Store descriptions and notes
Location/World Building
- Create detailed locations (cities, dungeons, etc.)
- Track populations, governments, and notable features
- Connect locations and manage geography
Quest Management
- Create quests with objectives and rewards
- Track quest status and completion
- Link quests to NPCs and locations
Combat Management
- Initiative tracking
- Turn-based combat flow
- Combat encounter planning
Session Management
- Session notes and summaries
- Experience and treasure tracking
- Character attendance
Adventure Log
- Comprehensive event logging
- Categorized by event type (combat, roleplay, exploration, etc.)
- Searchable and filterable
- Importance ratings
Game State Tracking
- Current location and session
- Party level and funds
- Combat status
- In-game date tracking
Utility Tools
- Dice rolling with advantage/disadvantage
- Experience point calculations
- D&D 5e mechanics support
Installation
- Clone or download this repository
- Install dependencies:
Usage
Running the Server
Or using the installed script:
MCP Client Configuration
Add this server to your MCP client configuration. For Claude Desktop, add to your config file:
Available Tools
Campaign Tools
create_campaign
: Create a new campaignget_campaign_info
: Get current campaign informationlist_campaigns
: List all available campaignsload_campaign
: Switch to a different campaign
Character Tools
create_character
: Create a new player characterget_character
: Get character sheet detailsupdate_character_hp
: Update character hit pointsadd_item_to_character
: Add items to inventorylist_characters
: List all characters
NPC Tools
create_npc
: Create a new NPCget_npc
: Get NPC detailslist_npcs
: List all NPCs
Location Tools
create_location
: Create a new locationget_location
: Get location detailslist_locations
: List all locations
Quest Tools
create_quest
: Create a new questupdate_quest
: Update quest status or objectiveslist_quests
: List quests (optionally filtered by status)
Game State Tools
update_game_state
: Update current game stateget_game_state
: Get current game state
Combat Tools
start_combat
: Initialize combat with initiative orderend_combat
: End combat encounternext_turn
: Advance to next participant's turn
Session Tools
add_session_note
: Add session notes and summaryget_sessions
: Get all session notes
Adventure Log Tools
add_event
: Add event to adventure logget_events
: Get events (with filtering and search)
Utility Tools
roll_dice
: Roll dice with D&D notation (e.g., "1d20", "3d6+2")calculate_experience
: Calculate XP distribution for encounters
Data Storage
The server stores all data in JSON files in a dnd_data
directory:
Example Usage
Creating a Campaign
Creating a Character
Rolling Dice
Adding Events
Development
To extend the server:
- Add new models in
models.py
- Extend storage methods in
storage.py
- Add new tools in
main.py
- Update the tool list and handlers
License
MIT License
This server cannot be installed
A comprehensive Model Context Protocol server for managing Dungeons & Dragons campaigns with tools for characters, NPCs, locations, quests, combat encounters, and session tracking.
Related MCP Servers
- AsecurityAlicenseAqualityA beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.Last updated -3936JavaScriptApache 2.0
- -securityFlicense-qualityModel Context Protocol server that enables LLMs and AI assistants to retrieve real-time Dota 2 statistics, match data, player information, and game metrics through a standardized interface.Last updated -4Python
- -securityFlicense-qualityA Model Context Protocol server that provides tools for interacting with databases, including PostgreSQL, DuckDB, and Google Cloud Storage Parquet files.Last updated -2TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables interaction with PostgreSQL databases for analyzing setups, debugging issues, managing schemas, migrating data, and monitoring performance.Last updated -6TypeScriptMIT License