Image Generator MCP Server
This is an MCP (Model Context Protocol) server that generates images from text prompts using HuggingFace models (Stable Diffusion, FLUX, and more).
✨ FREE TIER AVAILABLE!
Quick Installation:
claude mcp add image-generator -- npx -y mcp-hf-images --api-key YOUR_HF_TOKEN
Get Your FREE HuggingFace Token
- Visit HuggingFace Token Settings
- Click "New token"
- Give it a name (e.g., "MCP Image Generator")
- Select "Read" access
- Click "Generate token"
- Copy your token and use it in the installation command above
Available Tools
- generate_image - Generate an image from a text prompt
prompt (required): The text description of the image to generate
model (optional): Choose from:
- stabilityai/stable-diffusion-xl-base-1.0 (default)
- black-forest-labs/FLUX.1-dev (state-of-the-art)
- ayrisdev/mobile-ui-design (UI/UX design)
- stabilityai/stable-diffusion-2-1
- runwayml/stable-diffusion-v1-5
negativePrompt (optional): What to avoid in the generated image
Example Usage
After installation, you can use prompts like:
- "Generate an image of a sunset over mountains"
- "Create an image of a futuristic city with flying cars"
- "Design a modern mobile app login screen"
- "Make an image of a cute robot playing with a cat"
Error Handling
The server provides detailed error messages for common issues:
- Invalid HuggingFace token
- Rate limit exceeded
- Free tier quota exceeded
- Model not found
- General generation errors
Why HuggingFace?
- 🆓 Free tier available - no credit card required!
- ⚡ Fast image generation
- 🎨 Multiple state-of-the-art models to choose from
- 🌍 Open source and community-driven