API & MCP

MCP Server

Use PixelZ from Claude Code, Codex, Cursor or any MCP client: generate pixel art, pixelize images, remove backgrounds, create effects and animate sprites.

Connect an AI agent to PixelZ over MCP. Claude Code, Codex, Cursor, VS Code or any other MCP client can then generate pixel art, pixelize images, remove backgrounds, create effects and animate sprites for you, on your plan's credits.

Available on paid plans. The REST API uses the same keys and credits.

1. Create a key

Create a key in Settings → API & MCP. It starts with pz_ and is shown once, so copy it right away. You can have up to 5 keys and revoke any of them.

2. Connect your agent

Put your key in place of YOUR_API_KEY. Settings shows the same snippets with a new key already filled in.

Claude Code

Run in your terminal:

claude mcp add --transport http pixelz https://api.pixelz.io/mcp --header "Authorization: Bearer YOUR_API_KEY"

Codex

Add to ~/.codex/config.toml:

[mcp_servers.pixelz]
url = "https://api.pixelz.io/mcp"
http_headers = { "Authorization" = "Bearer YOUR_API_KEY" }

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "pixelz": {
      "url": "https://api.pixelz.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

VS Code

Run “MCP: Open User Configuration” and add:

{
  "servers": {
    "pixelz": {
      "type": "http",
      "url": "https://api.pixelz.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Claude Desktop

Claude Desktop connects through mcp-remote, a local bridge that needs Node.js. Add this to claude_desktop_config.json (Settings → Developer → Edit Config) and restart the app:

{
  "mcpServers": {
    "pixelz": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.pixelz.io/mcp", "--header", "Authorization:${PIXELZ_AUTH}"],
      "env": { "PIXELZ_AUTH": "Bearer YOUR_API_KEY" }
    }
  }
}

Other clients

Any client that supports Streamable HTTP works. Point it at https://api.pixelz.io/mcp and send the header Authorization: Bearer YOUR_API_KEY.

Tip: To keep the key out of config files, store it in an environment variable and reference it. Claude Code and its .mcp.json read ${PIXELZ_API_KEY}, Cursor reads ${env:PIXELZ_API_KEY}, and Codex takes bearer_token_env_var = "PIXELZ_API_KEY" instead of http_headers. A project's config can then be committed and every teammate uses their own key.

Claude Code, key from the environment (keep the single quotes)

claude mcp add --transport http pixelz https://api.pixelz.io/mcp --header 'Authorization: Bearer ${PIXELZ_API_KEY}'

3. Try it

Ask your agent in plain words:

  • “Generate a 64 px knight with a blue cape, side view, and save it to ./sprites/knight.png.”
  • “Pixelize ./concept/tree.png with 16 colours and a transparent background.”
  • “Animate ./sprites/knight.png walking to the right.”
  • “Make a looping blue magic shield effect, 48×48, and save the strip to ./assets/fx.”

Tools

ToolWhat it doesCredits
generate_imagePixel art from a prompt, 16–512 px, on a transparent background by default. Saved to your Assets.fast 2, standard 4, pro 8
pixelize_imageSnaps an image to its true pixel grid and reduces the palette. Can remove the background.free
remove_backgroundMakes the background transparent.free
create_effectAn animated pixel effect (explosion, spark, magic, smoke…) from a description, as a sprite strip and a GIF.about 4
animate_spriteAnimates a sprite up to 256×256: walk, run, attack, idle…8
upload_imageSends a file from your disk to the other tools.free
get_jobThe status and result of a job.free
get_creditsCredits left this month.free

Results come back as download URLs. A result can go straight into the next tool: generate a sprite, then animate it.

Images

  • Point the agent at a public https URL or at a file on your disk. It uploads a file with upload_image; uploads are kept for 60 minutes.
  • PNG or JPEG, up to 2 MB and 1024×1024 pixels.

Jobs

generate_image and animate_sprite take a minute or more, so they return a job. The agent checks it with get_job until it is done; there is nothing for you to do.

Credits and limits

  • Tools charge your plan's credits at the same prices as the app. A call that fails is refunded.
  • An effect is billed by what the model used, about 4 credits. You need 14 available to start one.
  • 60 requests a minute per account, 4 calls and 10 jobs running at once, and 1000 calls of the free tools a day.
  • Results are deleted after 30 days. Generated images and animations stay in your Assets; pixelized and cut-out images do too when you ask the agent to save them there.
  • Nothing is published to the gallery unless you publish it.

Keep your key safe

  • A key spends your credits. Treat it like a password and don't commit it.
  • If a key leaks, revoke it in Settings and create a new one.