# Open5e MCP

> Open5e connects your AI client to the OpenGameContent database for D&D 5th Edition. It lets you query every core element—spells, monsters, classes, magic items—using natural language commands. Need to check a creature's challenge rating or find all third-level Evocation spells? Your agent runs the specific tool and gives you the raw data instantly.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** dnd5e, rpg, tabletop-gaming, open-gaming-license, game-master-tools

## Description

Forget those bloated rulebooks sitting on your desk. Open5e connects your AI client straight into the core OpenGameContent database for D&D 5th Edition. You don't get summaries; you get raw, actionable stats and lore whenever you ask for 'em. Your agent runs these specific tools, giving you exactly what you need—whether it’s a monster stat block or a tricky rule section—without you ever having to open a physical book.

**Global Stat Lookups:** Need to know something fast? You can run `search_open5e` for an instant global search. This pulls up any term or concept across the entire Open5e dataset, letting you get raw statistics and lore for creatures, items, or even specific rules text when you punch in a keyword.

**Character Building Core:** Defining a character means pulling together several pieces of data. To nail down your backstory, run `list_backgrounds` to see every established background option. For the core identity, `list_classes` provides a comprehensive list of recognized classes and their archetypes, while `list_species` gives you all the available races you can pick from. When you've got the basic build down, you use `list_feats` to check out specific character feats you can earn, and then `list_equipment` lets you filter through weapons, armor, and gear based on what category you need.

**Spells and Magic:** Casting spells? You'll need to query the spellbook. Run `list_spells`, and you can filter that massive list by level, specific school of magic (like Evocation or Necromancy), or even which class is allowed to cast it. If you’re building a character with arcane trinkets, use `list_magic_items` to check for artifacts and magic gear, filtering those results by rarity or item type.

**Threat Assessment & Combat:** When you're fighting monsters, you don't want to guess their CR. Use `list_creatures` to search or list NPCs and monsters, letting you narrow the field by size (like Medium or Gargantuan), type (like Undead or Fiend), or a specific challenge rating. If you need quick stats on status effects—say, Poisoned or Blinded—you run `list_conditions`. For deep rules dives, `list_sections` retrieves entire rule sections and supplemental text, keeping your game moving without interruption.

**Deep Reference & Lore:** You can also get details on character definitions using `list_feats`, which gives you a roster of available abilities. If you need to know what source documents are even part of the pool, use `list_documents` to retrieve Open Game License metadata and reference materials. Finally, if there's any obscure rule or piece of text that needs verification, running `list_sections` lets you pull specific rulesets for quick confirmation.

Your agent handles all this heavy lifting. You just ask a natural language question—like 'What are the stats for a rock elemental?' or 'Show me third-level illusion spells.' The server runs the right tool and spits out the raw data instantly, letting you keep the game moving without ever feeling like you’re waiting on some clunky database query.

## Tools

### list_backgrounds
Lists available character backgrounds for use in a game setting.

### list_classes
Provides a list of recognized character classes and their archetypes.

### list_conditions
Retrieves all status effects and conditions used within the ruleset (e.g., poisoned, blinded).

### list_creatures
Lists or searches monsters and NPCs, allowing filtering by size, type, or challenge rating.

### list_documents
Retrieves source documents and Open Game License metadata for reference.

### list_equipment
Lists weapons, armor, and gear, with filtering options based on category.

### list_feats
Provides a list of character feats available to build characters.

### list_magic_items
Lists magic items and artifacts, allowing filters by rarity or item type.

### search_open5e
Performs a global search across all Open5e resources for any term or concept.

### list_sections
Retrieves specific rules and supplemental text sections for quick reference.

### list_species
Provides a list of character species (races) that can be chosen.

### list_spells
Lists or searches magic spells, filtering by level, school, or casting class.

## Prompt Examples

**Prompt:** 
```
Search Open5e for 'Aboleth' and show me its stats.
```

**Response:** 
```
I found the Aboleth (Large aberration). It has an AC of 17, 135 HP, and a Challenge Rating of 10. Its notable abilities include Enslave and Multiattack with its tentacles. Would you like the full action descriptions?
```

**Prompt:** 
```
List all 3rd-level Evocation spells for Wizards.
```

**Response:** 
```
I've retrieved 3rd-level Evocation spells for Wizards. Results include: Fireball, Lightning Bolt, Sending, and Melf's Minute Meteors. Which one should I provide details for?
```

**Prompt:** 
```
Find legendary magic items in the 'Wondrous Item' category.
```

**Response:** 
```
Searching for Legendary Wondrous Items... I found several, including the 'Apparatus of Kwalish', 'Cubic Gate', and 'Sovereign Glue'. Would you like to see the properties of the Apparatus of Kwalish?
```

## Capabilities

### Global Stat Lookups
Search for any term across the Open5e dataset, retrieving raw statistics and lore for creatures or items.

### Character Definition Retrieval
Pull detailed data on character backgrounds, classes, races, feats, and equipment that define a player's persona.

### Spellbook Querying
Filter and list magic spells based on criteria like level, spell school, or the class that casts them.

### Monster Manifest Generation
List or search monsters and NPCs, allowing filters by size, type, or combat difficulty (CR).

### Rules Reference Access
Retrieve specific status conditions (`list_conditions`) or rule sections to maintain game flow.

## Use Cases

### The GM needs to balance an encounter.
A GM realizes their planned dungeon combat is too weak. Instead of opening a monster manual and flipping pages, they prompt: 'List creatures with CR 5-7 that are Aberrations.' The agent runs `list_creatures`, providing several options instantly so the GM can scale up the threat.

### The player needs to optimize their character build.
A player is deciding on a race. They prompt: 'What are the best feats for a high-damage Rogue?' The agent runs `list_feats` and filters by relevant classes, presenting options that complement both the chosen species (`list_species`) and class (`list_classes`).

### The developer is building an in-game shop.
A dev needs to populate a store with all available gear. They use `list_equipment` and filter by 'Wondrous Item' to retrieve the name, rarity, and basic stats for hundreds of potential purchases without writing complex database joins.

### The writer needs lore cross-referencing.
A campaign writer is outlining a plot involving ancient magic. They ask: 'What are the most powerful spells that require an Arcane focus?' The agent runs `list_spells` and filters by school and level, giving precise source material details.

## Benefits

- Need to check a monster's Challenge Rating (CR)? Use `list_creatures` to filter the entire bestiary by difficulty level. No more guessing if an encounter is too easy or too hard.
- Building a character? Your agent handles it. Running `list_classes`, `list_species`, and `list_backgrounds` together pulls all necessary defining stats into one clean block for you.
- Writing spell mechanics? Never forget the rules again. Querying `list_spells` by school or level ensures your characters only learn spells appropriate to their class and current campaign arc.
- Inventory management is simple. Use `list_magic_items` to check rarity, category, and properties for any artifact without leaving your workflow.
- When you need a quick rule lookup (like status effects), `list_conditions` gives you the definitive list of terms—poisoned, blinded, etc.—so your game mechanics are consistent.

## How It Works

The bottom line is: You tell your AI what you need, it calls the right tool, and you get the clean, organized data back without seeing the underlying API call.

1. Subscribe to the Open5e MCP Server and provide your API key (if required by your setup).
2. Instruct your AI client to use a specific tool, like `list_spells`, followed by filters (e.g., '3rd level Evocation spells').
3. The server runs the query against the database and returns structured JSON data directly to your agent for immediate parsing.

## Frequently Asked Questions

**How do I find all items that are considered 'wondrous'?**
Use `list_magic_items` and apply the filter for category. This tool lets you narrow down artifacts by rarity or type, so you don't get a massive list of every weapon available.

**Can I search for creature stats that aren't explicitly listed?**
Yes. If you know the name or general concept, use `search_open5e`. This tool performs a global search across all resources, acting as a catch-all reference point.

**Which tool lists available character races?**
`list_species` is the correct tool. It provides a clean list of recognized species (races) that characters can adopt for their build.

**How do I find spells usable by Wizards specifically?**
Use `list_spells`. You must specify 'Wizard' as the class filter, alongside any other criteria like level or school, to get accurate results.

**When I run a search using `search_open5e`, do I need to worry about an API key or authentication?**
You'll need the Open5e API Key if your specific instance requires it. Most clients handle this through environment variables or dedicated configuration fields. If you don't provide one, the server will usually reject the call with a 401 Unauthorized error.

**If I use `list_creatures` to filter by multiple criteria (like Type and CR), are there any rate limits?**
The platform enforces standard API rate limiting. If you run too many complex queries in a short time, your client will receive a 429 Too Many Requests error. It's best practice to space out bulk data calls.

**Does the `list_conditions` tool return structured JSON data or just plain text?**
It returns clean, structured JSON objects. This means your agent can reliably parse fields like duration, saving throws, and effects into variables for other code to use.

**How do I look up specific game rules text using `list_sections` if it isn't about a creature or spell?**
`list_sections` is your best bet for deep rules reference. You can query by section title or keyword to find the exact OGL metadata without having to guess what tool handles general system mechanics.

**How can I find a monster with a specific Challenge Rating?**
Use the `list_creatures` tool and provide the `cr` parameter (e.g., '1', '1/4', or '20'). You can also combine this with the `type` parameter to find, for example, all CR 5 Dragons.

**Can I search for spells available only to a specific class?**
Yes! Use the `list_spells` tool and set the `class` parameter to your desired class, such as 'Wizard' or 'Cleric'. You can further filter by `level` to narrow down the results.

**What is the best way to find a specific rule or condition?**
For status effects, use `list_conditions`. For general rules or supplemental text, use `list_sections`. If you aren't sure where it is, use `search_open5e` for a global search across all categories.