Warhammer MCP

Warhammer MCP

MCP server + Foundry VTT module for WFRP4e that lets AI clients interact with a Foundry world via tools for managing characters, journals, rolltables, and more.

Category
Visit Server

README

Warhammer MCP

MCP server + Foundry VTT module that lets MCP-capable AI clients interact with a Foundry world.

This repo is WFRP4e-focused (Warhammer Fantasy Roleplay 4e) and ships a Foundry module named Warhammer MCP (id: warhammer-mcp).

Lineage. Originally derived from adambdooley/foundry-vtt-mcp (MIT). The two histories share a merge base (45b8af2) but have run in parallel since the split — there are zero merged upstream commits in this codebase. Treat it as a sibling project, not an active fork. Differences from upstream: WFRP4e-only (D&D5e / PF2e / DSA5 / Cosmere removed), dedicated handlers/ layer in the Foundry module, umbrella/action tool pattern, unified notify.ts GM-feedback channel, cross-doc-fk audit + repair, persistence runbook, multi-client configs, skills harness. ComfyUI map-generation and WebRTC transport are not present.

  • Version: see package.json / docs/CHANGELOG.md
  • Foundry compatibility: v13 only (pinned)

How it works

MCP Client (Claude Desktop / Claude Code / VS Code / etc.)
  └─ stdio → packages/mcp-server/dist/index.js   (MCP wrapper)
        └─ TCP 31414 → packages/mcp-server/dist/backend.js  (backend)
              └─ WebSocket 31415 → Foundry module (in browser)

Ports

  • 31414 — MCP tool calls (client → backend)
  • 31415 — Foundry browser module bridge (Foundry → backend)

Quick start (from source)

1) Install & build

npm install
npm run build

2) Install the Foundry module

You need the module available under your Foundry data folder, e.g.:

<Foundry Data>/Data/modules/warhammer-mcp/

For local development, this repo includes a simple deploy script:

npm run build:deploy

npm run build:deploy uses scripts/deploy-foundry.js, which currently has a hard-coded target path. If your Foundry data folder is different, edit scripts/deploy-foundry.js (or copy the module folder manually).

After deploying, reload the Foundry page (F5) and enable Warhammer MCP in your world.

3) Start the backend

You have two common options:

Option A — Client-spawned (most MCP clients)

  • Configure your MCP client to run node <repo>/packages/mcp-server/dist/index.js.
  • The wrapper will spawn/attach to the backend automatically.

Option B — Standalone (recommended for always-on / multi-client)

  • Windows convenience scripts in the repo root:
    • start-mcp.bat / start-mcp.ps1
    • stop-mcp.bat / stop-mcp.ps1
    • status-mcp.bat / status-mcp.ps1

See README-PERSISTENCE.md for the persistence runbook (logs, shortcuts, troubleshooting).


MCP client configuration

This repo includes ready-to-copy config snippets for multiple clients:

  • claude_desktop_config.example.json (Claude Desktop)
  • configs/clients/* (Claude Code, VS Code Copilot, Codex, Gemini)

Start here:

  • configs/clients/README.md

Verification

Once connected, try calling the world probe tool:

  • mcp__foundry-mcp__get-world-info

Tool surface (post-consolidation)

The API surface is intentionally consolidated: 36 tools implemented as action-based “umbrella” tools (e.g. manage-character, manage-journal, manage-rolltable, etc.).

Authoritative list and architecture notes live in:

  • docs/INSTRUCTIONS.md
  • docs/CHANGELOG.md
  • docs/TOOL_CONSOLIDATION_PLAN_2.md

Repo layout

packages/
  mcp-server/        MCP wrapper + backend (Node)
  foundry-module/    Foundry VTT module (browser)
shared/              Shared TS types/schemas
configs/clients/      MCP client config snippets
docs/                 Dev notes + system guide
tests/                Vitest tests (skills harness)
test/                 Manual test suite docs

Key entrypoints:

  • packages/mcp-server/dist/index.js — MCP stdio wrapper (what clients execute)
  • packages/mcp-server/dist/backend.js — backend process (standalone / persistent)

Development

Common commands

npm run build
npm run build:deploy
npm run test
npm run test:skills
npm run lint
npm run typecheck

After making changes

  • Foundry module changes: npm run build:deploy → reload Foundry (F5)
  • MCP server changes: npm run build → restart your MCP client (or restart the standalone backend)

More details:

  • docs/INSTRUCTIONS.md

License & Credits

MIT — see LICENSE.

Originally derived from adambdooley/foundry-vtt-mcp (Adam Dooley, MIT). Upstream credit retained in package.json contributors.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured