pixelforge-mcp
Uses Google Gemini's AI models (such as nano-banana, flash, pro) to generate pixel art sprites, animations, backgrounds, and thumbnails based on textual descriptions, with options for style and reference matching.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pixelforge-mcp generate a green slime enemy sprite, 48px, retro"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pixelforge-mcp
MCP server that forges pixel art sprites & game assets using Google Gemini — generate, crop, split & process, all from your AI assistant.
Features
AI-powered generation — sprites, animations, backgrounds, thumbnails, tilesets and item kits via Google Gemini
Smart post-processing — background removal, auto-crop, pixelation downscale, square padding
Chroma key transparency —
background: "chromakey"generates on pure green and keys it out in HSV space for clean edgesSprite sheet splitting — auto-detect and split sheets into individual frames
Style presets — neon, retro, gameboy, snes, clean
Pure PNG pipeline — zero-dependency PNG encoder/decoder, no native modules
Reference matching — pass existing sprites to match visual style
Related MCP server: PixelLabRat
Installation
Claude Code (CLI)
claude mcp add pixelforge npx pixelforge-mcp@latest \
--env GEMINI_API_KEY=your-api-keyClaude Code (Plugin)
/plugin marketplace add freema/pixelforge-mcp
/plugin install pixelforge-mcpRestart Claude Code to load the MCP server (check with /mcp).
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pixelforge": {
"command": "npx",
"args": ["-y", "pixelforge-mcp@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}Manual (any MCP client)
Add to your .mcp.json or equivalent config:
{
"mcpServers": {
"pixelforge": {
"command": "npx",
"args": ["-y", "pixelforge-mcp@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}Requirements
Node.js >= 20
Tools
forge_sprite
Generate a single pixel art sprite with automatic post-processing (crop, bg removal, downscale, square padding).
"Generate a green slime enemy sprite, 48px, retro style"Required: description, outputPath
Optional: size (default: 48), style, background (default: black, see Backgrounds & transparency), aspect, square, model, references
forge_animation
Generate animation frames as individual, ready-to-use frame PNGs.
By default each frame is generated in its own request, with the first frame passed as a reference image to the following ones (reference chain) — this keeps proportions, colors and outline consistent across frames. Set useReferenceChain: false to generate a single sprite sheet and auto-split it instead. useTemplate: true does the same and additionally guides the sheet with a numbered grid template.
"Animate a slime bouncing, 4 frames"Required: description, action, outputPrefix
Optional: frames (default: 3), frameDescriptions, names, size, style, background (default: black, see Backgrounds & transparency), square, useReferenceChain (default: true), useTemplate (default: false), model, references
forge_background
Generate a full game background — no cropping, outputs the image as-is.
"Deep space background with stars and nebula, 16:9"Required: description, outputPath, aspect
Optional: style, model
forge_thumbnail
Generate a game thumbnail/screenshot. Pass references for visual consistency with your sprites.
"Space shooter scene with player ship vs alien rows"Required: description, outputPath
Optional: references, aspect (default: 4:3), style, model
forge_tileset
Generate a seamless, tileable square texture for terrain, floors and walls. No background removal — the texture fills the whole canvas.
"Seamless grass terrain tile, 32px, snes style"Required: description, outputPath
Optional: size (default: 32), style, model
forge_item_kit
Generate up to 16 related sprites in one batch. Items are drawn together on a grid for visual consistency, then split into individual PNGs.
"Fruit icons: red apple, banana, cherry, grapes"Required: items, outputPrefix
Optional: names, size (default: 48), style, background, square, model, references
process_sprite
Post-process an existing PNG — background removal, auto-crop, sprite sheet splitting.
"Split this sprite sheet into individual frames"Required: inputPath
Optional: outputPath, split, names, threshold, square, padding, skipCrop, skipTransparent
optimize_sprite
Downscale oversized AI images to true pixel art resolution using area-averaging (not blurry bilinear).
"Optimize this 1024px image down to 48px pixel art"Required: inputPath, size
Optional: outputPath, removeBackground, square
Backgrounds & transparency
Sprites are generated on a flat background color that is removed afterwards. The background parameter picks that color:
Value | Background | Removal |
| Pure green | HSV chroma key — recommended for |
| Pure black / white | Soft alpha matting against the background color |
| Scene-tinted solid color | Soft alpha matting against the background color |
| Picked from keywords in the description (falls back to | Soft alpha matting against the background color |
Chroma key (background: "chromakey") asks the model for a pure green screen and a bold dark outline around the sprite, then removes every pixel whose hue is within ±22° of green (with saturation and value above 0.3). Pixels just outside that range get a soft alpha ramp, so edges stay clean. Unlike the black or white backgrounds, it cannot eat dark or light pixels that belong to the sprite itself.
"Generate a knight sprite, 64px, background chromakey"Avoid chromakey for sprites that are themselves bright green (slimes, leaves, emeralds) — those pixels would be keyed out as well. Use black, white or a scene color for them.
chromakey is never chosen by auto; it has to be requested explicitly. The HSV keyer runs in forge_sprite and forge_animation; forge_item_kit accepts the same background values but always uses the regular matting.
Models
Alias | Model ID | Notes |
| nano-banana-pro-preview | Default — best for pixel art |
| gemini-3.1-flash-image-preview | Fast, reliable |
| gemini-3-pro-image-preview | Best quality |
| gemini-2.5-flash-image | Stable fallback |
Prompts
pixel_art_guide
Built-in MCP prompt with comprehensive pixel art generation guidelines — prompting rules, style tips, size recommendations, and best practices.
License
MIT — see LICENSE
Built by Tomas Grasl
Available Tools
8 toolsforge_animationA
Generate pixel art animation frames. Produces a sprite sheet via Gemini, then automatically splits it into individual frame PNGs with background removal and cropping. Returns an array of ready-to-use frame files.
Inputs: action (required), description (required), outputPrefix (required), size, +10 more.
forge_backgroundA
Generate a pixel art game background. No post-processing — outputs the full image as-is, ready for use as a game scene background. Use appropriate aspect ratio for your game resolution.
Inputs: aspect (required), outputPath (required), description (required), model, +1 more.
forge_item_kitA
Generate multiple pixel art sprites in a single batch. Items are generated together on a grid for visual consistency, then split into individual PNGs. Ideal for item sets, inventory icons, collectibles, or any group of related sprites.
Inputs: items (required), outputPrefix (required), size, model, +5 more.
forge_spriteA
Generate a single pixel art sprite. Handles prompt engineering, generation via Gemini, and post-processing (crop, background removal, pixelation downscale, square padding) automatically. Returns a clean, transparent PNG at proper pixel art resolution. Output size snaps to standard pixel art sizes (16, 24, 32, 48, 64, 96, 128).
Inputs: outputPath (required), description (required), size, model, +5 more.
forge_thumbnailA
Generate a pixel art game thumbnail/screenshot. Use reference images to match the visual style of actual in-game sprites. Best for store listings, game cards, and preview images.
Inputs: outputPath (required), description (required), model, style, +2 more.
forge_tilesetA
Generate a seamless tileable pixel art texture. Produces a square texture that tiles seamlessly in all directions — ideal for terrain, floors, walls, and backgrounds. No background removal is applied; the texture fills the entire canvas.
Inputs: outputPath (required), description (required), size, model, +1 more.
optimize_spriteA
Optimize an existing sprite PNG for pixel art games. Downscales large AI-generated sprites to proper pixel art resolution using area-averaging (not blurry bilinear). Also optionally removes background and crops. Use this to convert oversized "pixel art style" images into true pixel art at game-ready sizes.
Inputs: size (required), inputPath (required), square, outputPath, +1 more.
process_spriteA
Post-process an existing PNG image into a clean sprite. Handles background removal, auto-crop, square padding, and sprite sheet splitting. Use this for images from external sources that need processing.
Inputs: inputPath (required), names, split, square, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each generation tool targets a distinct output type (sprite, animation, background, thumbnail, tileset, item kit), and the processing tools have clear primary functions. However, process_sprite and optimize_sprite both handle background removal and cropping, which could lead to some initial confusion about which to choose.
Most generation tools follow a consistent 'forge_<output>' pattern, but the two processing tools break this pattern with 'process_' and 'optimize_' prefixes. This creates two distinct naming conventions within the same server, which is readable but not fully uniform.
With 8 tools, the server is well-scoped for pixel art creation and processing. Each tool has a clear purpose and covers a needed capability without unnecessary redundancy or bloat.
The tool set covers the full lifecycle of pixel art assets: generating sprites, animations, backgrounds, thumbnails, tilesets, and item kits, plus processing and optimizing external images. There are no obvious missing operations for this domain.
Maintenance
Related MCP Connectors
MCP server for Flux AI image generation
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Zixel MCP server: generate AI images and videos (Nano Banana, GPT Image, Seedance) via Zixel API.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for Aseprite — create, edit, and export pixel art sprites, animations, and sprite sheets from any AI assistant.438MIT
- AlicenseNot gradedqualityFmaintenanceMCP server for generating style-consistent pixel art assets from PixelLab API, with project management, asset review, and an embedded Claude assistant.MIT
- AlicenseBqualityBmaintenanceAn MCP server that connects AI assistants to the PixelLab pixel art generation API. Generate sprites, tilesets, characters, animations, and more directly from Claude, Cursor, or any MCP-compatible client.10343 npm2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for generating pixel-art sprites with transparent backgrounds using any diffusers-compatible text-to-image model.MIT