Foundry VTT MCP Bridge
Connect Foundry VTT to Claude Desktop for AI-powered campaign management through the Model Context Protocol (MCP). It currently supports Dungeons and Dragons Fifth Edition and Pathfinder Second Edition. The majority of MCP tools are system agnostic but character creation and compendium tools are only able to work with D&D5e and PF2E.
Overview
The Foundry MCP Bridge enables natural AI conversations with your Foundry VTT game data:
- Quest Creation: Create quests from prompts that incorporate what exists in your world and journals
- Character Management: Query character stats, abilities, and information
- Compendium Search: Find items, spells, and creatures using natural language
- Content Creation: Generate actors, NPCs, and quest journals from simple prompts
- Scene Information: Access current scene data and world details
- Dice Coordination: Interactive roll requests with player targeting
- Campaign Management: Multi-part quest and campaign tracking
- Map Generation: Create maps from prompts and automatically upload them into scenes in Foundry VTT using the optional ComfyUI component
This project was built with the assistance of Claude Code. If you like this project, consider supporting it on Patreon.
Installation
Prerequisites
- Foundry VTT v13
- Claude Desktop with MCP support
- Windows (for automated installer) or Node.js 18+ for manual installation
Option 1: Windows Installer
Video guide for Windows Installer
- Download the latest
FoundryMCPServer-Setup-vx.x.x.exe from Releases
- Run the installer - it will:
- Install the MCP server with bundled Node.js runtime
- Configure the Claude Desktop MCP server settings
- Optionally install the Foundry module and ComfyUI Map Generation to your VTT installation
- Choose Cuda version for your GPU type during install
- Restart Claude Desktop
- Enable "Foundry MCP Bridge" in your Foundry Module Management
Option 2: Mac Installer
- Download the latest
FoundryMCPServer-vx.x.x.dmg from Releases
- Run the package installer inside the dmg - it will:
- Open DMG and double-click the PKG installer
- Configure the Claude Desktop MCP server settings
- Optionally install the Foundry module and ComfyUI Map Generation to your Foundry VTT installation
- Restart Claude Desktop
- Enable "Foundry MCP Bridge" in your Foundry Module Management
Option 3: Manual Installation
Install the Foundry Module
- Open Foundry VTT v13
- Select install module in the Foundry Add-ons menu
- At the bottom of the window, add the Manifest URL as: https://github.com/adambdooley/foundry-vtt-mcp/blob/master/packages/foundry-module/module.json and click install
- Enable "Foundry MCP Bridge" in Module Management
Install the MCP Server
# Clone repository
git clone https://github.com/adambdooley/foundry-vtt-mcp.git
cd foundry-vtt-mcp
# Install dependencies and build
npm install
npm run build
Configure Claude Desktop
Add this to your Claude Desktop configuration (claude_desktop_config.json) file:
{
"mcpServers": {
"foundry-mcp": {
"command": "node",
"args": ["path/to/foundry-vtt-mcp/packages/mcp-server/dist/index.js"],
"env": {
"FOUNDRY_HOST": "localhost",
"FOUNDRY_PORT": "31415"
}
}
}
}
Starting Claude Desktop will start the MCP Server.
Getting Started
- Start Foundry VTT and load your world
- Open Claude Desktop
- Chat with Claude about your currently loaded Foundry World
Example Usage
Once connected, ask Claude Desktop:
- "Show me my character Clark's stats"
- "Find all CR 12 humanoid creatures for an encounter"
- "Create a quest about investigating missing villagers"
- "Roll a stealth check for Tulkas"
- "What's in the current Foundry scene?"
- "Create me a small map of a Riverside Cottage in Foundry"
Features
- 25 MCP Tools that allow Claude to interact with Foundry
- Character Management: Access stats, abilities, and inventory
- Enhanced Compendium Search: Instant filtering by CR, type, abilities, and more
- Content Creation: Generate actors, NPCs, and quest journals
- Campaign Management: Multi-part quest tracking with progress dashboards
- Interactive Dice System: Send different dice roll requests to players from Claude
- Actor Ownership: Manage player permissions for characters and tokens
- GM-Only: MCP Bridge only connects to Game Master users
- Map Generation: A portable ComfyUI backend that generates battlemaps from prompts
- Remote Connections: WebRTC connections initiated through browser (Tested with Google Chrome) to MCP server and ComfyUI
- Windows and Mac Installers Automated installation of Foundry MCP Server for Claude Dekstop, Foundry MCP Bridge Foundry VTT Module, and ComfyUI backend with dependencies
Settings
<img width="964" height="803" alt="image" src="https://github.com/user-attachments/assets/bfd435d5-2df4-40a6-a79b-87e98121db3f" />
- Enhanced Creature Index Configure Enhanced Index button leads to Enhanced Creature Index sub-menu (Details below)
- Map Generation Service Configuration Configure Map Generation button leads to Map Generation Service sub-menu (Details below)
- Enable MCP Bridge This should be checked by default and the status should show as connected. It can be used to turn off the MCP Bridge connection within the game without the need to disable the add-on itself.
- Connection Type Can be set to Auto for automatic detection of connection type. Can also be set to force either WebRTC for Internet connections or Websocket for Local connections.
- Websocket Server Host …