Provides image generation capabilities using OpenAI's DALL-E 3 model, allowing users to create high-quality images from text prompts with configurable size, quality, and style parameters.
DALL-E MCP Server
A Model Context Protocol (MCP) server for generating images using OpenAI's DALL-E 3 model. This server enables ChatGPT and other MCP-compatible clients to generate high-quality images from text prompts.
Features
- DALL-E 3 Integration: Uses OpenAI's latest image generation model
- Flexible Parameters: Configurable image size, quality, and style
- Local File Storage: Automatically saves generated images to local filesystem
- Error Handling: Comprehensive error handling with detailed logging
- TypeScript: Built with TypeScript for type safety and better development experience
Installation
- Clone this repository:
- Install dependencies:
- Set up environment variables:
- Edit
.env
file and add your OpenAI API key:
Usage
Running the Server
Development Mode
Production Mode
Integration with Claude Desktop
Add the server to your Claude Desktop configuration:
macOS/Linux (~/.config/claude/claude_desktop_config.json
):
Windows (%APPDATA%/Claude/claude_desktop_config.json
):
Available Tools
generate_image
Generates an image using DALL-E 3 based on a text prompt.
Parameters:
prompt
(required): Text description of the image to generatesize
(optional): Image dimensions -1024x1024
,1024x1792
, or1792x1024
(default:1024x1024
)quality
(optional): Image quality -standard
orhd
(default:standard
)style
(optional): Image style -vivid
ornatural
(default:vivid
)filename
(optional): Custom filename without extension
Example Usage:
Response:
Configuration
Environment Variables
OPENAI_API_KEY
: Your OpenAI API key (required)DEFAULT_IMAGE_SIZE
: Default image size (default:1024x1024
)DEFAULT_QUALITY
: Default quality setting (default:standard
)OUTPUT_DIRECTORY
: Directory to save generated images (default:./generated_images
)
Image Formats
All images are saved as PNG files with automatic timestamping if no filename is provided.
Development
Project Structure
Building
Development with Watch Mode
Error Handling
The server includes comprehensive error handling:
- Missing API Key: Clear error message when OPENAI_API_KEY is not set
- API Errors: OpenAI API errors are caught and returned with details
- File System Errors: Issues with saving images are handled gracefully
- Invalid Parameters: Input validation with helpful error messages
Pricing
DALL-E 3 API pricing (as of 2025):
- Standard quality: $0.040 per image (1024×1024), $0.080 per image (1024×1792 or 1792×1024)
- HD quality: $0.080 per image (1024×1024), $0.120 per image (1024×1792 or 1792×1024)
License
MIT License
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Support
For issues and questions:
- Check the error messages in the console
- Verify your OpenAI API key is valid
- Ensure you have sufficient API credits
- Review the MCP client configuration
Changelog
v1.0.0
- Initial release with DALL-E 3 integration
- Support for all DALL-E 3 parameters
- Local file storage
- Error handling and logging
- TypeScript implementation
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
Enables AI assistants to generate high-quality images using OpenAI's DALL-E 3 model with configurable parameters like size, quality, and style. Generated images are automatically saved to the local filesystem with comprehensive error handling.
Related MCP Servers
- AsecurityFlicenseAqualityA TypeScript-based MCP server that generates images using OpenAI's dall-e-3 model based on text prompts and saves them to a specified directory.Last updated -110
- -securityFlicense-qualityAn MCP server that allows users to generate, edit, and create variations of images through OpenAI's DALL-E API, supporting both DALL-E 2 and DALL-E 3 models.Last updated -10
- -securityAlicense-qualityA Model Context Protocol server enabling AI assistants to generate images through OpenAI's DALL-E API with full support for all available options and fine-grained control.Last updated -41MIT License
- AsecurityFlicenseAqualityA TypeScript-based MCP server that lets users generate images using OpenAI's dall-e-3 model by providing a prompt and image name.Last updated -11