Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Image Generation Server

FreeNot checked

Enables text-to-image and pixel art generation using Pollinations.ai with no API key required, and supports multiple models like Flux.

GitHubEmbed

About

Enables text-to-image and pixel art generation using Pollinations.ai with no API key required, and supports multiple models like Flux.

README

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

Installation

Prerequisites

  • Python 3.8 or higher
  • pip

Setup

  1. Clone or navigate to the project directory:

    cd image-gen-mcp
    
  2. Install the package in development mode:

    pip install -e .
    
  3. (Optional) Configure output directory: Create a .env file in the project root:

    IMAGE_OUTPUT_DIR=./generated_images
    

Usage

Running the Server

python -m image_gen_mcp

The 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 image
  • width (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 art
  • width (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:

  1. Edit ~/.claude/settings.json
  2. Add the MCP server configuration:
{
  "mcpServers": {
    "image-gen-mcp": {
      "command": "python",
      "args": ["-m", "image_gen_mcp"],
      "env": {
        "IMAGE_OUTPUT_DIR": "./generated_images"
      }
    }
  }
}
  1. Restart Claude Code

Generated Images

By default, images are saved to ./generated_images/ with filenames like:

prompt_description_1719489264.png

You 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.md

Contributing

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.

from github.com/jorsenc/image-gen-mcp

Install Image Generation Server in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install image-generation-mcp-server

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add image-generation-mcp-server -- uvx image-gen-mcp

FAQ

Is Image Generation Server MCP free?

Yes, Image Generation Server MCP is free — one-click install via Unyly at no cost.

Does Image Generation Server need an API key?

No, Image Generation Server runs without API keys or environment variables.

Is Image Generation Server hosted or self-hosted?

A hosted option is available: Unyly runs the server in the cloud, no local setup required.

How do I install Image Generation Server in Claude Desktop, Claude Code or Cursor?

Open Image Generation Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Image Generation Server with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All media MCPs