Docs menu
Docs/AI agents

Connect Codex to Spritory

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

What you need

Full access to Spritory and the server URL https://spritory.com/api/mcp. You sign in to Spritory when your app asks, so there is no token to copy. See pricing for full access.

Add Spritory

bash
codex mcp add spritory --url https://spritory.com/api/mcp

Sign in

bash
codex mcp login spritory

Codex opens Spritory in your browser. Sign in and approve.

Or add it in the config file

Open ~/.codex/config.toml and add the lines below, then run the login command above.

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

The IDE extension and the Codex app

Both read the same config.toml. Once Spritory is there and signed in, they can use it too.

Use a personal token instead

Codex reads a token from an environment variable, so it never sits in a config file. Create a token on your Agents page, then add the server:

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

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

bash
export SPRITORY_TOKEN="spt_your_token"
Keep your token private

A token acts as your account. Do not commit it to a repository or paste it into shared chats. If one leaks, revoke it on your Agents page and create a new one.

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 what you can do. 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