DALL-E MCP Server
Provides tools for generating, editing, and creating variations of images using OpenAI's DALL-E models, supporting both DALL-E 2 and DALL-E 3 with various customization options for image size, quality, and style.
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 Servergenerate a cute cartoon cat wearing a wizard hat"
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
An MCP (Model Context Protocol) server for generating images using OpenAI's DALL-E API.
Features
Generate images using DALL-E 2 or DALL-E 3
Edit existing images (DALL-E 2 only)
Create variations of existing images (DALL-E 2 only)
Validate OpenAI API key
Related MCP server: GPT Image MCP Server
Installation
# Clone the repository
git clone https://github.com/Garoth/dalle-mcp.git
cd dalle-mcp
# Install dependencies
npm install
# Build the project
npm run buildImportant Note for Cline Users
When using this DALL-E MCP server with Cline, it's recommended to save generated images in your current workspace directory by setting the saveDir parameter to match your current working directory. This ensures Cline can properly locate and display the generated images in your conversation.
Example usage with Cline:
{
"prompt": "A tropical beach at sunset",
"saveDir": "/path/to/current/workspace"
}Usage
Running the Server
# Run the server
node build/index.jsConfiguration for Cline
Add the dall-e server to your Cline MCP settings file inside VSCode's settings (ex. ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
{
"mcpServers": {
"dalle-mcp": {
"command": "node",
"args": ["/path/to/dalle-mcp-server/build/index.js"],
"env": {
"OPENAI_API_KEY": "your-api-key-here",
"SAVE_DIR": "/path/to/save/directory"
},
"disabled": false,
"autoApprove": []
}
}
}Make sure to:
Replace
/path/to/dalle-mcp-server/build/index.jswith the actual path to the built index.js fileReplace
your-api-key-herewith your OpenAI API key
Available Tools
generate_image
Generate an image using DALL-E based on a text prompt.
{
"prompt": "A futuristic city with flying cars and neon lights",
"model": "dall-e-3",
"size": "1024x1024",
"quality": "standard",
"style": "vivid",
"n": 1,
"saveDir": "/path/to/save/directory",
"fileName": "futuristic-city"
}Parameters:
prompt(required): Text description of the desired imagemodel(optional): DALL-E model to use ("dall-e-2" or "dall-e-3", default: "dall-e-3")size(optional): Size of the generated image (default: "1024x1024")DALL-E 3: "1024x1024", "1792x1024", or "1024x1792"
DALL-E 2: "256x256", "512x512", or "1024x1024"
quality(optional): Quality of the generated image, DALL-E 3 only ("standard" or "hd", default: "standard")style(optional): Style of the generated image, DALL-E 3 only ("vivid" or "natural", default: "vivid")n(optional): Number of images to generate (1-10, default: 1)saveDir(optional): Directory to save the generated images (default: current directory or SAVE_DIR from .env). For Cline users: Setting this to your current workspace directory is recommended for proper image display.fileName(optional): Base filename for the generated images without extension (default: "dalle-{timestamp}")
edit_image
Edit an existing image using DALL-E based on a text prompt.
⚠️ Known Issue (March 18, 2025): The DALL-E 2 image edit API currently has a bug where it sometimes ignores the prompt and returns the original image without any edits, even when using proper RGBA format images and masks. This issue has been reported in the OpenAI community forum. If you experience this issue, try using the
create_variationtool instead, which seems to work more reliably.
{
"prompt": "Add a red hat",
"imagePath": "/path/to/image.png",
"mask": "/path/to/mask.png",
"model": "dall-e-2",
"size": "1024x1024",
"n": 1,
"saveDir": "/path/to/save/directory",
"fileName": "edited-image"
}Parameters:
prompt(required): Text description of the desired editsimagePath(required): Path to the image to editmask(optional): Path to the mask image (white areas will be edited, black areas preserved)model(optional): DALL-E model to use (currently only "dall-e-2" supports editing, default: "dall-e-2")size(optional): Size of the generated image (default: "1024x1024")n(optional): Number of images to generate (1-10, default: 1)saveDir(optional): Directory to save the edited images (default: current directory or SAVE_DIR from .env). For Cline users: Setting this to your current workspace directory is recommended for proper image display.fileName(optional): Base filename for the edited images without extension (default: "dalle-edit-{timestamp}")
create_variation
Create variations of an existing image using DALL-E.
{
"imagePath": "/path/to/image.png",
"model": "dall-e-2",
"size": "1024x1024",
"n": 4,
"saveDir": "/path/to/save/directory",
"fileName": "image-variation"
}Parameters:
imagePath(required): Path to the image to create variations ofmodel(optional): DALL-E model to use (currently only "dall-e-2" supports variations, default: "dall-e-2")size(optional): Size of the generated image (default: "1024x1024")n(optional): Number of variations to generate (1-10, default: 1)saveDir(optional): Directory to save the variation images (default: current directory or SAVE_DIR from .env). For Cline users: Setting this to your current workspace directory is recommended for proper image display.fileName(optional): Base filename for the variation images without extension (default: "dalle-variation-{timestamp}")
validate_key
Validate the OpenAI API key.
{}No parameters required.
Development
Testing Configuration
Note: The following .env configuration is ONLY needed for running tests, not for normal operation.
If you're developing or running tests for this project, create a .env file in the root directory with your OpenAI API key:
# Required for TESTS ONLY: OpenAI API Key
OPENAI_API_KEY=your-api-key-here
# Optional: Default save directory for test images
# If not specified, images will be saved to the current directory
# SAVE_DIR=/path/to/save/directoryFor normal operation with Cline, configure your API key in the MCP settings JSON as described in the "Adding to MCP Settings" section above.
You can get your API key from OpenAI's API Keys page.
Running Tests
# Run basic tests
npm test
# Run all tests including edit and variation tests
npm run test:all
# Run tests in watch mode
npm run test:watch
# Run specific test by name
npm run test:name "should validate API key"Note: Tests use real API calls and may incur charges on your OpenAI account.
Generating Test Images
The project includes a script to generate test images for development and testing:
# Generate a test image in the assets directory
npm run generate-test-imageThis will create a simple test image in the assets directory that can be used for testing the edit and variation features.
License
MIT
Available Tools
4 toolscreate_variationC
Create variations of an existing image using DALL-E
| Name | Required | Description | Default |
|---|---|---|---|
| imagePath | Yes | Path to the image to create variations of | |
| model | No | DALL-E model to use (currently only dall-e-2 supports variations) | |
| size | No | Size of the generated image | |
| n | No | Number of variations to generate (1-10) | |
| saveDir | No | Directory to save the variation images | |
| fileName | No | Base filename for the variation images (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. While 'create variations' implies a generative operation, the description doesn't mention important behavioral aspects like whether this is a read-only operation, what permissions are needed, rate limits, cost implications, or what happens to the original image. For a tool with 6 parameters and no annotation coverage, 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 states the core purpose without any wasted words. It's appropriately sized for the tool's complexity and gets straight to the point with no unnecessary elaboration.
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?
For a generative AI tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (e.g., image paths, URLs, error handling), doesn't mention DALL-E API constraints or costs, and provides no guidance on usage context. The 100% schema coverage helps with parameters, but other critical contextual information is missing.
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 description mentions 'variations of an existing image' which provides context for the 'imagePath' parameter, but doesn't add meaningful semantic information beyond what's already in the schema (which has 100% coverage). The schema descriptions comprehensively document each parameter's purpose, constraints, and enums, so the description adds minimal value here.
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 action ('create variations') and resource ('existing image using DALL-E'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'edit_image' or 'generate_image', but the focus on variations of existing images provides some implicit distinction.
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 like 'edit_image' or 'generate_image'. There's no mention of prerequisites, constraints, or typical use cases, leaving the agent with no contextual usage information beyond the basic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_imageC
Edit an existing image using DALL-E based on a text prompt
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the desired edits | |
| imagePath | Yes | Path to the image to edit | |
| mask | No | Path to the mask image (white areas will be edited, black areas preserved) | |
| model | No | DALL-E model to use (currently only dall-e-2 supports editing) | |
| size | No | Size of the generated image | |
| n | No | Number of images to generate (1-10) | |
| saveDir | No | Directory to save the edited images | |
| fileName | No | Base filename for the edited images (without extension) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool edits images using DALL-E but omits critical details: whether this is a read/write operation (implied mutation from 'edit'), authentication needs, rate limits, file format requirements, or what happens to the original image. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.
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 action ('Edit an existing image') and includes essential details (technology and input). There is zero waste or redundancy, making it appropriately sized and well-structured for quick comprehension.
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 tool's complexity (8 parameters, mutation operation, no output schema, and no annotations), the description is incomplete. It lacks information on behavioral traits (e.g., file handling, error cases), output format (what is returned?), and usage context. For a DALL-E editing tool with multiple parameters, this minimal description fails to provide sufficient context for effective agent use.
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?
Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds no parameter-specific information beyond implying 'prompt' is used for editing. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description doesn't compensate with additional semantic context for parameters.
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 verb ('Edit') and resource ('an existing image'), specifying the technology ('using DALL-E') and input mechanism ('based on a text prompt'). It distinguishes from sibling 'create_variation' and 'generate_image' by focusing on editing existing images rather than creating new ones or variations, though it doesn't explicitly contrast with these alternatives.
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 like 'create_variation' or 'generate_image'. It doesn't mention prerequisites (e.g., needing an existing image file), exclusions, or specific contexts where editing is preferred over generation. Usage is implied through the action 'edit an existing image' but lacks explicit direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageC
Generate an image using DALL-E based on a text prompt
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the desired image | |
| model | No | DALL-E model to use (dall-e-2 or dall-e-3) | |
| size | No | Size of the generated image | |
| quality | No | Quality of the generated image (dall-e-3 only) | |
| style | No | Style of the generated image (dall-e-3 only) | |
| n | No | Number of images to generate (1-10) | |
| saveDir | No | Directory to save the generated images | |
| fileName | No | Base filename for the generated images (without extension) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states the basic function but omits critical behavioral details: whether this is a read-only or mutation operation, rate limits, authentication requirements, cost implications, or what happens when images are saved to 'saveDir'. For a complex 8-parameter tool with no annotation coverage, this is insufficient.
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 gets straight to the point with zero wasted words. It's appropriately sized for the tool's complexity and front-loads the essential information.
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?
For a complex image generation tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns (image URLs? file paths? metadata?), error conditions, or behavioral constraints. The agent would need to guess about the output format and operational characteristics.
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?
Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds no additional parameter information beyond what's in the schema, meeting the baseline expectation but not providing extra value. The description doesn't explain relationships between parameters (e.g., 'quality' and 'style' only apply to 'dall-e-3').
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 action ('generate') and resource ('image using DALL-E based on a text prompt'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_variation' or 'edit_image', which likely also involve image generation/manipulation.
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 like 'create_variation' or 'edit_image'. It doesn't mention prerequisites, constraints, or typical use cases, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
validate_keyB
Validate the OpenAI API key
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but provides no information about what validation entails, what happens during validation, whether it makes external API calls, what the response format might be, or any error conditions. This leaves significant behavioral gaps.
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 states exactly what the tool does with zero wasted words. It's appropriately sized for a simple validation tool and front-loads the core functionality immediately.
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?
For a validation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what validation means in this context, what constitutes success/failure, what information is returned, or how the validation is performed. The agent lacks crucial context to understand the tool's behavior and output.
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 tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to compensate for any parameter gaps, and it correctly doesn't mention any parameters. Baseline for 0 parameters with full coverage is 4.
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 action ('validate') and the resource ('OpenAI API key'), providing specific verb+resource pairing. However, it doesn't differentiate from sibling tools (which are image-related operations), though this isn't necessary since they serve completely different domains.
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. There's no mention of prerequisites, context for validation, or what constitutes appropriate usage scenarios. The agent must infer usage from the tool name alone.
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.
4 tool updates
- First observed
create_variation - First observed
edit_image - First observed
generate_image - First observed
validate_key
TDQS
Each tool has a clearly distinct purpose: create_variation modifies an existing image, edit_image alters an image with a prompt, generate_image creates from scratch, and validate_key handles API authentication. There is no overlap in functionality, making tool selection straightforward for an agent.
All tool names follow a consistent verb_noun pattern (e.g., create_variation, edit_image, generate_image, validate_key) using snake_case throughout. This predictability enhances readability and usability for agents.
With 4 tools, this server is well-scoped for DALL-E image generation and management. Each tool serves a specific, essential function without bloat, making the set efficient and focused on core operations.
The tools cover key DALL-E operations: generation, editing, and variation creation, plus API key validation. A minor gap is the lack of tools for listing or managing generated images, but core workflows are fully supported without dead ends.
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
MCP server for NanoBanana AI image generation and editing
MCP server for Midjourney AI image generation and editing
MCP server for Qwen Image 3 AI image generation
MCP server for Flux AI image generation
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP tool server that enables generating and editing images through OpenAI's image models, supporting text-to-image generation and advanced image editing (inpainting, outpainting) across various MCP-compatible clients.110MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.69-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables image generation and editing using OpenAI's DALL-E models with support for text prompts, inpainting, and outpainting. It includes advanced features like automatic aspect ratio mapping and intelligent file management to handle large image payloads.771MIT
- FlicenseAqualityDmaintenanceAn MCP server for generating and editing images using OpenAI's GPT Image and DALL·E models. It provides tools for image generation, editing, variation creation, and model listing with support for multiple AI models.4-
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/Garoth/dalle-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server