Connect Spritory to OpenCode, the open source coding agent, and have it build pixel art game assets for you in your own style.
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.
Add Spritory to your config
Open opencode.json in your project, or your global config at ~/.config/opencode/opencode.json, and add Spritory under mcp. This example reads the token from an environment variable so it stays out of the file:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"spritory": {
"type": "remote",
"url": "https://spritory.com/api/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer {env:SPRITORY_TOKEN}"
}
}
}
}Set your token
Add this to your shell profile, such as ~/.zshrc or ~/.bashrc, and open a new terminal:
export SPRITORY_TOKEN="spt_your_token"Good to know
- Project or global. A project
opencode.jsonapplies only there. The global file applies to every project, which suits a tool like Spritory that you use across games. - Turn it off without removing it. Set
enabledtofalseto keep the entry but hide Spritory from your agent.
Check the connection
opencode mcp listSpritory should be listed. Start a new session so OpenCode loads it.
Next steps
Ask your agent to make something in Spritory. For ideas, see prompt ideas. If something goes wrong, see troubleshooting.