D&D 5E MCP Server
About
Access Dungeons & Dragons 5th Edition content, including spells, classes, and monsters, via the Open5e API.
Details
- Author
- heffrey78
- Categories
- Database, Other, Knowledge Base
Jump to
Setup
Install D&D 5E MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/heffrey78/dnd-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Access Dungeons & Dragons 5th Edition content, including spells, classes, and monsters, via the Open5e API.
An MCP (Model Context Protocol) server that provides access to D&D 5th Edition content via the Open5e REST API. This server enables AI assistants and other MCP clients to retrieve comprehensive D&D 5E information including spells, classes, races, monsters, and equipment.
- unified_search- Search across all D&D content types with intelligent ranking
- Requiredqueryparameter for search terms
- Optionalcontent_typesfilter for specific content (spells, monsters, races, etc.)
- Optionalfuzzy_thresholdfor matching sensitivity
- Returns ranked results across all content types
- search_spells- Search for spells by name or retrieve all spells
- Optionalqueryparameter for filtering by spell name
- Returns basic spell information (name, level, school, casting time, etc.)
- Requiresspell_nameparameter
- Returns full spell description, components, duration, and class lists
- Requireslevelparameter (0 for cantrips, 1-9 for spell levels)
- Requiresclass_nameparameter (e.g., "wizard", "cleric", "bard")
- search_classes- Get a list of all available D&D 5E classes
- Returns basic information for all core classes
- Requiresclass_nameparameter
- Returns hit die, saving throws, description, and available subclasses
- search_races- Get a list of all available D&D 5E races
- Returns basic race information from the lineage page
- Requiresrace_nameparameter
- Returns size, speed, ability score increases, traits, and description
- search_monsters- Search for monsters with filtering options
- Optionalqueryparameter for monster names
- Optionalchallenge_ratingfilter
- Returns monster stats and basic information
- search_weapons- Search for weapons with property filtering
- Optional filters for martial/finesse weapons
- search_feats- Search for character feats
- get_feat_details- Get detailed feat information
- search_backgrounds- Search for character backgrounds
- get_background_details- Get detailed background information
- generate_character_build- Generate optimized character builds
- compare_character_builds- Compare multiple character build options
- get_build_recommendations- Get build recommendations for party composition
- build_encounter- Build balanced encounters for specified party
- Requiresparty_size,party_level, anddifficulty
- Optional filters for environment, monster types, CR range
- Returns balanced encounter with XP calculations
- Requires party info and list of monsters with counts
- Returns encounter difficulty rating and XP breakdown
- search_conditions- Search for status conditions and effects
- get_condition_details- Get detailed condition information
- get_all_conditions- Get all conditions for quick reference
- search_sections- Search rules sections for quick rule lookups
- get_section_details- Get detailed rules section information
- search_spell_lists- Search spell lists by class
- get_spell_list_details- Get detailed spell list for specific classes
git clone <repository-url> cd dnd-mcp
Add to your MCP client configuration (e.g.,mcp.json):
{ "mcpServers": { "dnd-5e": { "command": "node", "args": ["dist/index.js"], "cwd": "/path/to/dnd-mcp" } } }
The server implements the Model Context Protocol, exposing tools that can be called by MCP clients. Here are some example tool calls:
{ "name": "unified_search", "arguments": { "query": "fireball", "content_types": ["spells", "magic-items"] } }
{ "name": "build_encounter", "arguments": { "party_size": 4, "party_level": 5, "difficulty": "medium", "environment": "dungeon" } }
{ "name": "generate_character_build", "arguments": { "playstyle": "damage", "preferred_class": "fighter", "campaign_type": "combat" } }
- Intelligent Caching: 1-hour TTL cache to minimize requests to source website
- Rate Limiting: 1-second delays between requests to respect server resources
- Error Handling: Comprehensive error handling for network issues and missing content
- TypeScript: Fully typed implementation for better development experience
- MCP Protocol: Full compliance with Model Context Protocol specifications
- Comprehensive Testing: Full test coverage for Open5e API functionality and scraping operations
- Open5e API Integration: Uses Axios for REST API communication with Open5e
- Content Processing: Structured data handling from Open5e JSON responses
- MCP Server: Standard MCP protocol implementation with stdio transport
- Caching Layer: NodeCache for efficient content storage
- npm run build- Compile TypeScript to JavaScript
- npm run dev- Run in development mode with hot reload
- npm start- Run the built server
- npm run lint- Run ESLint
- npm test- Run Jest tests (includes comprehensive Open5e API tests)
src/ ├── index.ts # MCP server implementation and tool handlers ├── scraper.ts # Open5e API integration and data fetching tsconfig.json # TypeScript configuration mcp.json # MCP client configuration example
This server uses theOpen5e REST APIto access D&D 5th Edition content. The implementation:
- Leverages the Open5e API for comprehensive D&D 5E data
- Implements intelligent caching to minimize API requests
- Uses appropriate rate limiting and error handling
- Provides structured JSON responses from the API
- Open5e Migration: Migrated from web scraping to Open5e REST API for better reliability
- Comprehensive Tool Suite: Added 40+ tools covering all D&D 5E content types
- Unified Search: Intelligent search across all content with fuzzy matching
- DM Tools: Encounter building, difficulty calculation, and party balancing
- Character Building: Automated character optimization and build comparison
- Full Test Coverage: Comprehensive testing for all API functionality
Engram is a hosted MCP server that provides reliable memory for AI agents:
Structured iGaming reference data — slot specs, RTP variants, providers, regulators, news and jobs.
Self-hosted MCP memory server for personal use and teams
Persistent memory, teams, and projects for AI agents. 76 MCP tools for storing, recalling, and sharing knowledge across sessions.
An enterprise-ready system to archive AI conversations from ChatGPT and Claude into a Supabase database.
Access BrianKnows' extensive blockchain knowledge base.
A vector database server powered by Chroma, enabling semantic document search, metadata filtering, and document management.
Provides searchable local storage for Claude conversation history, enabling context retrieval during sessions.
A place where AI Agents can ask and answer questions and share knowledge
Domain intelligence tools - NS reverse lookup, newly registered domain search and more
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





