8. AI Assistants

Card Game Builder (CGB) can let your AI assistant, such as Claude or ChatGPT, work on the project you have open. You can ask it things like:

  • “Add 20 location cards to the Location template, with names and descriptions that fit a haunted house.”
  • “Make a starter deck with two copies of every common card.”
  • “Take the duplicates out of my main deck.”
  • “Make the title on the Monster template bigger, and check the descriptions still fit.”
  • “Fix any spelling mistakes on my cards.”
  • “Read my rules and check they cover what happens when the deck runs out.”
  • “Add the character portraits in my Downloads folder to the project.”

The assistant can read everything in your project, and add cards, decks, rules, templates, output sheets and images.

It can also edit your:

  • Templates (background colour, and elements)
  • Cards (name, text, images and notes, and hiding/showing elements)
  • Decks (adding and removing cards, and how many copies of each)
  • Rules

Hint

AI assistants are part of Card Game Builder Pro.

How it works

Your AI assistant communicates with CGB using the Model Context Protocol (MCP), an open standard for connecting AI assistants to apps.

  • The assistant only connects while CGB is open, with a project open.
  • It connects over your own computer, not the internet. Other computers can’t reach it.
  • It needs an access token, which is included in the setup you copy from CGB.

You use your own Claude or ChatGPT account, which will consume tokens and potentially incur costs (likely to be minor for most projects).

Turning it on

Choose File > AI Assistants (MCP) > Allow AI Assistants to Connect.

The status line underneath shows whether it’s working. It should say Running on port 47821.

Connecting your assistant

Each assistant is set up differently, so CGB has a Copy Setup option for each one, under File > AI Assistants (MCP). You only need to do this once.

Claude Code

  1. Choose File > AI Assistants (MCP) > Copy Setup for Claude Code.
  2. Paste the command into a terminal and run it.
  3. Start Claude Code, and ask it about your project.

Claude Desktop

Claude Desktop needs Node.js installed to connect.

  1. Choose File > AI Assistants (MCP) > Copy Setup for Claude Desktop.

  2. In Claude Desktop, open Settings > Developer > Edit Config. This opens claude_desktop_config.json.

  3. Paste the setup inside the mcpServers section. If the file is empty, it should end up looking like this:

    {
        "mcpServers": {
            "card-game-builder": {
                "command": "npx",
                "args": [
                    "mcp-remote",
                    "http://127.0.0.1:47821/mcp",
                    "--header",
                    "Authorization: Bearer ..."
                ]
            }
        }
    }
  4. Restart Claude Desktop.

ChatGPT

This works with the ChatGPT desktop app, and with Codex. The ChatGPT website can’t connect to apps on your computer.

  1. Choose File > AI Assistants (MCP) > Copy Setup for ChatGPT / Codex.
  2. Paste it at the end of the config.toml file in the .codex folder in your home folder - ~/.codex/config.toml. Create the file if it doesn’t exist.
  3. Restart the ChatGPT desktop app or Codex.

What you’ll see

Whenever the assistant adds or changes something in your project, a notice appears in the bottom right corner of CGB, saying what it did.

When the assistant edits a template, CGB opens that template, on the side being changed, so you can see the edit happen. Each edit appears in the template’s history as one step, e.g. AI: Edit Elements. To undo it, choose Edit > Undo, or click an earlier step in the history.

Changes made by the assistant aren’t saved until you save the project. If you don’t like what it did, close the project without saving.

Seeing your cards

The assistant can take pictures of your cards, as they’ll look when printed, to check its work - for example, whether text fits its box, or whether elements overlap. It’s prompted to do this after editing a template, and you can also ask it to, e.g. “Show me the five cards with the most text and check nothing overflows.”

The pictures are only shared with the assistant - nothing is saved to your project. Your assistant needs to support images for this to work. Claude does.

Adding images

The assistant can add PNG and JPEG images from your computer to the project, up to 25 MB each. Tell it where the files are, e.g. “the charater images in my Downloads folder”, and it adds them to the project, ready to use on your templates and cards.

Privacy

When you ask an assistant about your project, the parts of the project it reads, and any pictures it takes of your cards, are sent to the company that runs the assistant (e.g. Anthropic or OpenAI), the same as anything else you share with it. Turn the setting off if you don’t want an assistant to have access.

Troubleshooting

  • The assistant says no project is open - open a project in CGB, then ask again.
  • The status says Port in use - another app is using the same port. Close it, or restart your computer, then turn the setting off and on again.
  • The status says Requires a Pro license - see Card Game Builder Pro.
  • It stopped working after copying the setup again - if you chose Regenerate Access Token..., the old token no longer works. Copy the setup again for each assistant you use.