npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dearlordylord/dnd-mcp

v0.1.2

Published

SRD 5.2.1 MCP server over stdio

Readme

D&D MCP

Create D&D characters and play through combat with an AI assistant backed by an executable rules engine. This Model Context Protocol (MCP) server gives your assistant tools to apply D&D 5e SRD 5.2.1 rules, track character state, and discover what you can do next.

You make the choices; your assistant presents options and asks for missing information; the engine checks supported actions and resolves their effects.

What play looks like

An example from a tested encounter, shortened for readability. Mira is a level 1 fighter who bought and equipped a Longsword, Chain Mail, and Shield during character creation. The player supplies the rolls; the engine resolves the attack and updates the battle.

Player: What can Mira do?

Assistant: You can attack with your longsword. Which target?

Player: The goblin. It's 5 feet away. I'll roll at the table.

Assistant: Tell me your attack roll.

Player: 17 total.

Assistant: That hits. Roll a d8 for damage.

Player: 5.

Assistant: With your +3 damage modifier, that's 8 slashing damage. The goblin has 2 HP left. Mira still has 13 HP. What would you like to do next?

The choices and questions depend on the character and battle state. Your assistant discovers available actions and supplies your answers through MCP tools.

What you can do

  • Build a character from the included SRD classes, species, backgrounds, and other character options.
  • Advance characters, inspect their sheets, manage resources, and take rests.
  • Run encounters with characters and SRD monsters, choose actions, and track their effects on the battle and character sheets.
  • Browse the installed catalog of abilities, spells, and monster stat blocks.

See the project's documented support scope for class progression and supported mechanics.

Connect your assistant

You need Node.js 22.19 or later, pnpm, and an AI client that can launch local MCP servers over stdio. This package supplies the server; you interact through your AI client.

For clients that accept an mcpServers configuration, add:

{
  "mcpServers": {
    "dnd": {
      "command": "pnpm",
      "args": ["dlx", "@dearlordylord/dnd-mcp"]
    }
  }
}

Reload your client's MCP connection, then try:

Create a level 1 fighter. Walk me through the available choices.

Other starting prompts:

  • "What SRD monsters are available for an encounter?"
  • "Show my character sheet and remaining resources."
  • "Start an encounter with my character and a goblin. Ask me for the setup facts."

To launch the server directly:

pnpm dlx @dearlordylord/dnd-mcp

The command waits for an MCP client to communicate over stdio; it does not open a game screen or chat prompt. For reproducible configuration, pin a released version in the args array, for example:

["dlx", "@dearlordylord/[email protected]"]

Before you play

  • Content: the included catalog contains redistributable SRD 5.2.1 content. Other official books and custom content are not included, and this MCP does not provide an import tool for them.
  • Table input: you supply decisions, roll results, and facts such as targets and distances when requested. An optional roll_dice tool samples dice faces; it does not automatically answer the engine's questions.
  • Session lifetime: this local stdio server keeps play state in memory. Stopping or restarting its process loses those sessions. Persistent HTTP hosting is a separate deployment.

Learn more

License

Code: Apache 2.0. Included SRD material: CC BY 4.0. See LICENSE and NOTICE. Bundled dependency licenses are included in dist/THIRD-PARTY-NOTICES.txt.