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.exefrom ReleasesRun 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.dmgfrom ReleasesRun 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
Configure Claude Desktop
Add this to your Claude Desktop configuration (claude_desktop_config.json) file:
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
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 IP Address of Claude Desktop MCP Server location. Only used for local network websocket connections. Remote Servers use WebRT. Defaults to localhost.
Allow Write Operations This will prevent Claude from making any changes to world content and restrict it to reading only
Max Actors Per Request This is a failsafe to stop a massive amount of actors being created from one single request. It does not limit the amount of characters being created by multiple requests
Show Connection Messages This can turn off the banner messages for connections for Foundry MCP Bridge
Auto-Reconnect on Disconnect Will automatically attempt to reconnect if the connection is lost
Connection Check Frequency How often it will check connection status
Enhanced Creature Index Sub-menu
Rebuild Creature Index This button will rebuild the creature index if there is an issue or it is out of sync with changes in your compendiums
Enable Enhanced Creature Index This should be left on as Claude builds additional metadata in the world files to give it better searches
Auto-Rebuild Index on Pack Changes Experimental feature that hasn't been fully tested yet
Map Generation Service Sub-menu
Service Status There are three buttons for Check Status, Start Service, and Stop Service. These buttons help monitor and control the connection from the Foundry MCP Bridge to the ComfyUI backend which is started by the Claude Desktop application.
Auto-start Map Generation Service Controls whether ComfyUI service connection is automatically connected at startup of the Foundry world.
Generation Quality Controls the quality of the maps generated by the SDXL checkpoints wiht ComfyUI. Low uses 8 steps of generation, Medium uses 20 steps of generation, and High uses 35 steps. The D&D Battlemaps SDXL Upscale v1.0 Checkpoint used in this image generation recommends using 35 steps but on low end GPUs or GPUs with out CUDA, this generation will take several minutes. These options can give you a trade off to have maps generated faster at the expense of quality.
Architecture
Foundry Module: Provides secure data access within Foundry VTT
MCP Server: External Node.js server handling Claude Desktop communication
Map Generation Service: A headless ComfyUI backend that is spawned by Claude Desktop
No API Keys Required: Uses your existing Claude Desktop subscription
Security & Permissions
GM-Only Access: All functionality restricted to Game Master users
Configurable Permissions: Control what data Claude can access and modify
Session-Based Authentication: Uses Foundry's built-in authentication system
System Requirements
Foundry VTT: Version 13
Claude Desktop: Latest version with MCP support
Claude Pro/Max Plan: Required to connect to MCP servers
Operating System: Windows 10/11 (installer), or other OSes/manual Windows install with Node.js 18+ (manual)
GPU Requirements: A GPU with at least 8GB of VRAM
Support & Development
Issues: Report bugs on GitHub Issues
YouTube Channel: Subscribe for updates and tutorials
Support Development: Support on Patreon
Documentation: Built with TypeScript, comprehensive documentation included
License: MIT License (Additional Third Party licenses are included for bundled components for the installers)
This server cannot be installed
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityConnects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender for AI-assisted 3D modeling, scene manipulation, and rendering.Last updated -1714,159MIT License
- -security-license-qualityConnects Claude and other MCP-compatible AI assistants to a Coreflux MQTT broker, enabling them to discover and execute Coreflux commands for managing models, actions, rules, and routes through natural language.Last updated -3Apache 2.0
- -securityFlicense-qualityAn MCP server that connects Claude to FL Studio, allowing the AI to send melodies, chords, and drum patterns directly to the DAW via virtual MIDI ports.Last updated -5
- -securityAlicense-qualityA Model Context Protocol server that integrates with FoundryVTT, allowing AI assistants to interact with tabletop gaming sessions through natural language to query actors, roll dice, generate content, and manage game worlds.Last updated -112MIT License