valkyrie-mom-mcp
MCP (Model Context Protocol) server and Claude Code plugin for AI-assisted Mansions of Madness 2nd Edition scenario creation with Valkyrie.
What it does
This server exposes Valkyrie scenario editing as MCP tools, enabling AI assistants (Claude, etc.) to create, modify, validate, and build complete MoM scenarios. It auto-detects the Valkyrie editor directory so scenarios appear directly in the app.
The plugin bundles 10 skills covering advanced patterns (event loops, mythos scaling, tile placement chains, custom puzzles, generated artwork, spoken narration, generated sound effects, etc.) and an autonomous scenario designer agent.
Install
As a Claude Code plugin (recommended)
claude plugin marketplace add thijs-hakkenberg/ValkyrieMCP
claude plugin install valkyrie-mom
This gives you:
- MCP server with 25 tools for scenario editing (auto-started)
- 10 skills:
/scenario,/event-patterns,/tile-placement,/variables-and-mythos,/custom-monsters,/ui-and-puzzles,/items-and-distribution,/artwork,/narration,/sound-effects - Scenario designer agent for autonomous scenario creation
- 5 MCP resources for format documentation
To update to the latest version:
claude plugin marketplace update valkyrie-mom
claude plugin update valkyrie-mom
To uninstall:
claude plugin uninstall valkyrie-mom
As a standalone MCP server (Claude Desktop, other MCP clients)
Add to your MCP client config (e.g., ~/.claude/mcp.json or Claude Desktop settings):
{
"mcpServers": {
"valkyrie-mom": {
"command": "npx",
"args": ["-y", "@thijshakkenberg/valkyrie-mom-mcp"]
}
}
}
This gives you the MCP tools and resources, but not the skills or agent (those require Claude Code).
As a Hermes Agent plugin
Hermes Agent installs the repository as a plugin with every tool and all skills:
hermes plugins install thijs-hakkenberg/ValkyrieMCP --enable
If Hermes offers to install the plugin's Node dependencies, answer N: they are only needed to develop the plugin. The plugin registers the MCP tools as native Hermes tools (toolset valkyrie-mom) and the skills as valkyrie-mom:<skill> (e.g. skill_view("valkyrie-mom:artwork")). On the first tool call it starts the matching @thijshakkenberg/valkyrie-mom-mcp version with npx (Node.js 20+ required) and keeps it running for the session, since the scenario being edited lives there. Pictures that tools return, such as render_map, are saved under ~/.hermes/cache/valkyrie-mom/ and their paths are given in the result. For a local checkout, set VALKYRIE_MCP_COMMAND="npx tsx /path/to/ValkyrieMCP/src/index.ts".
From source
git clone https://github.com/thijs-hakkenberg/ValkyrieMCP.git
cd ValkyrieMCP
npm install
npx tsx src/index.ts # Run MCP server via stdio
Skills
MCP Tools
Lifecycle
Components
Map
Story
Artwork
Artwork is optional and runs entirely on your machine. Setup with comfy-cli:
pip install comfy-cli && comfy install
comfy model download --url https://huggingface.co/Comfy-Org/flux2-klein-4B/resolve/main/split_files/diffusion_models/flux-2-klein-4b.safetensors --relative-path models/diffusion_models
comfy model download --url https://huggingface.co/Comfy-Org/flux2-klein-4B/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors --relative-path models/text_encoders
comfy model download --url https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors --relative-path models/vae
comfy launch --background
On NVIDIA GPUs with less VRAM, the fp8 model (black-forest-labs/FLUX.2-klein-4b-fp8) is smaller. Set VALKYRIE_COMFYUI_URL if ComfyUI runs somewhere other than http://127.0.0.1:8188. The /artwork skill covers prompts and where Valkyrie shows images.
Narration
Narration is optional and runs entirely on your machine, on the CPU: Kokoro-82M (Apache 2.0) through kokoro-js, with OGG Vorbis encoding in WebAssembly, so no Python or ffmpeg is needed. narration_status install=true installs the engine once (about 450 MB, in ~/.cache/valkyrie-mom-mcp/kokoro, or VALKYRIE_TTS_DIR); the first narration downloads the model (about 330 MB). English voices only. The default voice, af_nicole at speed 0.9, was picked by ear from 15 voices for horror (bf_isabella, bm_lewis and bm_daniel also fit); the model's quality grades didn't predict the fit. The /narration skill covers what to narrate and how Valkyrie plays the clips.
Sound effects
Sound effects are optional and run on the same ComfyUI as artwork, with Stable Audio 3 Small SFX (Stability AI Community License), small enough for the CPU:
comfy model download --url https://huggingface.co/Comfy-Org/stable-audio-3/resolve/main/checkpoints/stable_audio_3_small_sfx.safetensors --relative-path models/checkpoints
comfy model download --url https://huggingface.co/Comfy-Org/stable-audio-3/resolve/main/text_encoders/t5gemma_b_b_ul2.safetensors --relative-path models/text_encoders
comfy launch --background -- --fp32-vae
Start ComfyUI with --fp32-vae: by default it decodes the audio in bfloat16, and every clip comes out as noise. Other flags (such as --force-fp16 for FLUX) can stay. ComfyUI saves FLAC; the server converts it to OGG Vorbis in WebAssembly, so no ffmpeg is needed. The /sound-effects skill covers prompts and when a stock sound will do.
Reference
Diagnostics
MCP Resources
MCP Prompts
Valkyrie Editor Paths
The server auto-detects where Valkyrie stores editor scenarios:
Scenario File Format
A scenario is a directory containing:
quest.ini- Quest config and file listingsevents.ini- Event components (triggers, buttons, branching)tiles.ini- Map tile placementstokens.ini- Search, explore, interact, and wall tokensspawns.ini- Monster spawn configurationsitems.ini- Quest itemsui.ini- UI elements (backgrounds, etc.)other.ini- Puzzles and misc componentsLocalization.English.txt- CSV localization (key,value pairs)
Built scenarios are ZIP archives with a .valkyrie extension.
Validation Rules
The server validates scenarios against 18 rule categories, checked against Valkyrie 3.28 (quest format 21):
- Unique names - No duplicate component names
- Required fields - Tiles have
sideorcustomImage, displayed events havebuttons - Cross-references - All referenced components exist;
remove#keywords are valid - Event graph -
EventStarttrigger exists, no unreachable/dead-end events - Event flow - No endless loops of hidden events
- Localization completeness - Event text, button labels, quest metadata
- Format rules - Valid format version (4-21) and high enough for the features used, type=MoM, tile rotations
- Catalog references - Tile sides, monster names, items match game content
- Tile connectivity - Tiles don't overlap, touch at least one other tile, and share a lined-up door or open edge (door data measured from the tile artwork)
- Mythos structure - Proper mythos trigger configuration
- Investigator token - TokenInvestigators setup and removal
- Explore token - Explore tokens linked to tile reveal events
- Field schema - Only fields Valkyrie reads for each component type; valid
tokensizeand boolean values - Event semantics - How Valkyrie actually runs events: unreachable event2+ on hidden events,
conditionsignored next tovartests, trailing logical operators, spawns wrongly placed inadd - Custom images - Referenced image files exist in the scenario folder
- Token placement - Tokens and monster placements sit on a tile
- Triggers - Every trigger is one Valkyrie fires (no token triggers)
- Game flow - The game can reach an ending from its triggers; defeat condition, mythos, items and start marker set up correctly
build_scenario refuses to package a scenario while any rule reports an error.
Development
npm test # Run all tests
npm run test:watch # Watch mode
npm run lint # Type check
npm run build # Compile to dist/
npm run hermes:tools # Re-export the Hermes plugin tool list after changing tools or the version
Project Structure
.claude-plugin/ Claude Code plugin manifest
plugin.yaml Hermes Agent plugin manifest (+ __init__.py entry point)
hermes_bridge/ Hermes plugin: MCP stdio client, tool registration, exported tools.json
skills/ 9 skill SKILL.md files (Claude Code and Hermes)
agents/ Scenario designer agent
src/
io/ INI parser/writer, localization CSV, ZIP packager
model/ ScenarioModel, LocalizationStore, component types
validation/ Rules + orchestrator
rules/ Individual validation rule implementations
tools/ MCP tool implementations
story/ Storyline graph: outline, Mermaid, HTML
artwork/ ComfyUI (FLUX.2 [klein]) artwork generation
narration/ Kokoro text-to-speech, dialog text to speech text
audio/ Stable Audio 3 sound effects through ComfyUI, FLAC to OGG Vorbis
resources/ Format documentation resources
catalogs/ 846-entry game content catalog
diagnostics/ Bug report builder, session trace, ring buffer
server.ts MCP server registration
index.ts Entry point (stdio transport)
tests/
fixtures/ ExoticMaterial (reference scenario), MinimalScenario
io/ IO layer tests
model/ Model layer tests
tools/ Tool tests
validation/ Validation rule tests
diagnostics/ Diagnostics tests
golden.test.ts Round-trip integrity tests
integration.test.ts Full pipeline tests
Changes and Roadmap
See CHANGELOG.md for what changed in each release and TODO.md for what is planned next (hybrid semantic search for game content, generated sound effects).
Related Projects
- Valkyrie - Scenario builder and player
- valkyrie-questdata - Community scenario source data
- valkyrie-store - Scenario manifest pipeline
License
MIT