DALL-E MCP Server
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.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DALL-E MCP Servercreate a futuristic cityscape at night with flying cars, hd quality"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: Imagen MCP Server
Installation
Clone this repository:
git clone <repository-url>
cd dall-e-mcp-serverInstall dependencies:
npm installSet up environment variables:
cp .env.example .envEdit
.envfile and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
DEFAULT_IMAGE_SIZE=1024x1024
DEFAULT_QUALITY=standard
OUTPUT_DIRECTORY=./generated_imagesUsage
Running the Server
Development Mode
npm run devProduction Mode
npm run build
npm startIntegration with Claude Desktop
Add the server to your Claude Desktop configuration:
macOS/Linux (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"dall-e-server": {
"command": "node",
"args": ["/path/to/dall-e-mcp-server/dist/index.js"],
"env": {
"OPENAI_API_KEY": "your_openai_api_key_here"
}
}
}
}Windows (%APPDATA%/Claude/claude_desktop_config.json):
{
"mcpServers": {
"dall-e-server": {
"command": "node",
"args": ["C:\\path\\to\\dall-e-mcp-server\\dist\\index.js"],
"env": {
"OPENAI_API_KEY": "your_openai_api_key_here"
}
}
}
}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 -standardorhd(default:standard)style(optional): Image style -vividornatural(default:vivid)filename(optional): Custom filename without extension
Example Usage:
{
"prompt": "A serene mountain landscape at sunset with a lake",
"size": "1024x1792",
"quality": "hd",
"style": "natural",
"filename": "mountain_sunset"
}Response:
{
"success": true,
"message": "Image generated successfully",
"details": {
"prompt": "A serene mountain landscape at sunset with a lake",
"size": "1024x1792",
"quality": "hd",
"style": "natural",
"file_path": "/absolute/path/to/generated_images/mountain_sunset.png",
"file_size": 1048576,
"timestamp": "2025-01-15T10:30:00.000Z"
}
}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
dall-e-mcp-server/
├── src/
│ └── index.ts # Main server implementation
├── generated_images/ # Generated images directory
├── dist/ # Compiled JavaScript
├── package.json
├── tsconfig.json
├── .env.example
└── README.mdBuilding
npm run buildDevelopment with Watch Mode
npm run watchError 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
Available Tools
1 toolgenerate_imageC
Generate an image using OpenAI's DALL-E 3 model based on a text prompt
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The text prompt describing the image to generate | |
| size | No | Image size (1024x1024, 1024x1792, or 1792x1024) | 1792x1024 |
| quality | No | Image quality (standard or hd) | hd |
| style | No | Image style (vivid or natural) | vivid |
| filename | No | Optional custom filename (without extension) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the model (DALL-E 3) but doesn't cover critical aspects like rate limits, authentication needs, cost implications, or what happens on failure (e.g., if the prompt violates content policies). For a tool that likely involves API calls and potential restrictions, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose without any wasted words. It directly states what the tool does and the technology used, making it easy to understand at a glance. Every part of the sentence earns its place by providing essential context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of an image generation tool with no annotations and no output schema, the description is insufficient. It doesn't explain the return value (e.g., image URL or data), error handling, or usage limits. For a tool that interacts with an external API and has multiple parameters, more context is needed to ensure proper agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with all parameters well-documented, including enums and defaults. The description adds no additional parameter semantics beyond what the schema provides, such as explaining prompt best practices or style/quality trade-offs. However, with high schema coverage, the baseline is 3, as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('generate') and resource ('image'), and identifies the underlying model (DALL-E 3). It distinguishes the action from potential alternatives by specifying it's for image generation from text prompts. However, without sibling tools, it doesn't need to differentiate from them, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, constraints, or scenarios where this tool is preferred over other image generation methods. The only implied usage is for generating images from text prompts, but this is basic and lacks explicit context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- Changed
generate_image2 fields changed- changed
Input schema / properties / quality / defaultPrevious value: -"standard"New value: +"hd" - changed
Input schema / properties / size / defaultPrevious value: -"1024x1024"New value: +"1792x1024"
1 tool update
- First observed
generate_image
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'generate_image' has a clear, distinct purpose that cannot be confused with any other tool in the set.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'generate_image' follows a clear verb_noun pattern, and there are no other tools to compare it against for inconsistency.
A single tool is too few for most server purposes, as it limits functionality and can feel thin. While DALL-E's core function is image generation, typical MCP servers benefit from multiple tools (e.g., 3-15) to handle related operations like listing images, editing prompts, or managing settings, making this count borderline insufficient.
The tool set covers the basic image generation function, but there are notable gaps for a DALL-E server. Missing operations might include listing generated images, editing or deleting images, or handling variations, which could lead to agent workarounds or incomplete workflows in more complex tasks.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Generate images with your own ChatGPT subscription (Plus, Pro or Team), without spending API credits
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
Create images and videos from prompts, with options for image mixing, reference images, and start/…
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to generate and edit images through OpenAI's DALL-E models via MCP tools. Supports text-to-image generation and image-to-image editing with configurable parameters for size, quality, and style.-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to generate high-quality images using Google's Gemini and Imagen models with support for multiple aspect ratios, dynamic model selection, and direct file saving capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceEnables image generation using OpenAI's DALL-E and GPT-Image models directly through the Model Context Protocol. It allows users to create and save images with fine-grained control over parameters like size, quality, and background transparency.66MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to generate real images via multiple models (OpenAI, Gemini, Recraft, Seedream, Grok, Arrow) and returns usable file paths instead of base64 data.1354MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/szabadkai/imagegen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server