Docs menu
Docs/AI agents

Connect ChatGPT and Codex to Spritory

Connect Spritory to ChatGPT and Codex, OpenAI's coding agent, and ask for pixel art sprites and effects that match your game. One setup covers the ChatGPT desktop app, the Codex CLI and the Codex IDE extension, because they share the same settings file.

What you need

A Spritory token and the server address https://spritory.com/api/mcp. See how to connect to create a token. Below, replace spt_your_token with yours.

Set up with the Codex CLI

Codex reads your token from an environment variable, so it never sits in a config file. First add the server:

bash
codex mcp add spritory --url https://spritory.com/api/mcp --bearer-token-env-var SPRITORY_TOKEN

Then set the variable in your shell profile, such as ~/.zshrc or ~/.bashrc, and open a new terminal:

bash
export SPRITORY_TOKEN="spt_your_token"

Set up in the config file

You can also add the server by hand. Open ~/.codex/config.toml and add:

~/.codex/config.toml
[mcp_servers.spritory]
url = "https://spritory.com/api/mcp"
bearer_token_env_var = "SPRITORY_TOKEN"

Set the environment variable as shown above.

Set up in the ChatGPT desktop app

  1. Open Settings, then MCP servers.
  2. Click Add server, name it spritory, and choose Streamable HTTP.
  3. Enter https://spritory.com/api/mcp as the URL.
  4. Save, then click Restart.

The desktop app reads the same config.toml. If the form has no field for the token, add the server with the Codex CLI or the config file instead, and it will show up in the app too.

The IDE extension

The Codex extension for VS Code and other editors uses the same settings. Once Spritory is in config.toml, the extension can use it.

ChatGPT on the web

ChatGPT in the browser only reaches MCP servers through installed plugins, so this setup does not apply there. Use the desktop app, the Codex CLI or the IDE extension.

Check the connection

bash
codex mcp list

Spritory should appear in the list. Start a new Codex session so it picks up the change.

Next steps

Ask your agent to make something in Spritory. For ideas, see prompt ideas. If something goes wrong, see troubleshooting.

Try it in the Forge

Open the editor for free and build along with this page.

Open the Forge