Image Generation MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Image Generation MCP Server
A Model Context Protocol (MCP) server for generating images using Pollinations.ai. No API key required β completely free!
Features
π¨ Text-to-Image Generation β Generate high-quality images from text prompts
πΌοΈ Pixel Art Mode β Specialized pixel art generation for retro/8-bit styles
π Multiple Models β Support for Flux, Flux-Pro, and Flux-Realism
πΎ Auto-Save β Generated images are automatically saved to disk
π Free β Uses Pollinations.ai which requires no API key
Related MCP server: Replicate FLUX.1 Kontext Max MCP Server
Installation
Prerequisites
Python 3.8 or higher
pip
Setup
Clone or navigate to the project directory:
cd image-gen-mcpInstall the package in development mode:
pip install -e .(Optional) Configure output directory: Create a
.envfile in the project root:IMAGE_OUTPUT_DIR=./generated_images
Usage
Running the Server
python -m image_gen_mcpThe server will start and be ready to accept requests.
Available Tools
1. generate_image
Generate an image from a text prompt.
Parameters:
prompt(required): Description of the imagewidth(optional): Image width in pixels (default: 1024)height(optional): Image height in pixels (default: 1024)model(optional): Model to use - "flux", "flux-pro", or "flux-realism" (default: "flux")seed(optional): Random seed for reproducibility
Example:
{
"prompt": "a serene mountain landscape with a lake at sunset",
"width": 1024,
"height": 1024,
"model": "flux"
}2. generate_pixel_art
Generate pixel art from a text prompt.
Parameters:
prompt(required): Description of the pixel artwidth(optional): Image width in pixels (default: 256)height(optional): Image height in pixels (default: 256)
Example:
{
"prompt": "a knight with a sword and shield",
"width": 256,
"height": 256
}3. list_providers
List available image generation providers and their capabilities.
Example:
{}Integration with Claude
To use this MCP with Claude Code, add it to your Claude configuration:
Edit
~/.claude/settings.jsonAdd the MCP server configuration:
{
"mcpServers": {
"image-gen-mcp": {
"command": "python",
"args": ["-m", "image_gen_mcp"],
"env": {
"IMAGE_OUTPUT_DIR": "./generated_images"
}
}
}
}Restart Claude Code
Generated Images
By default, images are saved to ./generated_images/ with filenames like:
prompt_description_1719489264.pngYou can change the output directory using the IMAGE_OUTPUT_DIR environment variable.
Troubleshooting
Connection Timeout
If you get a timeout error, it may be because:
The image generation is taking longer than expected
Your internet connection is unstable
Pollinations.ai service is temporarily down
Try again or increase the timeout in providers.py (currently 120 seconds).
Generation Failures
Ensure you have a stable internet connection
Try a simpler prompt
Check that Pollinations.ai is accessible
Architecture
image-gen-mcp/
βββ src/image_gen_mcp/
β βββ __init__.py
β βββ __main__.py # Entry point
β βββ server.py # MCP server implementation
β βββ providers.py # Image generation providers
βββ pyproject.toml # Project configuration
βββ README.mdContributing
Feel free to extend this server with:
Additional image generation providers (Together AI, Hugging Face, etc.)
Caching mechanisms
Batch generation
Image enhancement tools
Cost tracking
License
MIT License
Disclaimer
This project uses Pollinations.ai for image generation. Make sure to comply with their terms of service and respect copyright and usage rights when generating images.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Generate images, videos, music & lip sync with 200+ AI models (Flux, Veo 3, Kling, Suno)
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
Official FLUX MCP server. Generate, edit, vary, and browse images from Black Forest Labs.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to generate images, text, and audio content through the Pollinations APIs. Provides direct access to multimodal generation capabilities including image creation from text prompts, text-to-speech, and text generation.12139 npmMIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables high-quality image generation with advanced text rendering and contextual understanding using FLUX.1 Kontext Max through the Replicate API. Supports text-to-image generation, image editing, multiple aspect ratios, and automatically downloads generated images locally.1-
- AlicenseNot gradedqualityDmaintenanceEnables AI image generation from text prompts using Pollinations AI. Supports multiple models, customizable dimensions, and direct image saving with URL generation capabilities.53 npm5MIT
- AlicenseNot gradedqualityDmaintenanceProvides multi-provider image generation with automatic fallback across services like Pollinations.ai, Cloudflare, and Hugging Face. It features specialized pixel art generation, cost tracking, and automatic saving of generated visual assets to disk.MIT