Image Generation
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.
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
Maintainer
Works with
Installation
Manual Installation
npx image-generation-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.
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.
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"
}
}
}
}Restart Claude Desktop
Close and reopen Claude Desktop. The generate_image tool should appear in the MCP tool list.
(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 claudeImage 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.
Image Generation Alternatives — Similar Data Science & ML Servers
Looking for alternatives to Image Generation? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
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.
Set Up Image Generation in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.