Open-source module · hosted MCP server

Your Foundry VTT world, open to any AI assistant.

Install one module, sign in with Patreon, and Claude, ChatGPT, Codex or Cursor can read your campaign and act in it: roll dice, run combat, write journals, move tokens, import from compendiums.

Free to start · Foundry VTT 11–14 · dnd5e and pf2e aware

Claude · connected to your world
Show me the party — list all actors with their HP
Four player characters in Player Characters:
CharacterHPAC
Randal · Fighter12 / 1219
Riswynn · Rogue11 / 1113
Akra · Cleric9 / 916
Zanna · Wizard8 / 811
1 tool call · actor-list · 467 ms

Works with

ClaudeClaude CodeChatGPTCodex CLICursorVS CodeGemini CLIWindsurfCline

One endpoint, https://foundry-mcp.com/mcp — any client that speaks MCP.

Three steps

Connected in five minutes

1

Install the module

In Foundry: Add-on Modules → Install Module → search Foundry API Bridge. Enable it in your world.

2

Get a key on Patreon

Click Get API Key in the module settings, sign in with Patreon, paste the key back. A free account is enough.

3

Connect your AI client

Add the server URL to your client and sign in when it asks. No key to paste for Claude, ChatGPT, Codex, Cursor, VS Code or Gemini CLI.

https://foundry-mcp.com/mcp

121 tools

Everything a GM does at the table

Roll and fight

Dice, initiative, the combat tracker turn by turn. System-aware rolls: skills, saves, attacks and damage for dnd5e; strikes, conditions and spells for pf2e.

Write the story

Journals and pages, roll tables, chat messages and exports. Ask for a session recap and get it filed where it belongs.

Run the table

Scenes, tokens, doors, world time, pause. Move the goblins, open the gate, advance the clock.

Browse compendiums

Search SRD and module packs, filter monsters by CR, import actors and items straight into the world.

Same module, same key: a public REST API at api.foundry-mcp.com for bots and custom tools.

New · code mode

One script instead of forty tool calls

For Claude Code and Codex: the assistant reads a typed foundry.* API, writes a short TypeScript script and runs it in a sandbox against your world. Loops, filters and bulk edits happen in one round trip, with a trace of every call and the ids it touched.

  • A static check refuses a script before it runs if it calls something your tier lacks
  • Budgets per script: 150 calls, 30 deletions, 60 seconds
  • Open to every tier with a daily quota
How code mode works →
// execute: one script, one round trip
const pcs = await foundry.actors.filter({ type: "character" });
for (const pc of pcs.results) {
  await foundry.actors.update({ actorId: pc.id, xp: pc.xp + 300 });
  await foundry.items.addFromCompendium({ actorId: pc.id, uuid: potion });
}
await foundry.chat.send({ content: `+300 XP and a Potion of Healing for ${pcs.results.length} heroes` });
return pcs.results.map(p => p.name);

--- 9 calls, 1.2 s ---
 actors.filter 180 ms
 actors.update 44 ms  actorId=…  ×4
 items.addFromCompendium 61 ms  ×4
 chat.send 30 ms

Pricing

Free for the party, paid for the Dungeon Master

Free
€0
A free Patreon membership
  • 58 tools: actors, items, effects, folders, chat
  • Dice, skill, save and attack rolls for dnd5e; strikes, conditions and spells for pf2e
  • Initiative rolls
  • Code mode: 30 runs a day
Get a free key
Adventurer
€3/mo
Everything in Free, plus
  • Journals and pages: read, write, show to players
  • Roll tables: roll, create, edit
  • 74 tools in total
  • Code mode: 100 runs a day
Join on Patreon
Dungeon Master
€10/mo
Everything, for the person running the game
  • Scenes, tokens, doors, world time, pause
  • The combat tracker, turn by turn
  • Compendium search and import into the world
  • All 121 tools · code mode without a daily limit
Become a Dungeon Master →

Every locked tool stays visible: the assistant tells you which tier unlocks it, and your key updates within seconds of upgrading. A key without a membership still answers world info and dice rolls.

Runs only on the GM's client

Nothing runs for players and nothing listens on your machine: the module opens one outgoing connection.

Your world is not stored

Commands pass through to your Foundry client and results go straight back. Revoke access by deleting the key.

Open source module

The bridge is on GitHub under an open licence. Read what it does before you install it.