How to add AI to Foundry VTT
Install Familiar, activate your licence key, then paste a provider key or connect a plan you already pay for.
Guide
You already pay for Claude, ChatGPT, Gemini, Grok, or a Muse Code subscription. Point that assistant at your Foundry game and it drives Familiar directly: it takes the monsters' turns and referees the 5e rules, with no model key to buy and no per-token bill. The connection runs on MCP, an open standard, and Familiar's in-app wizard writes the config for you. You paste what it gives you instead of hand-editing JSON.
The Foundry half is probably already true. The AI half is the part to check.
Claude, ChatGPT through Codex, Gemini through Antigravity, Grok through Grok Build, and Meta's Muse Code can all drive Foundry. MCP, the Model Context Protocol, is the open standard that lets an AI app reach an outside tool and use it. Familiar is that tool for your Foundry table.
The wizard is in Foundry: Module Settings, Familiar, then the MCP / Subs tab, a card per client grouped by the subscription behind it. Pick yours and it writes the exact text with this world's secret already in it. A config block, one command, or values for a form.
Grok Build imports the MCP servers, skills and hooks of Claude Code and Cursor by default, so anything you set up there turns up in Grok too. Its own entry still wins for familiar, and the card names the settings that keep the rest out.
| Client | Subscription | Setup |
|---|---|---|
| Claude Desktop | Anthropic Pro / Max / Team | Paste the block the wizard writes |
| Claude Code | Anthropic Pro / Max / Team | One command (below) |
| Codex CLI | ChatGPT Free / Plus / Pro / Team | One command (below), plus a short note in ~/.codex/AGENTS.md |
| ChatGPT desktop app (Codex tab) | ChatGPT Free / Plus / Pro / Team | The app's own add-server form (Settings, Plugins, MCPs, Add), plus the same note in ~/.codex/AGENTS.md |
| Antigravity CLI | Google account (limits per plan) | Sign in through agy, quit it, then run the one command the wizard writes; it merges into your Google MCP config |
| Antigravity Editor | Google account (limits per plan) | Paste the block the wizard writes into Open MCP Config (Settings, Customizations, Installed MCP Servers). A separate install from the CLI |
| Grok Build CLI | SuperGrok subscription | One command (below) after grok login; grok mcp doctor familiar then checks the link |
| Muse Code | Meta account (Muse Code subscription or pay-as-you-go) | Sign in with muse login. With Muse Code closed, run the wizard's one command, which adds Familiar to ~/.config/muse/settings.json, then add the short note to ~/.config/muse/AGENTS.md. /mcp inside Muse Code checks the link |
Some cards end in a single command, and those are the ones below.
The lines below leave FAMILIAR_WS_SECRET as a placeholder, so copy the real one from your card instead: the wizard mints this world's own secret and fills it in. Every world generates its own. Familiar's WebSocket Secret module setting is how one config comes to serve all of them.
On Windows the wizard adds NODE_USE_SYSTEM_CA=1 to everything it writes, and npx.cmd in place of npx where the client needs it. Run it from a hosted game and your game's URL goes in as FAMILIAR_WS_ALLOWED_ORIGINS on its own.
claude mcp add familiar --scope user --env FAMILIAR_WS_SECRET=<your-secret> -- npx -y familiar-vtt
codex mcp add familiar --env FAMILIAR_WS_SECRET=<your-secret> -- npx -y familiar-vtt
grok mcp add familiar --env FAMILIAR_WS_SECRET=<your-secret> -- npx -y familiar-vtt
Three routes end in the same place, Familiar registered in your AI app, and you only need one. They run from doing all of it yourself to handing the job to the app.
Menu names and field labels move between app versions, so your card in the wizard is the current click-by-click. What stays put is the shape below.
Each card is written for someone who has never installed a developer tool. Every value is a copy box, an install step ends with what you should see, and the add step says what the command prints, then gives you a check that should name familiar.
Every card carries a Copy help prompt button. Paste that prompt into any AI chat you already use, the free web versions of ChatGPT and Claude included, and it walks you through the same steps with your own values in place. It explains, you type. It never needs access to this computer.
The Claude Code, Codex CLI and Grok Build cards add a second button, Copy setup prompt. Install the app and sign in first; that part stays yours. Paste the prompt in and it runs the registration, asks your approval as it goes, then verifies. It needs a normal session on your own computer; from a cloud sandbox it stops and points you back to the card.
Your card carries two status rows, one for the MCP Server and one for your app, and both read Connected once the link is up. Nothing needs reloading; the tab updates on its own. On a first run both rows can sit on Waiting for a moment.
Then send the two lines below. The first is the wizard's own question. The second is a roll that has to land in your Foundry chat log, which proves the write reaches Foundry and not only the read.
Use Familiar's get-world-info tool
Roll a d20 and post the result to the Foundry chat.
You talk to your AI app in plain language, the same as always, and it calls Familiar's tools as it goes. Whatever you ask for happens in your Foundry tab: tokens move, conditions apply, the journal opens on the right page. What your client gets back is a line saying so.
Scenes & TokensJournals & NotesKnowledge & Memory| What you ask for | Where it lands |
|---|---|
| Voice, music, a line spoken aloud | In your Foundry tab. Your client gets a line saying it played. |
| A scene change, a token move, a condition | On the Foundry canvas, while your client gets the receipt. |
| A generated image, or a battle-map screenshot | Back to the client inline. A generated battle map lands in a Foundry scene instead, never in your client. |
| Campaign memory, the knowledge base, table rules | Over MCP too, pulled in when your client asks rather than sent with every message. |
| A player's question in the table chat | With no key on the Chat tab it waits in the table inbox until you say "check the table". |
| The built-in chat's own conveniences | Live transcription, voice dictation, auto-pilot for NPC turns (D&D 5e), slash commands, drag-and-drop attachments, and the Edit button on a generated image. No MCP equivalent. Familiar Studio is a GM window of its own that you open from the chat, and your client can search its library and re-file the images in it. |
Claude Desktop, and any app Familiar does not recognise, start with a smaller set: the basics plus combat, scenes and character editing. The Claude guide shows how to change it.
A failure only one client shows lives on that client's page, linked above. These six stop every client.
Two different lights. The server row is the helper program, the client row is your app, and both need a moment after the app starts. The very first start also downloads the server, so give it a minute. Still nothing? Click Reconnect under the rows, or reload Foundry.
The secret in the config is not this world's. Copy the finished command or block from your card again, which always carries the current value, or set Familiar's WebSocket Secret module setting to the value your config already has. Every world mints its own, and that setting is how one config serves them all.
Hosted Foundry itself is fine: the server runs on your machine, never on the host. Chrome and Edge ask once whether the page may reach devices on your local network. Allow it. Dismissed it in Chrome? It is back under the site icon at the left of the address bar, Site settings, Local network access, then reload. The status row says so when your browser reports that permission blocked.
An antivirus that inspects HTTPS traffic, AVG and Avast among them, blocks the server's licence check while your browser sails through. The wizard already writes NODE_USE_SYSTEM_CA=1 into every Windows command and config it generates, and that needs Node 22.15 or newer. If you registered Familiar by hand, add it beside the secret and restart your app.
Windows blocks npm and npx in PowerShell until you allow it once. Run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser in that same window, answer Y, then run the failed command again. On a managed work computer that setting can be locked, and Command Prompt is the way round it.
Safari does not let a hosted page reach a program on your own machine, which is exactly what this connection is. Use Chrome, Edge or Firefox for a hosted game. A game you run on your own computer is not affected.
MCP is the path when you already pay for one of these subscriptions, or want an outside client for long, multi-step chains. An API key is the simplest setup, and the only route to the built-in chat's own conveniences, live transcription first among them. Both reach the same tools, so the choice is where the model runs and who bills you.
A model on your own machine is the third answer, and it does not run over MCP at all: the Local / Custom tab talks to it directly.
One limit before you commit. On a subscription your AI provider bills you nothing extra, but a session comes out of the same allowance your everyday chats do, and a long night at the table is a lot of chats. Muse Code without a subscription bills your Meta account per use.
Prepping a published adventure for AI
Install Familiar, activate your licence key, then paste a provider key or connect a plan you already pay for.
New to Familiar? I'm Ryan, the person who built it. The Discord is small and brand new, so if you join now I'll help you get set up myself.