Image Generation

v1.0.0Data Science & MLstable

Provides 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.

image-generation-mcp-servermcpai-integration
Share:
51
Stars
0
Downloads
0
Weekly
0/5

What is Image Generation?

Image Generation is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides 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 au...

Provides 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.

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides multi-provider image generation with automatic fall

Use Cases

Generate images with automatic fallback across providers.
Create pixel art and specialized visual content.
Track costs and automatically save generated images.
GongRzhe

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 16, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx image-generation-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Image Generation

Image Generation MCP Server provides AI-powered image generation via the Replicate platform, using the black-forest-labs/flux-schnell model by default. It exposes a single generate_image tool that takes a text prompt and optional parameters (seed, aspect ratio, output format, number of images) and returns URLs to the generated images. A Replicate API token is the only credential required, and the model can be swapped for any Replicate-hosted image model via an environment variable.

Prerequisites

  • Node.js 14 or later with npm
  • A Replicate account — sign up at https://replicate.com
  • A Replicate API token — create one at https://replicate.com/account/api-tokens
  • An MCP-compatible client such as Claude Desktop
1

Get your Replicate API token

Create a free account at https://replicate.com, then go to https://replicate.com/account/api-tokens and create a new token. Copy it — you will need it in the next step.

2

Open your Claude Desktop configuration file

On macOS the config is at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it is at %APPDATA%\Claude\claude_desktop_config.json.

3

Add the image-gen server entry with your API token

Insert the server block. The REPLICATE_API_TOKEN env var is required. The MODEL env var is optional — the default is black-forest-labs/flux-schnell.

{
  "mcpServers": {
    "image-gen": {
      "command": "npx",
      "args": ["@gongrzhe/image-gen-server"],
      "env": {
        "REPLICATE_API_TOKEN": "your-replicate-api-token"
      }
    }
  }
}
4

Restart Claude Desktop

Close and reopen Claude Desktop. The generate_image tool should appear in the MCP tool list.

5

(Optional) Install via Smithery for automatic setup

Smithery can configure the server automatically for Claude Desktop using the CLI command below.

npx -y @smithery/cli install @GongRzhe/Image-Generation-MCP-Server --client claude

Image Generation Examples

Client configuration

Claude Desktop config using npx to run the image generation server. Replace the token value with your real Replicate API token. Optionally set MODEL to use a different Replicate model.

{
  "mcpServers": {
    "image-gen": {
      "command": "npx",
      "args": ["@gongrzhe/image-gen-server"],
      "env": {
        "REPLICATE_API_TOKEN": "r8_your_token_here",
        "MODEL": "black-forest-labs/flux-schnell"
      }
    }
  }
}

Prompts to try

Prompts that use the generate_image tool to create images via Replicate.

- "Generate an image of a cozy coffee shop on a rainy evening, 16:9 aspect ratio"
- "Create a photorealistic portrait of a red fox sitting in a snowy forest"
- "Generate 4 variations of a logo concept for a tech startup called NeuralLeaf"
- "Make a PNG image of a futuristic city skyline at sunset with neon lights"
- "Generate a square image of a watercolor painting of the Eiffel Tower at dusk"

Troubleshooting Image Generation

generate_image returns a 401 error

Your REPLICATE_API_TOKEN is missing or incorrect. Double-check the token value in your config against what is shown at https://replicate.com/account/api-tokens. Ensure there are no extra spaces or line breaks in the token string.

Image generation is slow or times out

The flux-schnell model is the fastest option on Replicate, but cold-start latency can add 10-30 seconds on first use. If timeouts persist, check your MCP client's tool timeout setting and consider increasing it.

The tool returns image URLs that expire quickly

Replicate returns temporary CDN URLs. Download and save the images immediately if you need to keep them. Ask Claude to save the URL to a file or use a download tool to persist the image locally.

Frequently Asked Questions about Image Generation

What is Image Generation?

Image Generation is a Model Context Protocol (MCP) server that provides 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. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Image Generation?

Follow the installation instructions on the Image Generation GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Image Generation?

Image Generation works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Image Generation free to use?

Yes, Image Generation is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "image-generation-mcp-server": { "command": "npx", "args": ["-y", "image-generation-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Image Generation?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides