MCP Server - Images
A Model Context Protocol (MCP) server for AI-powered image generation using Stability AI and Black Forest Labs APIs.
Features
- Multi-provider support: Stability AI (Stable Diffusion) and Black Forest Labs (Flux models)
- Direct generation: Accepts optimized prompts directly from calling LLM (no dual pipes)
- Flexible filename templates: Customizable output filenames with timestamp, provider, model, and content-based variables
- Comprehensive metadata: Full tracking of generation parameters, checksums, and provenance
- Professional error handling: Detailed error reporting and retry mechanisms
- MCP standard compliance: Works with any MCP-compatible client
Quick Start
Installation
Configuration
Configure via environment variables:
Usage with MCP Client
MCP Tools
generate_image
Generate images from text prompts with AI-optimized prompting.
Parameters:
prompt
(required): Detailed, optimized text description of the image to generatenegative_prompt
(optional): Things to avoid in the image (Stability AI only)provider
(optional): "stability" or "bfl" (default: "stability")model
(optional): Specific model to use (e.g., "sd3.5-large", "flux-pro-1.1")aspect_ratio
(optional): Image aspect ratio (default: "1:1")cfg_scale
(optional): Classifier free guidance scale 1.0-10.0 (Stability AI only)seed
(optional): Seed for reproducible generationoutput_dir
(optional): Output directory (default: "./images")filename_template
(optional): Template for generated filenames
Example:
Filename Templates
Customize output filenames using template variables:
{{.Timestamp}}
: mmddyy.hhmmss format{{.Date}}
: mmddyy format{{.Time}}
: hhmmss format{{.Provider}}
: "stability" or "bfl"{{.Model}}
: Model name (e.g., "sd3.5-large"){{.Subject}}
: Cleaned main subject from prompt{{.Hash}}
: Short hash of the prompt{{.Counter}}
: Auto-incrementing counter
Example templates:
"{{.Timestamp}}-{{.Subject}}"
→071825.143022-mountain_landscape.png
"{{.Date}}.{{.Time}}-{{.Provider}}-{{.Model}}"
→071825.143022-stability-sd35-large.png
"img_{{.Counter}}_{{.Hash}}"
→img_001_a7b2c9d8.png
Supported Providers
Stability AI
- Models: sd3-large, sd3-large-turbo, sd3-medium, sd3.5-large, sd3.5-large-turbo, sd3.5-medium
- Features: Negative prompts, CFG scale control, multiple aspect ratios
- API: Stability AI REST API v2
Black Forest Labs
- Models: flux-pro-1.1, flux-pro-1.1-ultra, flux-pro, flux-dev
- Features: High-quality generation, fast turnaround
- API: BFL REST API v1
Integration
With Chatterbox
Add to your config.yaml
:
With Other MCP Clients
This server works with any MCP-compatible client including:
- Claude Desktop
- Cline (VS Code extension)
- Continue (VS Code extension)
- Custom MCP clients
Development
License
MIT License - see LICENSE file for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Related Projects
- chatterbox - AI chat interface with MCP support
- mkimg - Original Python image generation pipeline
- MCP Servers - Official MCP server implementations
This server cannot be installed
A Model Context Protocol server that enables AI-powered image generation through Stability AI and Black Forest Labs APIs, allowing users to create images from detailed text prompts with customizable settings and comprehensive metadata tracking.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that provides image generation capabilities using the Ideogram API, allowing users to create images from text prompts with customizable parameters.Last updated -184TypeScript
- AsecurityFlicenseAqualityA Model Context Protocol server that provides an image generation tool using Templated.io, allowing users to create customized images based on templates with text and image layers.Last updated -TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol server that enables generation of high-quality images using the Flux.1 Schnell model via Together AI, allowing users to create images from text prompts with customizable dimensions.Last updated -114PythonMIT License
- -securityAlicense-qualityA server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.Last updated -11PythonMIT License