Overview
The SpriteLab MCP server exposes every generation mode as tools for Claude Code, Cursor, Claude Desktop, Windsurf and any other MCP client — generate pixel art without leaving your editor or agent.
Same key, same billing
The MCP server sits on top of the REST API: your sl_live_… key, top-up credits only, automatic refunds on failure, and every mode open to any key.
Setup
Endpoint: https://spritelab.dev/mcp (streamable HTTP).
Claude Code
claude mcp add --transport http spritelab https://spritelab.dev/mcp \
--header "Authorization: Bearer sl_live_YOUR_KEY"Cursor / Windsurf / generic
{
"mcpServers": {
"spritelab": {
"url": "https://spritelab.dev/mcp",
"headers": { "Authorization": "Bearer sl_live_YOUR_KEY" }
}
}
}claude.ai web connectors need OAuth, which we don't support yet; use the key-header clients above.
Tools
Fifteen tools, one per generation mode plus the free iteration and probe calls. Costs are identical to the REST API, and every mode is open to any key.
| Tool | Cost | What it does |
|---|---|---|
generate_sprite | 1 / 6 CR | Text to sprite: transparent bg, clean palette, 1px outline |
generate_sprite_pack | 2 / 9 CR | A whole grid of sprites in one call, split into individual PNGs. Cheapest per sprite |
generate_rotation | 4 / 12 · 8-dir 6 / 16 CR | Rotation sheet for characters & mobs: frames + spritesheet + GIF. directions=4 (front/right/back/left) or 8 (adds diagonals) |
resize_sprite | Free | Re-render any generated sprite at a new size or tuning. The iteration loop |
convert_image | 3 CR | Any image to faithful pixel art |
micro_sprite | 3 / 10 CR | Exact-size 16-64px sprites on a true pixel grid |
reskin_sprite | 2 / 6 CR / variant | Themed variants of an existing sprite, identical dimensions |
merge_sprites | 2 / 6 CR / variant | Add a donor item onto a base sprite — armor, gear, anything |
edit_sprite | 2 / 6 CR / variant | EDIT from a prompt and optional painted region. Failed and unchanged variants are refunded |
generate_background | 4 / 15 CR | Full-frame scene art up to 8K |
generate_tileset | 10 / 30 CR | Autotiling tileset + drop-in Godot 4 & Tiled files |
animate_sprite | 20 / 30 CR | Submit an animation job (async): Standard / Pro |
check_animation_job | Free | Poll an animation job; returns spritesheet + GIF URLs when done |
get_credits | Free | Balance + tier |
enhance_prompt | Free | Rewrite a rough subject into a stronger sprite prompt |
edit_sprite accepts image (PNG base64, data URL or a SpriteLab sprite download URL), prompt (1 to 500 characters), optional region (PNG base64 mask), variants (1 to 4, default 1), quality (epic or mythic) and keep_silhouette (default true). Results are inline only, under 96KB of base64 per image. EDIT has no saved sprite id or download URL, so larger images are omitted; use POST /api/v1/edit for those. Chained edits are coming.
Saving results to disk
Tool results are deliberately compact: a small JSON summary, a preview image when it's tiny, and a download_url. Your agent saves the real asset with the same key:
curl -H "Authorization: Bearer sl_live_YOUR_KEY" \
"https://spritelab.dev/api/v1/sprites/SPRITE_ID/download" \
--output assets/sprites/knight.pngSo prompts like this just work in Claude Code:
> generate a 64px armoured knight sprite and save it to
assets/sprites/knight.png, then make ice and lava variants
of it in the same folder
Notes for agents
- For a coherent set, generate the hero first and pass its sprite_id as
style_reference_idon latergenerate_spritecalls: palette and proportions match automatically. - Prefer
epicquality unless the user asks for better; it's a sixth of the cost and usually enough. - Iterate with
resize_sprite(free), not by regenerating. animate_spriteacceptsengine: "standard"(default, 20 CR, up to 256px, even frames 2–16) or"pro"(30 CR, up to 320px, any integer frames 3–16). Inputs over 256 on either axis that fit 320x320 automatically use Pro at 30 CR; above 320 returns 400. Explicit Pro stays Pro for smaller inputs. Both engines require aspect 1:2 to 2:1. It returns immediately; pollcheck_animation_jobevery 4-5 seconds, typical total 60-120s.- Every result reports
credits_remaining; failed generations refund automatically. - Rate limit: 60 requests per minute per key, shared with the REST API.
Billing
Identical to the REST API: top-up (purchased) credits only, the monthly subscription bucket is never touched, and every mode is available without a plan. Full cost table lives in the API billing section. Keys are created in the app under Account → API keys.