Let’s get the AI to build D&D adventures for us with a Model Context Protocol Prompt. I haven’t found much value in MCP Prompts until now. What makes them excited is when you use them a “recipe” to chain together other tool calls. In this episode of my MCP programming series, I show you how to make two MCP Prompts. First, a simple one that boot-straps playing D&D. Second, a more complex one that pulls together an adventure overview using multiple tools and “reasoning.” I think the result gets to a type of agentic AI.
💾 Code for this project: github.com/cote/Easy…
📹 More videos on D&D with MCP: www.youtube.com/playlist
The AIs are good at being a Dungeon Master for Dungeons & Dragons, but their memory is limited. How can you make sure they don’t forget all that loot you just got, or ensure that cobbler back in the village remembers the type of boots you orders and paid for up front? I’ll show you how to use Model Context Protocol (MCP) to create a DM Journal. This is done by writing an MCP Server tool that write journal entries and then an MCP Server Resource that allows you to read them. It’s just files, but it’s a good excuse to learn some agentic AI coding in Java, with the help of Spring AI.
💾 Code for this project in the EasyChatDM repo.
Not only can you give more direction to the AI when you’re playing solo D&D with it, you can start to understand how it thinks. I walk through how to use MCP Server tools to enhance solo roleplaying with Claude (and ChatGPT, etc.) and how to get extra information about how the AI is thinking. Also, I show you how to do logging despite the weird setup Claude Desktop requires.
More generally, you get to see why doing more documentation is important for agentic tools like Model Context Protocol. You have to shift from thinking like a programmer making APIs to thinking like a prompt engineer having a conversation with the AI.
I use Spring AI’s Model Context Protocol support to write these tools in Java.
💾 Code for this project in the EasyChatDM repo.
Playing D&D with ChatGPT, Claude, or whatever is fun. But sometime you want more control over how it behaves and what it does. Check out this video for a quick tutorial on creating an oracle plugin for Claude. This “plugin” is a Model Context Protocol Server written in Java using Spring AI. Once you create the MCP Server, you can hook the oracle into Claude which will use it while you play as a simple yes/no oracle. This is a simple example that will show you how to get everything setup with Java and Spring AI to start making MCP Server tools. Keep an eye out for the rest in the series where I’ll make much more complex and fun tools.
💾 Code for this project in the EasyChatDM repo.
I’m always telling my marketing friends that they should do more newsletters. They have so many objections and hurdles - mostly self-imposed ones. Here’s why I think they’re good, easy, and how to come up with things to put in them.
That’s it for today. Like and subscribe, hey guys.
(I should have made that full room video in black and white, maybe with a glitch and fast-rolling time code. But, what are ya gonna do?)
When playing solo D&D, try making full on characters for the major NPCs. This can be more fun because (a) making characters is fun, especially higher level ones, and, (b) you get more faceted NPCs instead of just stock, one-dimensional characters.
I’ve been playing through Icewind Dale: Rime of the Frostmaiden and I applied this one of the duergar dwarves, Durth. In the published adventure, he’s a Duergar Mind Master. Instead of sticking wiht that, I decided to flesh him out a bit, making him a 5th level Artificer. This gave him a steel defender companion and access to interesting spells. I’ve never really played an artificer or looked at that class next, so it was fun to imagine that out. And, then, when it came to the encounter on the ferry in Easthaven, I had a lot more options than what a Mind Master would give.
This investment in time and imagining also creates a closer bond your NPCs. My theory here is that this will make their role in your adventure more interesting and genuin. You might get attached to them and want them to live. And, if you’re less likely to let them die and/or make dumb moves, they’ll be more interesting than just routine combat and encounters.
All of that takes extra time, of course, but one of the principles I follow in solo roleplaying is that it’s all part of playing. You take on the role of the DM, for example, which has all sorts of out of game work like this. And, you know: the point is to have fun! So if this seems like a drag at any given point, I just won’t do it.
An enterprise AI strategy probably means adding AI to your existing apps and workflows, not just standing up a stand-alone AI app. We experience generative AI as chatbots in the consumer space - and they’re great! - but this doesn’t seem like the best approach for business applications. Think about search. We don’t even notice it now, but at work, search is built into existing apps, it’s not usually a stand-alone app that tightly integrates with and links into existing apps. I think Enterprise AI will be the same. We’ll see!
I did a video series with O’Reilly going over my advice for surviving and thriving (“working,” I guess) in a big company. “You should watch it, it’s really good,” raves the man who made it.
So, you should check it out.
If you can’t be at DevOpsDays Des Moines later this week (or stackconf in Berlin next week) to see the final version of this presentation, here’s my first time running through it. It container about 20 minutes of…uh…bonus material.*