
laurigates/foundryvtt-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
FoundryVTT と統合するモデルコンテキストプロトコル (MCP) サーバーで、AI アシスタントがテーブルトップのゲームセッションとやり取りできるようにします.
概要
FoundryVTT と統合するモデルコンテキストプロトコル (MCP) サーバーで、AI アシスタントが自然な言語で卓上ゲームセッションとやり取りできるようにします。 - — 任意の式で標準的なRPGの表記 - — 俳優、アイテム、シーン、ジャーナルを検索し、検査 - - - 戦闘トラッキング、チャットメッセージ、ユーザープレゼンス - — NPC、ルートテーブル、ルールルックアップ - すべてのゲームエンティティティを横断全文検索 - ソケット。 IO は、接続に関する完全な世界状態をロードします。 - — の foundry:// 直接データアクセスのための URI - - - オプションのサーバー健康監視(REST API モジュールが必要です) - Node.js 18+(またはBan) - アクティブワールドで稼働するFoundryVTTサーバー - MCP互換AIクライアント(Claude Desktop、Claude Code、VSコードなど) 独自のGMまたはプレイヤーアカウントを使用するのではなく、MCPサーバー用の別のFoundryVTTユーザーアカウントを作成することをお勧めします。 より良いセキュリティと監査性を提供します。 1。 → 2に行く 3. ユーザー名(例、mcp-api)と強力なパスワード4を設定します.
概要(AI 翻訳)
FoundryVTT と統合するモデルコンテキストプロトコル (MCP) サーバーで、AI アシスタントが自然な言語で卓上ゲームセッションとやり取りできるようにします。
##特徴
-Dice Rolling - 任意の式で標準的なRPG表記 -Data Querying — 俳優、アイテム、シーン、ジャーナルの検索と検査
- Game State — トラッキング、チャットメッセージ、ユーザープレゼンスを戦う
- コンテンツ生成 — NPC、ルートテーブル、ルールルックアップ
- 世界検索 — 全ゲーム組織全体で全文検索
- ライブ接続 — ソケット。 IO は接続の完全な世界状態を読みます
- MCPリソース — [
foundry://] 直接データアクセスのためのURI -Diagnostics - 任意サーバー健康監視(REST APIモジュールが必要です)
クイックスタート
前提条件
- Node.js 18 + (または Bun)
- FoundryVTT サーバがアクティブ・ワールドで稼働
- MCP対応AIクライアント(Claudeデスクトップ、Claudeコード、VSコードなど)
推奨:専用の API ユーザを作成する
独自のGMまたはプレイヤーアカウントを使用するのではなく、MCPサーバー用の別のFoundryVTTユーザーアカウントを作成することをお勧めします。 より良いセキュリティと監査性を提供します。
FoundryVTTで: 1。 [構成*]→[**ユーザー管理]に移動します 2.
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
FoundryVTT MCP Server
A Model Context Protocol (MCP) server that integrates with FoundryVTT, allowing AI assistants to interact with your tabletop gaming sessions through natural language.
Features
- Dice Rolling — standard RPG notation with any formula
- Data Querying — search and inspect actors, items, scenes, journals
- Game State — combat tracking, chat messages, user presence
- Content Generation — NPCs, loot tables, rule lookups
- World Search — full-text search across all game entities
- Live Connection — Socket.IO loads complete world state on connect
- MCP Resources —
foundry://URIs for direct data access - Diagnostics — optional server health monitoring (requires REST API module)
Quick Start
Prerequisites
- Node.js 18+ (or Bun)
- FoundryVTT server running with an active world
- MCP-compatible AI client (Claude Desktop, Claude Code, VS Code, etc.)
Recommended: Create a Dedicated API User
It is recommended to create a separate FoundryVTT user account for the MCP server rather than using your own GM or player account. This provides better security and auditability.
In FoundryVTT:
- Go to Configuration → User Management
- Click Create User
- Set a username (e.g.,
mcp-api) and a strong password - Assign the Assistant GM role (needed to read world data and roll dice)
- Use this account’s credentials in your MCP configuration
Benefits:
- Chat messages and actions from the MCP server are clearly attributed to a separate user
- You can revoke access by disabling the API user without affecting your own account
- Limits blast radius if credentials are ever exposed
Installation
Run directly without installing — no clone needed:
bunx foundryvtt-mcp
Or with npx:
npx -y foundryvtt-mcp
Client Configuration
Claude Desktop / Claude Code
Add to your MCP configuration (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"foundryvtt": {
"command": "bunx",
"args": ["foundryvtt-mcp"],
"env": {
"FOUNDRY_URL": "http://localhost:30000",
"FOUNDRY_USERNAME": "your_username",
"FOUNDRY_PASSWORD": "your_password"
}
}
}
}
VS Code
Add to your VS Code MCP settings:
{
"servers": {
"foundryvtt": {
"command": "bunx",
"args": ["foundryvtt-mcp"],
"env": {
"FOUNDRY_URL": "http://localhost:30000",
"FOUNDRY_USERNAME": "your_username",
"FOUNDRY_PASSWORD": "your_password"
}
}
}
}
Development Setup
For local development or contributing:
git clone https://github.com/laurigates/foundryvtt-mcp.git
cd foundryvtt-mcp
bun install
インストール
npx -y foundryvtt-mcp設定
{
"mcpServers": {
"foundryvtt": {
"command": "bunx",
"args": ["foundryvtt-mcp"],
"env": {
"FOUNDRY_URL": "http://localhost:30000",
"FOUNDRY_USERNAME": "your_username",
"FOUNDRY_PASSWORD": "your_password"
}
}
}
}