Skip to main content
Glama

Palette Swapper MCP Lite

Free MCP server that lets your AI coding agent (Claude Code, Cursor, Codex, Claude Desktop, Windsurf, any MCP client) look at and recolour pixel-art sprites: real PNG files on your disk, no image editor required.

Every tool that reads an image returns an upscaled preview, so the agent can actually see the sprite and check its own work.

  • One file: palette-swapper-mcp-lite.mjs. Node.js 18+. No npm install, no API key, no network.

  • Runs locally on your files. It never overwrites a file unless you pass overwrite: true.

  • Reads every PNG flavour (RGBA, RGB, greyscale, indexed, 1–16 bit, interlaced).

Tools

Tool

What it does

inspect_sprite

Size, exact palette (hex + pixel counts), % transparent, preview image

swap_colors

Replace exact colours in one PNG or a whole folder of frames ({"#3aa048": "#b13e53"})

scale_sprite

Crisp nearest-neighbour upscale (×2…×16) or integer downscale

export_palette

Save a sprite's palette as .gpl (Aseprite/GIMP/Krita), .hex or .png strip

Related MCP server: pixel-workshop

Install

curl -O https://atelier10e.github.io/agents-web/agent-a/palette-swapper-mcp/palette-swapper-mcp-lite.mjs

Claude Code (run it from your game project):

claude mcp add palette-swapper-lite -- node /absolute/path/to/palette-swapper-mcp-lite.mjs

Cursor (.cursor/mcp.json) / Claude Desktop (claude_desktop_config.json):

{ "mcpServers": { "palette-swapper-lite": { "command": "node", "args": ["/absolute/path/to/palette-swapper-mcp-lite.mjs"] } } }

Codex CLI (~/.codex/config.toml):

[mcp_servers.palette-swapper-lite]
command = "node"
args = ["/absolute/path/to/palette-swapper-mcp-lite.mjs"]

Then try: "Inspect example/slime.png, recolour the green to red, and upscale it ×8."

Need more? Palette Swapper MCP (full version)

One prompt: 5 colour variants packed into a sheet with a Phaser atlas

The full version adds 5 tools: make_variants (many colour variants at once, hue shifts that keep shading, recolour only some colours), apply_palette (snap any image to a Lospec/.gpl/.hex palette, perceptual OKLab matching), add_outline, slice_sheet and pack_sheet (sprite sheet + Phaser JSON atlas + Godot hframes/vframes). 4 € on itch.io: https://atelier-10e.itch.io/palette-swapper-mcp · details: https://atelier10e.github.io/agents-web/agent-a/palette-swapper-mcp/

About

Made by Atelier 10e. Issues and pull requests are welcome.

The PNG decoder was compared pixel by pixel with Pillow on 10 PNG variants (0 differing pixels). The example slime sprite is original and free to use.

MIT licence.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      A local stdio MCP server that lets agents describe, render, inspect, and preview procedural 2D pixel-art skill effects and baked sprite animations entirely offline. It reads supplied local PNG/JSON projects and writes transparent sprite sheets, playback JSON, and image previews to a chosen local directory.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      An MCP server that turns images generated in a logged-in ChatGPT web session into consistent, game-ready assets: it composes style-bible prompts, ingests browser downloads, removes backgrounds, pixelates to a true grid, outlines, slices grid sheets into cells, and packs uniform sprite sheets with JSON atlases and GIF previews. Everything runs locally in pure JavaScript with no API key or native dependencies.
      12
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to create layered pixel-art sprites and animations, inspect pixels, and export images, spritesheets, GIFs, APNGs, and TrueType pixel fonts. Documents and edits stay local, accessible over stdio MCP or callable directly from a shell.
      47
      MIT