AgentStack
MCP verified MIT-0 Self-run

Multi Agents Dnd Game

mcp-jeannineshiu-multi-agents-dnd-game · by jeannineshiu

D&D AI game master built with Strands SDK — multi-agent orchestration using MCP, A2A protocol, and RAG-based rules lookup

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add mcp-jeannineshiu-multi-agents-dnd-game

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Multi Agents Dnd Game? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Multi-Agent D&D Game

A Dungeons & Dragons AI game master built with the Strands SDK, demonstrating multi-agent orchestration, MCP integration, and RAG-based rules lookup.

Screenshots

| | | |---|---| | | |

Architecture

Browser (React UI, port 5173)
        │
        ▼
Gamemaster Orchestrator  (FastAPI, port 8009)
        ├── Rules Agent          (A2A, port 8000)  ← ChromaDB + D&D Basic Rules PDF
        ├── Character Agent      (A2A, port 8001)  ← TinyDB character storage
        └── Dice Roll MCP Server (MCP, port 8080)  ← Real dice rolls

Agents

| Agent | Port | Responsibility | |-------|------|----------------| | Gamemaster Orchestrator | 8009 | Receives player input, coordinates all agents, returns structured story output | | Rules Agent | 8000 | Queries ChromaDB knowledge base built from D&D Basic Rules PDF | | Character Agent | 8001 | Creates and retrieves characters stored in TinyDB | | Dice Roll MCP Server | 8080 | Rolls dice via MCP protocol — no made-up results |

Key Concepts Demonstrated

  • Multi-agent orchestration — Gamemaster delegates tasks to specialized agents instead of doing everything itself
  • MCP (Model Context Protocol) — Dice rolling runs as an independent server, callable by any MCP-compatible client
  • A2A (Agent-to-Agent) — Agents communicate over HTTP with a standard protocol
  • RAG — Rules lookup queries an actual PDF, preventing hallucinated rule answers
  • Structured output — Orchestrator returns a typed StoryOutput Pydantic model with narrative, action suggestions, and dice roll details

Setup

Prerequisites

Install

# Create conda environment
conda create -n strands-workshop python=3.13 -y
conda activate strands-workshop

# Install Python dependencies
pip install strands-agents strands-agents-tools "strands-agents[a2a]" \
    "fastapi[standard]" uvicorn python-dotenv \
    "chromadb>=0.4.0" "PyPDF2>=3.0.0" tinydb \
    langchain_aws langchain_chroma ollama anthropic

Set API Key

export ANTHROPIC_API_KEY="sk-ant-..."

Build Knowledge Base

cd 5_a2a_integration/utils
python -c "
from create_knowledge_base import create_knowledge_base
create_knowledge_base('', './dnd_knowledge_base')
"

Running

Start each service in a separate terminal (all from the repo root):

# Terminal 1 — Dice MCP Server
python 4_mcp_integration/dice_roll_mcp_server.py

# Terminal 2 — Rules Agent
cd 5_a2a_integration/agents/rules_agent && python rules_agent.py

# Terminal 3 — Character Agent
cd 5_a2a_integration/agents/character_agent && python character_agent.py

# Terminal 4 — Gamemaster Orchestrator
cd 5_a2a_integration/agents/gamemaster_orchestrator && python gamemaster_orchestrator.py

Test with curl:

curl -X POST http://localhost:8009/inquire \
  -H "Content-Type: application/json" \
  -d '{"question": "Create a new Elf Wizard named Gandalf"}'

Frontend UI (optional)

git clone https://github.com/salihgueler/game-master-frontend.git
cd game-master-frontend && npm install && npm run dev

Open http://localhost:5173 and set Server URL to http://localhost:8009.

Project Structure

├── 1_strands_basics/           Basic Agent with system prompt
├── 2_built_in_tools/           Agent with http_request tool
├── 3_custom_tools/             Custom @tool dice roller
├── 4_mcp_integration/
│   ├── dice_roll_mcp_server.py FastMCP server (port 8080)
│   └── gamemaster_mcp_client.py Interactive CLI client
└── 5_a2a_integration/
    ├── agents/
    │   ├── rules_agent/        D&D rules lookup via ChromaDB
    │   ├── character_agent/    Character CRUD with TinyDB
    │   └── gamemaster_orchestrator/  FastAPI orchestrator
    └── utils/
        └── create_knowledge_base.py  PDF → ChromaDB ingestion

Based On

AWS Workshop: Once Upon Agentic AI

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.