Skip to main content
Glama
zagushka

Foundry REST API MCP

by zagushka

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FOUNDRY_CLIENT_IDNoOptional client ID when the key is bound to exactly one Foundry world
FOUNDRY_REST_API_KEYYesA scoped API key with required relay permissions
FOUNDRY_REST_API_BASE_URLYesThe 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zagushka/foundry-rest-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server