Foundry REST API MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Foundry REST API MCPstart combat in the current scene"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Foundry REST API MCP
An MCP server that lets MCP clients work with a Foundry VTT world through the FoundryVTT REST API Relay. It is the client-facing component of the ThreeHats ecosystem:
Foundry VTT + REST API Module <-- WebSocket --> REST API Relay <-- HTTPS --> this MCP serverThe MCP server connects to the relay's HTTP(S) API. Do not use the module's ws:// or wss:// relay URL for FOUNDRY_REST_API_BASE_URL.
Ecosystem and compatibility
Component | Role |
Connects a Foundry world to the relay over WebSocket. | |
Exposes the authenticated HTTP API used by this server. | |
Foundry REST API MCP | Exposes supported relay operations as typed |
Use the upstream relay documentation for module pairing, relay deployment, API-key management, and the complete REST API reference.
This project supports the relay's optional clientId and userId request scoping. A scoped API key can bind either value so the MCP client does not need to provide it. A key scoped to one world therefore does not require FOUNDRY_CLIENT_ID.
Related MCP server: FoundryMCP
Quick start
Install and pair the Foundry module with either the public relay or your self-hosted relay.
Create an API key in the relay with only the scopes needed for the tools you intend to use.
Add this server to Codex in
~/.codex/config.toml:
[mcp_servers.foundry]
command = "npx"
args = [
"--yes",
"github:zagushka/foundry-rest-api-mcp#v0.5.0"
]
[mcp_servers.foundry.env]
# Public relay:
FOUNDRY_REST_API_BASE_URL = "https://foundryrestapi.com"
FOUNDRY_REST_API_KEY = "replace-with-a-scoped-secret"
# Optional: omit when the key is already scoped to exactly one world.
# FOUNDRY_CLIENT_ID = "fvtt_..."Restart Codex after changing the configuration. Codex starts this stdio server automatically; it does not expose its own HTTP port.
Self-hosted relay
Use the HTTP API address of your relay instead of its WebSocket address. The standard local relay API listens on port 3011:
[mcp_servers.foundry.env]
FOUNDRY_REST_API_BASE_URL = "http://localhost:3011"
FOUNDRY_REST_API_KEY = "replace-with-a-scoped-secret"
# FOUNDRY_CLIENT_ID = "fvtt_..."If Codex should inherit variables already available in its environment, use env_vars instead:
[mcp_servers.foundry]
command = "npx"
args = [
"--yes",
"github:zagushka/foundry-rest-api-mcp#v0.5.0"
]
env_vars = [
"FOUNDRY_REST_API_BASE_URL",
"FOUNDRY_REST_API_KEY",
"FOUNDRY_CLIENT_ID"
]The Git tag pins the installed release. Change it deliberately when upgrading.
Supported tools and permissions
All exposed tools begin with foundry_ and publish typed MCP parameters. Request the smallest set of relay scopes needed for the tools you enable:
Tool group | Capabilities | Relay scopes |
World content and folders | Inspect connected worlds; inspect, search, create, update, and delete entities and folders |
|
Users | List users, create an isolated bot/service user |
|
Actor inventory and effects | Add, update, and delete embedded |
|
Files | Browse file sources, download files, and upload base64-encoded files |
|
Scenes and canvas | Manage scenes, canvas documents, token movement, selection, and distance measurement |
|
Encounters and effects | Read and manage combats, combatants, turns, and active effects |
|
Table play | Roll dice and read, send, or delete chat messages |
|
Read-only tools advertise readOnlyHint: true. Tools that change world state advertise readOnlyHint: false; deletion tools and chat clearing also advertise destructiveHint: true. Treat a key that grants write scopes as a privileged credential and keep it outside Git.
Actor embedded documents
Use foundry_create_actor_embedded_documents, foundry_update_actor_embedded_documents, and foundry_delete_actor_embedded_documents to manage one actor's embedded Item or ActiveEffect documents. Pass the actor UUID (for example, Actor.abc123) and an array of document data or IDs. Updates require each document's _id or id.
The relay exposes no dedicated Actor.createEmbeddedDocuments route. For items, the create tool uses its supported actor items upsert; for effects, it uses the relay's effect endpoint. Updating and deleting target the embedded document UUIDs directly.
External bot users and private replies
Use foundry_list_users to find the Foundry user ID for FOUNDRY_BOT_USER_ID; the relay resolves clientId automatically when the API key is locked to one world. foundry_create_user is available only to a GM key with user:write; it accepts no password and returns only a safe subset of user fields.
Use foundry_get_current_client (or foundry_list_clients for more than one connected world) to diagnose the resolved clientId, world ID/title, Foundry version, and connection status without setting FOUNDRY_CLIENT_ID manually.
For every bot reply use foundry_send_chat_as_user, not the generic chat tool. It sends the requested userId to the relay and rejects a response whose ChatMessage.author.id differs. The relay is the authorization boundary: a scoped API key forcibly replaces userId, so callers cannot impersonate another user; an unscoped GM key may choose an author.
For a private reply, pass chatType: 3 and whisper: [originatingPlayerUserId]. The optional live test verifies the complete flow, including invisibility to an unrelated player:
FOUNDRY_REST_API_BASE_URL=https://relay.example \
FOUNDRY_BOT_API_KEY=... FOUNDRY_PLAYER_API_KEY=... FOUNDRY_OTHER_PLAYER_API_KEY=... \
FOUNDRY_BOT_USER_ID=... FOUNDRY_PLAYER_USER_ID=... \
npm run test:private-bot-replyIt intentionally creates two Whisper messages and does not remove them. Use test-world scoped keys with chat:write for the bot/player and chat:read for the unrelated-player visibility check.
The server deliberately does not expose D&D5e-specific operations, sessions, macros, playlists, arbitrary JavaScript, relay authentication management, or SSE/WebSocket subscriptions. Use the upstream API directly when one of those capabilities is required.
Local development
git clone https://github.com/zagushka/foundry-rest-api-mcp.git
cd foundry-rest-api-mcp
npm ci
npm testFor a manual local run, copy .env.example to .env, fill in the relay address and API key, then run:
npm run build
npm run start:envLicense
MIT © Peter Pshenichny
Available Tools
53 toolsfoundry_add_effectC
Add a status or custom active effect.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| statusId | No | ||
| effectData | No | JSON object accepted by Foundry. |
foundry_add_to_encounterB
Add selected or named tokens to an encounter.
| Name | Required | Description | Default |
|---|---|---|---|
| uuids | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| selected | No | ||
| encounter | No | ||
| rollInitiative | No |
foundry_clear_chatADestructive
Permanently clear all chat messages.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_create_actor_embedded_documentsA
Add Items or ActiveEffects to one actor. Item creation uses the relay's supported Actor items upsert.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| actorUuid | Yes | Actor UUID, for example Actor.abc123. | |
| documents | Yes | ||
| documentType | Yes |
foundry_create_canvas_documentsA
Create one or more canvas embedded documents.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | One canvas document or an array of documents. | |
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| documentType | Yes | Canvas document collection. |
foundry_create_entityC
Create a Foundry world entity.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON object accepted by Foundry. | |
| folder | No | ||
| keepId | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| override | No | ||
| entityType | Yes |
foundry_create_folderC
Create a Foundry folder.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| folderType | Yes | ||
| parentFolderId | No |
foundry_create_sceneC
Create a new scene.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON object accepted by Foundry. | |
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_create_userA
Create a Foundry service or bot user. Requires relay scope user:write and GM access. The tool never accepts, returns, or logs a password.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| role | Yes | ||
| color | No | ||
| active | No | ||
| avatar | No | ||
| clientId | No | Foundry client ID; omit when the API key is scoped to one world. |
foundry_delete_actor_embedded_documentsBDestructive
Delete Items or ActiveEffects embedded in one actor.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| actorUuid | Yes | Actor UUID, for example Actor.abc123. | |
| documentIds | Yes | ||
| documentType | Yes |
foundry_delete_canvas_documentBDestructive
Delete one canvas embedded document.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| documentId | Yes | ||
| documentType | Yes | Canvas document collection. |
foundry_delete_chat_messageADestructive
Delete one chat message.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| messageId | Yes |
foundry_delete_entityBDestructive
Delete a Foundry entity by UUID or the current selection.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| selected | No |
foundry_delete_folderADestructive
Delete a Foundry folder; deleteAll also deletes its contents.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| folderId | Yes | ||
| deleteAll | No |
foundry_delete_sceneBDestructive
Delete a scene by ID or name.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_download_fileBRead-only
Download a file from a Foundry file source.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Full path to the file, relative to the selected source. | |
| format | No | Response representation; use base64 when the file content must be consumed as text. | |
| source | No | Foundry file source, such as data, systems, or modules. | |
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_end_encounterC
End an encounter.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| encounter | No |
foundry_get_canvas_documentsBRead-only
Get canvas embedded documents from a scene.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| documentId | No | ||
| documentType | Yes | Canvas document collection. |
foundry_get_current_clientARead-only
Get the relay's currently resolved Foundry world. With a scoped key this identifies its clientId without FOUNDRY_CLIENT_ID.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
foundry_get_effectsARead-only
Get active effects on an actor or token.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_get_entityBRead-only
Get one Foundry document by UUID, such as Actor.abc123.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | No | ||
| actor | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| selected | No |
foundry_get_folderARead-only
Get a folder and its contents by name.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_get_last_rollCRead-only
Get the latest roll.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_get_scenesCRead-only
Get one or more scenes.
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | ||
| name | No | ||
| active | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| viewed | No | ||
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_get_selected_tokensBRead-only
Get tokens selected in the Foundry client.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_get_structureCRead-only
Read folders and document references from a Foundry world.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| types | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| recursive | No | ||
| recursiveDepth | No | ||
| includeEntityData | No |
foundry_list_chat_messagesARead-only
Get chat messages with optional pagination and filters.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| speaker | No | ||
| chatType | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_list_clientsARead-only
List Foundry VTT worlds connected to the relay, including their connection status and Foundry version.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
foundry_list_encountersARead-only
List active encounters.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_list_filesARead-only
List files and directories in a Foundry file source.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path relative to the selected Foundry file source. | |
| source | No | Foundry file source, such as data, systems, or modules. | |
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| recursive | No |
foundry_list_rollsCRead-only
Get recent rolls.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_list_status_effectsBRead-only
List status effects supported by the game system.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_list_usersARead-only
List Foundry users as id, name, role, isGM, active, and avatar. Requires relay scope user:read and GM access; clientId is auto-resolved for a scoped key.
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | No | Foundry client ID; omit when the API key is scoped to one world. |
foundry_measure_distanceBRead-only
Measure distance between two points or tokens.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| originX | No | ||
| originY | No | ||
| sceneId | No | ||
| targetX | No | ||
| targetY | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| originName | No | ||
| originUuid | No | ||
| targetName | No | ||
| targetUuid | No |
foundry_move_tokenC
Move a token to canvas coordinates.
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| name | No | ||
| uuid | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| animate | No | ||
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| waypoints | No |
foundry_next_roundB
Advance to the next encounter round.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| encounter | No |
foundry_next_turnC
Advance to the next encounter turn.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| encounter | No |
foundry_previous_roundB
Return to the previous encounter round.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| encounter | No |
foundry_previous_turnB
Return to the previous encounter turn.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| encounter | No |
foundry_remove_effectBDestructive
Remove an active effect by ID or status.
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| effectId | No | ||
| statusId | No |
foundry_remove_from_encounterC
Remove selected or named tokens from an encounter.
| Name | Required | Description | Default |
|---|---|---|---|
| uuids | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| selected | No | ||
| encounter | No |
foundry_rollC
Roll a dice formula.
| Name | Required | Description | Default |
|---|---|---|---|
| flavor | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| formula | Yes | ||
| speaker | No | ||
| whisper | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| createChatMessage | No |
foundry_searchCRead-only
Search world entities and compendiums.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | No | ||
| filter | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| minified | No | ||
| ownedByUserId | No | ||
| excludeCompendiums | No |
foundry_select_tokensC
Select tokens in the Foundry client.
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | ||
| data | No | JSON object accepted by Foundry. | |
| name | No | ||
| uuids | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| overwrite | No |
foundry_send_chat_as_userA
Create a chat message as a Foundry user and verify the returned ChatMessage.author.id. The relay permits this only for the API key's scoped user, or for a GM key; scoped keys cannot be overridden.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | ||
| userId | Yes | Foundry user ID for the message author. The relay must reject it unless it matches the scoped API-key user or the key has GM access. | |
| content | Yes | ||
| speaker | No | ||
| whisper | No | Recipient Foundry user IDs. For a private reply, pass only the originating player. | |
| chatType | No | Use 3 for a Whisper. | |
| clientId | No | Foundry client ID; omit when the API key is scoped to one world. |
foundry_send_chat_messageC
Create a chat message.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | ||
| flavor | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| content | Yes | ||
| speaker | No | ||
| whisper | No | ||
| chatType | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_start_encounterD
Start an encounter.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| tokens | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| rollAll | No | ||
| rollNPC | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| startWithPlayers | No | ||
| startWithSelected | No |
foundry_switch_sceneB
Switch the player-facing active scene.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_update_actor_embedded_documentsB
Update Items or ActiveEffects embedded in one actor.
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| actorUuid | Yes | Actor UUID, for example Actor.abc123. | |
| documents | Yes | ||
| documentType | Yes |
foundry_update_canvas_documentC
Update one canvas embedded document.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON object accepted by Foundry. | |
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| documentId | Yes | ||
| documentType | Yes | Canvas document collection. |
foundry_update_entityA
Update a Foundry entity by UUID or the current selection.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON object accepted by Foundry. | |
| uuid | No | ||
| actor | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| selected | No |
foundry_update_sceneC
Update a scene by ID, name, or active status.
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON object accepted by Foundry. | |
| name | No | ||
| active | No | ||
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| sceneId | No | ||
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. |
foundry_upload_fileB
Upload a base64-encoded file or data URL to a Foundry file source.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Destination directory relative to the selected file source. | |
| source | No | Foundry file source, such as data, systems, or modules. | |
| userId | No | Optional Foundry user ID or username for permission-scoped access. | |
| clientId | No | Foundry client ID; defaults to FOUNDRY_CLIENT_ID. | |
| fileData | Yes | Base64-encoded file content, optionally as a data URL. | |
| filename | Yes | ||
| mimeType | No | ||
| overwrite | No |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
53 tool updates
v0.5.0- First observed
foundry_add_effect - First observed
foundry_add_to_encounter - First observed
foundry_clear_chat - First observed
foundry_create_actor_embedded_documents - First observed
foundry_create_canvas_documents - First observed
foundry_create_entity - First observed
foundry_create_folder - First observed
foundry_create_scene - First observed
foundry_create_user - First observed
foundry_delete_actor_embedded_documents - First observed
foundry_delete_canvas_document - First observed
foundry_delete_chat_message - First observed
foundry_delete_entity - First observed
foundry_delete_folder - First observed
foundry_delete_scene - First observed
foundry_download_file - First observed
foundry_end_encounter - First observed
foundry_get_canvas_documents - First observed
foundry_get_current_client - First observed
foundry_get_effects - First observed
foundry_get_entity - First observed
foundry_get_folder - First observed
foundry_get_last_roll - First observed
foundry_get_scenes - First observed
foundry_get_selected_tokens - First observed
foundry_get_structure - First observed
foundry_list_chat_messages - First observed
foundry_list_clients - First observed
foundry_list_encounters - First observed
foundry_list_files - First observed
foundry_list_rolls - First observed
foundry_list_status_effects - First observed
foundry_list_users - First observed
foundry_measure_distance - First observed
foundry_move_token - First observed
foundry_next_round - First observed
foundry_next_turn - First observed
foundry_previous_round - First observed
foundry_previous_turn - First observed
foundry_remove_effect - First observed
foundry_remove_from_encounter - First observed
foundry_roll - First observed
foundry_search - First observed
foundry_select_tokens - First observed
foundry_send_chat_as_user - First observed
foundry_send_chat_message - First observed
foundry_start_encounter - First observed
foundry_switch_scene - First observed
foundry_update_actor_embedded_documents - First observed
foundry_update_canvas_document - First observed
foundry_update_entity - First observed
foundry_update_scene - First observed
foundry_upload_file
TDQS
Scored across 53 tools
Each tool targets a distinct resource and action, following a clear verb_noun pattern. Even with 53 tools, descriptions are specific enough to avoid confusion between similar-sounding operations like get_folder vs get_structure or get_entity vs search.
All tools share the 'foundry_' prefix and use a consistent verb_noun structure. Minor inconsistencies exist, such as create_canvas_documents (plural) versus update_canvas_document (singular) and send_chat_as_user versus send_chat_message, but these do not undermine overall predictability.
With 53 tools, the server is well beyond the typical well-scoped range of 3-15. While the Foundry domain is broad, the excessive number of tools could overwhelm agents and makes navigation harder. Some tools, like the multiple encounter turn/round controls, could be consolidated.
The tool set covers many core Foundry operations, including entities, scenes, tokens, encounters, effects, rolls, and chat. However, there are notable gaps: users can be listed and created but not updated or deleted, encounters can be started/ended but not created or deleted, and folders have no update operation. These missing lifecycle operations limit full workflow coverage.
Maintenance
Related MCP Connectors
Connect any AI to your Foundry VTT world: actors, combat, dice, journals, tokens, compendiums.
Your tabletop campaign's journal, wiki, map, character sheets and combat tracker.
Characters, campaigns, adventures & worlds for D&D 5e/5.5e, Pathfinder, Savage Worlds, Fate, & more.
Read and edit a tabletop campaign's notes, characters, initiative and skills in Arcane Core.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceConnects Claude Desktop to Foundry VTT for AI-powered campaign management, enabling natural language interaction with game data including quest creation, character management, compendium searches, and dice rolling. Provides 20 MCP tools for seamless integration between Claude and your tabletop RPG sessions.82MIT
- AlicenseNot gradedqualityBmaintenanceEnables direct interaction with FoundryVTT virtual tabletop servers via native WebSocket protocol. Supports retrieving, creating, modifying, and deleting game documents like actors, items, scenes, and journal entries without requiring additional modules.8 npm7MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with Foundry Virtual Tabletop, supporting reading world data, managing combat, rolling dice, and updating actor attributes via a sidecar architecture.33 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to interact with Foundry Virtual Tabletop worlds via a permissioned Windows host and GM-authorized browser companion, including document management, asset uploads, journal sessions, and background intelligence.8 npmMIT