Foundry REST API MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FOUNDRY_CLIENT_ID | No | Optional client ID when the key is bound to exactly one Foundry world | |
| FOUNDRY_REST_API_KEY | Yes | A scoped API key with required relay permissions | |
| FOUNDRY_REST_API_BASE_URL | Yes | The base URL of the Foundry REST API relay |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| foundry_list_clientsA | List Foundry VTT worlds connected to the relay, including their connection status and Foundry version. |
| foundry_get_current_clientA | Get the relay's currently resolved Foundry world. With a scoped key this identifies its clientId without FOUNDRY_CLIENT_ID. |
| foundry_list_usersA | 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. |
| 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. |
| foundry_get_structureC | Read folders and document references from a Foundry world. |
| foundry_get_entityB | Get one Foundry document by UUID, such as Actor.abc123. |
| foundry_searchC | Search world entities and compendiums. |
| foundry_create_entityC | Create a Foundry world entity. |
| foundry_update_entityA | Update a Foundry entity by UUID or the current selection. |
| foundry_delete_entityB | Delete a Foundry entity by UUID or the current selection. |
| foundry_create_actor_embedded_documentsA | Add Items or ActiveEffects to one actor. Item creation uses the relay's supported Actor items upsert. |
| foundry_update_actor_embedded_documentsB | Update Items or ActiveEffects embedded in one actor. |
| foundry_delete_actor_embedded_documentsB | Delete Items or ActiveEffects embedded in one actor. |
| foundry_get_folderA | Get a folder and its contents by name. |
| foundry_create_folderC | Create a Foundry folder. |
| foundry_delete_folderA | Delete a Foundry folder; deleteAll also deletes its contents. |
| foundry_list_filesA | List files and directories in a Foundry file source. |
| foundry_download_fileB | Download a file from a Foundry file source. |
| foundry_upload_fileB | Upload a base64-encoded file or data URL to a Foundry file source. |
| foundry_get_scenesC | Get one or more scenes. |
| foundry_create_sceneC | Create a new scene. |
| foundry_update_sceneC | Update a scene by ID, name, or active status. |
| foundry_delete_sceneB | Delete a scene by ID or name. |
| foundry_switch_sceneB | Switch the player-facing active scene. |
| foundry_get_canvas_documentsB | Get canvas embedded documents from a scene. |
| foundry_create_canvas_documentsA | Create one or more canvas embedded documents. |
| foundry_update_canvas_documentC | Update one canvas embedded document. |
| foundry_delete_canvas_documentB | Delete one canvas embedded document. |
| foundry_move_tokenC | Move a token to canvas coordinates. |
| foundry_measure_distanceB | Measure distance between two points or tokens. |
| foundry_select_tokensC | Select tokens in the Foundry client. |
| foundry_get_selected_tokensB | Get tokens selected in the Foundry client. |
| foundry_list_encountersA | List active encounters. |
| foundry_start_encounterD | Start an encounter. |
| foundry_next_turnC | Advance to the next encounter turn. |
| foundry_previous_turnB | Return to the previous encounter turn. |
| foundry_next_roundB | Advance to the next encounter round. |
| foundry_previous_roundB | Return to the previous encounter round. |
| foundry_end_encounterC | End an encounter. |
| foundry_add_to_encounterB | Add selected or named tokens to an encounter. |
| foundry_remove_from_encounterC | Remove selected or named tokens from an encounter. |
| foundry_get_effectsA | Get active effects on an actor or token. |
| foundry_list_status_effectsB | List status effects supported by the game system. |
| foundry_add_effectC | Add a status or custom active effect. |
| foundry_remove_effectB | Remove an active effect by ID or status. |
| foundry_rollC | Roll a dice formula. |
| foundry_get_last_rollC | Get the latest roll. |
| foundry_list_rollsC | Get recent rolls. |
| foundry_list_chat_messagesA | Get chat messages with optional pagination and filters. |
| foundry_send_chat_messageC | Create a chat message. |
| 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. |
| foundry_delete_chat_messageA | Delete one chat message. |
| foundry_clear_chatA | Permanently clear all chat messages. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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.