Imagen
Click on "Install 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., "@ImagenGenerate a pixel-art sprite of a wizard with a magic staff"
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.
Imagen
MCP server for generating pixel-art sprites with transparent backgrounds. Bring your own model — any diffusers-compatible text-to-image pipeline works.
The default configuration uses FLUX.2-klein-4B + pixel-art-lora, but you can swap in any model you like.
Features
Bring your own model — any diffusers-compatible pipeline (FLUX, SDXL, SD3, etc.)
Text-to-sprite generation — describe any character, get a pixel-art PNG
Transparent background — automatic background removal via flood-fill
Pixel-art effect — downscale/upscale with NEAREST interpolation
Reproducible — optional seed for consistent results
Batch generation — generate multiple sprites in one call
MCP integration — works with any MCP-compatible client (opencode, Claude, etc.)
Cloud image models — Polza.ai Media API, including image references and multi-image variations
Feedback loop — rate generated sprites, AI uses high-rated ones as reference
Related MCP server: aseprite-mcp
Quick Start
1. Install dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt2. Download a model
You need a base text-to-image model. Optionally, a LoRA adapter for pixel-art style.
Example: FLUX.2-klein-4B + pixel-art-lora (default)
mkdir -p ~/models
# Base model (~23 GB)
huggingface-cli download black-forest-labs/FLUX.2-klein-4b \
--local-dir ~/models/flux2-klein-4b
# LoRA adapter (~625 MB) — optional but recommended for pixel-art
huggingface-cli download Limbicnation/pixel-art-lora \
--local-dir ~/models/pixel-art-loraOther models that work:
Model | Size | LoRA support | Notes |
~23 GB | Yes | Default, distilled (4 steps) | |
~23 GB | Yes | More detail, slower (20+ steps) | |
~7 GB | Yes | Lighter, good for 8 GB VRAM | |
~16 GB | Yes | Good quality/speed balance |
Note: You may need to adjust
LORA_SCALEand pipeline class inserver.pydepending on your model. See Configuration.
3. Configure paths
By default, models are expected at ~/models/. Override with environment variables:
export IMAGEGEN_MODEL_DIR=/path/to/your/base-model
export IMAGEGEN_LORA_DIR=/path/to/your/lora # optional, set empty to disable
export IMAGEGEN_OUTPUT_DIR=/path/to/outputCloud generation with Polza.ai
No local GPU or model download is required when using the polza provider. Create
an API key in Polza.ai and expose it only to the MCP server process. The server
also loads a local .env file automatically; create it from the safe template:
cp .env.example .env
# Edit .env and set POLZA_API_KEY=your_key
# Or provide variables directly when starting the MCP server:
export POLZA_API_KEY=your_key
# Optional default; pass model per tool call to override it.
export POLZA_IMAGE_MODEL=openai/gpt-image-1.5Use generate_sprite with provider="polza" for one image, or
generate_images for up to ten coherent variations in one API request. Both
accept reference_images: HTTPS URLs, data URIs, or local files. References are
sent to the provider so an LLM can retain a game's palette, outline treatment,
proportions, and character style across new sprites.
{
"prompt": "a forest ranger facing left, idle game sprite",
"output_path": "rangers/idle.png",
"count": 4,
"model": "openai/gpt-image-1.5",
"reference_images": ["/assets/style-guide.png", "https://example.com/hero.png"],
"aspect_ratio": "1:1",
"remove_bg": true,
"pixel_size": 4
}Set wait=false for a long-running generation and query its returned ID using
get_generation_status.
Native pixel art with PixelLab
Set PIXELLAB_API_KEY in .env and pass provider="pixellab". PixelLab is
specialised in game-ready pixel art; with reference_images it uses up to four
style references and generates style-consistent sprites. generate_images will
create one background job per requested variant, so count is reliable even
when a model does not offer a multi-image parameter.
4. Run as MCP server
./venv/bin/python server.py5. Review & rate sprites (GUI)
./venv/bin/pip install dearpygui pillow
./venv/bin/python review_gui.pyFeatures:
Thumbnail preview of each generated sprite
Star rating (1-5) with one click
Text feedback per sprite
Filter: all / unrated / top rated
Export rated dataset as JSONL for fine-tuning
Or configure in your MCP client:
{
"mcp": {
"pixel-art": {
"type": "local",
"command": ["./venv/bin/python", "server.py"],
"enabled": true
}
}
}Tools
Generation
generate_sprite
Generate a single pixel-art sprite. Automatically saved to feedback DB (unrated).
Parameter | Type | Default | Description |
| str | required | Sprite description (e.g. "a brave knight in armor") |
| str | required | PNG save path (relative to output dir or absolute) |
| int? | null | Seed for reproducibility |
| int | 512 | Image width |
| int | 512 | Image height |
| int | 4 | Inference steps (lower = faster, less detail) |
| bool | true | Remove background, make transparent |
| int | 4 | Pixel block size (0 = off, 4 = chunky pixel-art) |
Returns: output_path, db_id, generation_time, and other metadata.
batch_generate
Generate multiple sprites in one call. Each is saved to the feedback DB.
Each spec may also set provider: "polza", model, reference_images,
aspect_ratio, quality, count, and wait.
generate_images
Generate 1–10 variants from one prompt through Polza.ai. It accepts the same
style-reference fields as cloud generate_sprite and saves every finished
variant to the feedback DB.
get_generation_status
Check a non-blocking Polza generation by its generation_id and retrieve its
status, output sources, usage, warnings, or error.
Feedback
rate_sprite
Rate a generated sprite 1-5 stars with optional feedback.
Parameter | Type | Default | Description |
| str | required | ID returned by generate_sprite / batch_generate |
| int | required | 1-5 stars |
| str? | null | Optional text feedback |
get_reference_sprites
Get highly-rated reference sprites for a prompt. The AI uses these as examples when generating similar sprites.
Parameter | Type | Default | Description |
| str | required | Search query (e.g. "knight") |
| int | 5 | Max results |
| int | 4 | Minimum rating threshold |
list_sprites
List sprites in the feedback database.
Parameter | Type | Default | Description |
| str | "all" | "all", "unrated", or "top" |
| int | 20 | Max results |
db_stats
Get database statistics: total sprites, rated, unrated, average rating.
Configuration
Environment variables
Variable | Default | Description |
|
| Path to base model |
|
| Path to LoRA adapter |
|
| Default output directory |
| — | Polza.ai API key; required for cloud generation |
|
| Default Polza image model |
| — | PixelLab API key; required for |
Swapping models
The server is configured for FLUX.2-klein by default. To use a different model, edit server.py:
Pipeline class — replace
Flux2KleinPipelinewith your model's pipeline (e.g.StableDiffusionXLPipelinefor SDXL)LoRA scale — adjust
LORA_SCALE(rsLoRA needs ~0.1, regular LoRA typically 0.7-1.0)Guidance scale — distilled models ignore it; standard models need 5-8
Steps — distilled models work at 4; standard models need 20-30
How It Works
Generation — text-to-image model generates a 512x512 image
Pixelation — downscale with LANCZOS, upscale with NEAREST → chunky pixel-art blocks
Background removal — detect border color, normalize to solid fill, flood-fill from edges → transparent PNG
Requirements
GPU: NVIDIA with >= 8 GB VRAM (uses CPU offload automatically)
Python: 3.12+
CUDA: 12.0+
Credits
Default model: FLUX.2-klein-4B by Black Forest Labs (Apache 2.0)
Default LoRA: pixel-art-lora by Limbicnation (Apache 2.0)
MCP SDK: modelcontextprotocol/python-sdk
License
MIT — see LICENSE
Model licenses are separate from this project. Check each model's license card for usage terms.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that forges pixel art sprites & game assets using Google Gemini — generate, crop, split & process, all from your AI assistant.Last updated8333MIT
- AlicenseBqualityDmaintenanceMCP server for Aseprite — create, edit, and export pixel art sprites, animations, and sprite sheets from any AI assistant.Last updated436MIT
- AlicenseBqualityCmaintenanceAn MCP server that generates pixel-art PNGs from text prompts, using a free image backend, and saves them directly to your project directory.Last updated2MIT
- Alicense-qualityDmaintenanceA pixel art animation MCP server for AI agents, enabling scene generation, sprite drawing, and PNG export with zero latency.Last updated412MIT
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for NanoBanana AI image generation and editing
MCP server for Midjourney AI image generation and editing
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/emil28092005/Imagen'
If you have feedback or need assistance with the MCP directory API, please join our Discord server