FoundryVTT

v1.0.0Business Applicationsstable

A Model Context Protocol (MCP) server that integrates with FoundryVTT, allowing AI assistants to interact with your tabletop gaming sessions. Query actors, roll dice, generate content, and manage your game world through natural language.

foundryvttmanaged-by-opentofumcp
Share:
23
Stars
0
Downloads
0
Weekly
0/5

What is FoundryVTT?

FoundryVTT is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that integrates with foundryvtt, allowing ai assistants to interact with your tabletop gaming sessions. query actors, roll dice, generate content, and manage your g...

A Model Context Protocol (MCP) server that integrates with FoundryVTT, allowing AI assistants to interact with your tabletop gaming sessions. Query actors, roll dice, generate content, and manage your game world through natural language.

This server falls under the Business Applications category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol (MCP) server that integrates with F

Use Cases

Interact with FoundryVTT tabletop gaming sessions through natural language.
Query actors, roll dice, and manage game world content with AI assistance.
laurigates

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx foundryvtt

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use FoundryVTT

The FoundryVTT MCP Server connects AI assistants to a live FoundryVTT tabletop gaming instance, allowing you to query actors and items, roll dice with any formula, search journal entries, generate random NPCs and treasure tables, and inspect combat state — all through natural language. It uses Socket.IO for real-time synchronization with the FoundryVTT server, so the AI always sees the current world state. Game Masters and players can use it to speed up session prep, automate content generation, and interact with their game world without switching away from their AI assistant.

Prerequisites

  • A running FoundryVTT server (self-hosted or cloud-hosted) accessible via URL
  • A FoundryVTT user account — the README recommends creating a dedicated API user with the Assistant GM role
  • Node.js 18+ (for npx) or Bun runtime installed
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Prepare a dedicated FoundryVTT API user

In FoundryVTT, create a new user account specifically for the MCP server. Assign it the Assistant GM role to ensure it has the necessary permissions without full GM access. Note the username and password.

2

Test the server quickly with npx or bunx

Before configuring a permanent setup, verify connectivity by running the server directly. It will connect to your FoundryVTT instance using the provided credentials.

# Using npx
npx -y foundryvtt-mcp

# Using bun
bunx foundryvtt-mcp
3

Add the server to your Claude Desktop configuration

Add the FoundryVTT MCP server entry to `claude_desktop_config.json` with your server URL and credentials as environment variables.

{
  "mcpServers": {
    "foundryvtt": {
      "command": "bunx",
      "args": ["foundryvtt-mcp"],
      "env": {
        "FOUNDRY_URL": "http://localhost:30000",
        "FOUNDRY_USERNAME": "api-user",
        "FOUNDRY_PASSWORD": "your-password"
      }
    }
  }
}
4

Restart Claude Desktop and verify the connection

Restart Claude Desktop. The FoundryVTT tools should now be available. Ask Claude to list the actors in the current scene to confirm the connection is live.

5

Optional: run the setup wizard for guided configuration

For development use or a guided setup, clone the repository and run the built-in setup wizard which walks through all configuration options.

git clone https://github.com/laurigates/foundryvtt-mcp.git
cd foundryvtt-mcp
bun install
bun run setup-wizard

FoundryVTT Examples

Client configuration

Complete Claude Desktop configuration for the FoundryVTT MCP server using bunx.

{
  "mcpServers": {
    "foundryvtt": {
      "command": "bunx",
      "args": ["foundryvtt-mcp"],
      "env": {
        "FOUNDRY_URL": "http://localhost:30000",
        "FOUNDRY_USERNAME": "api-user",
        "FOUNDRY_PASSWORD": "your-password",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Prompts to try

Example prompts for game masters and players interacting with a live FoundryVTT session.

- "Roll 1d20+5 for an attack roll against the goblin"
- "List all actors in the current scene and their hit points"
- "Generate a random NPC merchant appropriate for a level 5 party"
- "Search the journal for any entries about the Sunken Temple dungeon"
- "Generate a treasure table for a CR 8 encounter"
- "What is the current initiative order in the active combat?"

Troubleshooting FoundryVTT

Connection refused or timeout when the server starts

Verify that FOUNDRY_URL is reachable from the machine running the MCP server. If FoundryVTT is on localhost, use `http://localhost:30000` (the default port). For cloud-hosted instances, ensure the URL includes the correct port and protocol.

Authentication fails — invalid username or password error

Double-check the FOUNDRY_USERNAME and FOUNDRY_PASSWORD values. Ensure you are using the FoundryVTT user account credentials (not the admin setup password). The recommended approach is to create a dedicated API user in the FoundryVTT user management interface.

bunx or bun command not found

Install Bun with `curl -fsSL https://bun.sh/install | bash`. Alternatively, replace `bunx` with `npx` in the configuration — both transports are supported.

Frequently Asked Questions about FoundryVTT

What is FoundryVTT?

FoundryVTT is a Model Context Protocol (MCP) server that model context protocol (mcp) server that integrates with foundryvtt, allowing ai assistants to interact with your tabletop gaming sessions. query actors, roll dice, generate content, and manage your game world through natural language. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install FoundryVTT?

Follow the installation instructions on the FoundryVTT GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with FoundryVTT?

FoundryVTT works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is FoundryVTT free to use?

Yes, FoundryVTT is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

FoundryVTT Alternatives — Similar Business Applications Servers

Looking for alternatives to FoundryVTT? Here are other popular business applications servers you can use with Claude, Cursor, and VS Code.

n8n

189.1k

A comprehensive MCP server that provides full control over n8n automation workflows through natural language. It offers 43 tools for managing workflows, executions, credentials, and data tables, with safety features like write-mode protection and dou

LobeHub

77.5k

🤯 LobeHub is your Chief Agent Operator, organizing your agents into 7×24 operations by hiring, scheduling, and reporting on your entire AI team.

Jeecgboot

46.4k

AI 低代码平台,「低代码 + 零代码」双模式驱动:低代码一键生成前后端代码,零代码 5 分钟搭建系统,AI Skills 一句话画流程、设计表单、生成整套系统。内置 AI聊天、知识库、流程编排、MCP插件等,兼容主流大模型。引领「AI 生成 → 在线配置 → 代码生成 → 手工合并->AI修改」开发模式,消除 Java 项目 80% 的重复工作,提效而不失灵活。

CowAgent

44.7k

CowAgent (chatgpt-on-wechat) 是基于大模型的超级AI助理,能主动思考和任务规划、访问操作系统和外部资源、创造和执行Skills、通过长期记忆和知识库不断成长,比OpenClaw更轻量和便捷。同时支持微信、飞书、钉钉、企微、QQ、公众号、网页等接入,可选择DeepSeek/OpenAI/Claude/Gemini/ MiniMax/Qwen/GLM/LinkAI,能处理文本、语音、图片和文件,可快速搭建个人AI助理和企业数字员工。

Minds Platform

39.2k

Platform dedicated to building an open foundation for applied Artificial Intelligence, designed for people seeking production-ready AI systems they can truly control, extend and deploy anywhere.

Astrbot

32.8k

AI Agent Assistant & development framework that integrates lots of IM platforms, LLMs, plugins and AI feature, and can be your openclaw alternative. ✨

Browse More Business Applications MCP Servers

Explore all business applications servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "foundryvtt": { "command": "npx", "args": ["-y", "foundryvtt"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use FoundryVTT?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides