Your AI agent makes the assets
Connect Claude Code, Codex, Cursor or any MCP client to SpriteHatch. Describe what the game needs in your own words: the agent creates characters, animations, effects, items, UI, scenes and tilesets, shows you the result and writes the files straight into your game project.
MCP (Model Context Protocol) is an open standard that lets AI agents use outside tools. The SpriteHatch MCP server gives your agent everything the app does, plus the knowledge of which path fits each need, so it does not waste your credits on the wrong kind of asset.
- Works with any MCP client: Claude Code, Claude Desktop, Codex, Cursor, VS Code (Copilot), Windsurf and others.
- Uses the same credits, projects and assets as the app: whatever the agent creates shows up in your library, and vice versa.
- Available on the Pro and Studio plans, with an API key.
What your agent can do
| You ask for | The agent |
|---|---|
| A hero, NPC or monster, from a description or from your art | Creates candidates, shows them side by side and keeps the one you choose |
| Another outfit, color, armor or elite version | Makes a skin of the same character (same shape and pose), not a new one |
| Idle, walk, run, jump, attack, hurt, death or any specific move | Animates it, reviews it for free and shows you the frames |
| A power: "the dragon breathes fire at the player" | Animates the charge with the effect on the body and creates what flies to the target (projectile, impact, effect on the enemy) as separate effects the game moves |
| Explosion, hit spark, aura, heal, portal, torch fire | Creates the effect and checks it for frames cut by the edge or empty frames |
| Inventory icons, weapons, potions, props | Creates the item, or extracts the exact object your character holds |
| Buttons, bars, panels, slots | Creates the piece and its hover, pressed and disabled states |
| A level background or a top-down map | Creates a seamless scene with parallax layers, or an auto-tile tileset with a Tiled map |
| "Put it in the game" | Exports for your engine, writes the files into the project and uses the manifest (frame size, pivot, fps, timings) to write the code |
The right path every time
The server tells the agent, from the first message, how SpriteHatch works best. It also has a free planner the agent calls when it is unsure.
- Effects on the body stay in the animation; what flies becomes a separate effect. A charge-up glowing over the character is drawn into its animation, ending at the release pose. The bolt, the impact and the effect on the enemy are separate effects in the same colors, so your game controls where they go and when they hit.
- Variants are skins. A recolor or a new armor keeps the same character, instead of generating a different one.
- It asks what is yours to decide. If you did not say the quality, the art style or the image engine, the agent asks you, showing the cost of each option.
- It shows the plan before paying. For a custom animation the agent sees exactly what will be generated (the motion, how it ends, whether the effect is drawn in) and fixes it before spending credits.
- It looks at the result. Previews come back as images, animations are judged for free, and effects are checked for frames cut by the edge.
Your credits under control
- Session budget: each session can spend up to a limit you set (300 credits by default).
- Your approval above a limit: after 60 credits (configurable) without your OK, the agent has to ask you. The count adds up every request since your last approval, so splitting a big request into small ones does not get around it.
- No loops: the agent improves a result at most once on its own, then shows it to you. A request that fails twice is not retried.
- Refunds: a generation that fails gives the credits back automatically, to your balance and to the session budget.
- Nothing is lost: every version is kept; the agent switches which one is used without deleting the others.
Before you start
- Have the Pro or Studio plan.
- Create an API key in the app: avatar → My account and statement → API keys. Copy it now; it is shown in full only once.
- For the local server, install
uv(it runsuvx):curl -LsSf https://astral.sh/uv/install.sh | shon macOS/Linux, orwinget install astral-sh.uvon Windows. The hosted server needs nothing.
Local or hosted
| Local (recommended) | Hosted | |
|---|---|---|
| Install | uvx spritehatch-mcp, started by your agent | Nothing: just the address and your key |
| Exported files | Written straight into your game project | Download link valid for 30 minutes |
| Reference images | File path, link or base64 | Public link or base64 |
| Best for | Coding agents working inside your game's folder | Chat apps and machines where you cannot install anything |
Install in your agent
Replace sg_live_... with your key. After installing, open a new session of your agent so it loads the tools.
Claude Code
claude mcp add --scope user spritehatch \ -e SPRITEHATCH_API_KEY=sg_live_... \ -- uvx spritehatch-mcp
claude mcp add --scope user --transport http spritehatch {{ORIGIN}}/mcp \
--header "Authorization: Bearer sg_live_..."
--scope user makes it available in every folder; drop it to install only in the current project. Check with claude mcp list.
Codex
In ~/.codex/config.toml:
[mcp_servers.spritehatch] command = "uvx" args = ["spritehatch-mcp"] tool_timeout_sec = 300 [mcp_servers.spritehatch.env] SPRITEHATCH_API_KEY = "sg_live_..."
# export SG_KEY=sg_live_... in your shell
[mcp_servers.spritehatch]
url = "{{ORIGIN}}/mcp"
bearer_token_env_var = "SG_KEY"
tool_timeout_sec = 300
tool_timeout_sec lets the agent wait for longer generations (premium animations take a few minutes).
Cursor
In ~/.cursor/mcp.json (every project) or .cursor/mcp.json (this project):
{
"mcpServers": {
"spritehatch": {
"command": "uvx",
"args": ["spritehatch-mcp"],
"env": { "SPRITEHATCH_API_KEY": "sg_live_..." }
}
}
}
{
"mcpServers": {
"spritehatch": {
"url": "{{ORIGIN}}/mcp",
"headers": { "Authorization": "Bearer sg_live_..." }
}
}
}
VS Code (GitHub Copilot)
In .vscode/mcp.json:
{
"servers": {
"spritehatch": {
"type": "stdio",
"command": "uvx",
"args": ["spritehatch-mcp"],
"env": { "SPRITEHATCH_API_KEY": "sg_live_..." }
}
}
}
{
"servers": {
"spritehatch": {
"type": "http",
"url": "{{ORIGIN}}/mcp",
"headers": { "Authorization": "Bearer sg_live_..." }
}
}
}
Windsurf
In ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"spritehatch": {
"command": "uvx",
"args": ["spritehatch-mcp"],
"env": { "SPRITEHATCH_API_KEY": "sg_live_..." }
}
}
}
{
"mcpServers": {
"spritehatch": {
"serverUrl": "{{ORIGIN}}/mcp",
"headers": { "Authorization": "Bearer sg_live_..." }
}
}
}
Claude Desktop and other clients
Most clients use the same format: a command for the local server (uvx spritehatch-mcp with SPRITEHATCH_API_KEY in the environment) or an address for the hosted one ({{ORIGIN}}/mcp with the Authorization: Bearer header). In Claude Desktop, the local server goes in claude_desktop_config.json under mcpServers, like the Cursor example.
Settings
Local server: environment variables. Hosted server: request headers.
| Local | Hosted | Default | What it does |
|---|---|---|---|
SPRITEHATCH_API_KEY | Authorization: Bearer | — | Your API key (required). |
SPRITEHATCH_BUDGET | X-SpriteHatch-Budget | 300 | Credits a session can spend in total. |
SPRITEHATCH_CONFIRM_ABOVE | X-SpriteHatch-Confirm-Above | 60 | Credits spent without your approval before the agent must ask. 0 = always ask. |
SPRITEHATCH_EXPORT_DIR | — | spritehatch-assets | Folder for exports when the agent does not choose one. |
First requests
Talk to the agent as you would to an artist on the team. A few examples:
- "Create a pixel-art knight hero for my platformer, 64 px tall. Show me two options."
- "Give the knight idle, walk, jump, attack, hurt and death animations in premium quality and put them in the game."
- "The dragon needs an attack: it charges fire in its mouth and shoots a fireball that explodes on the player."
- "Make a golden armor version of the knight for the shop."
- "Pause button with hover and pressed states, and a health bar, matching the knight's style."
- "A forest background with parallax for the first level."
The agent works inside a SpriteHatch project. The project's style kit (pixel art, character height, 2, 4 or 8 directions, palette) keeps every asset of the game consistent, so tell it the kind of game on the first request.
Every project, asset, skin, ability, animation and job has an id. The agent names things with their id and a link to the panel; in the panel the same id sits next to each item (click to copy), and the sidebar search opens anything the agent mentions by id.
Into the game
Exports come with a manifest the agent reads to write the code: the frame size and the foot pivot, every clip with its frames, fps and loop, the release frame and emitter point of attacks, and the blend mode and pivot of each effect. The same formats as the app: Godot 4, Unity, GameMaker, RPG Maker, atlas JSON (Phaser, PixiJS and others), strips, single frames and GIFs.
Tools
You do not need to call them yourself; this is what the agent sees.
| Need | Tools |
|---|---|
| Plan (5 credits) | spritehatch_guide, plan_animation |
| Account and projects | get_account, list_projects, setup_project |
| What already exists | list_assets, get_asset, get_preview |
| Characters and monsters | create_character, choose_candidate, add_skin, add_directions |
| Animation | generate_animation, review_animation, improve_animation |
| Attacks and effects | create_vfx, improve_vfx, create_ability |
| Items, UI, scenes, tilesets | create_item, create_ui, add_ui_states, create_scene, add_parallax_layers, create_tileset |
| Fix and choose | edit_asset, apply_edit, use_version |
| Wait and deliver | wait_for_jobs, export_asset |
Troubleshooting
The agent says the key is invalid or the plan has no API
Check that the key was copied in full (it starts with sg_live_) and was not deleted, and that your plan is Pro or Studio.
The tools do not show up
Open a new session of the agent after installing. For the local server, check that uvx works in a terminal (uvx --version).
The agent stopped and asked me to approve
That is the approval limit working: the credits spent since your last OK passed the limit. Say yes and it continues, or change SPRITEHATCH_CONFIRM_ABOVE.
"Session budget reached"
The session spent its budget. Raise SPRITEHATCH_BUDGET (or the header) and open a new session; the agent cannot raise it by itself.
Generation takes long or the agent times out
Generations keep running on SpriteHatch even if the agent stops waiting; ask it to wait for the jobs again. In Codex, raise tool_timeout_sec.
Where do my assets go?
To your SpriteHatch library, in the project the agent used, just like the ones you make in the app. The local server also writes the exports into your game folder.