openai-images-mcp
Provides tools for generating and editing images using OpenAI's GPT Image and DALL·E models, including image generation from text prompts, editing existing images with masks, and creating image variations.
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., "@openai-images-mcpgenerate a logo for a coffee shop called 'Morning Brew' with a minimalist design"
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.
openai-images-mcp
Generate and edit images with OpenAI's gpt-image and DALL·E models, exposed as Model Context Protocol tools. Supports gpt-image-1.5, gpt-image-1, gpt-image-1-mini, dall-e-3, and dall-e-2.
Tools
Tool | Purpose | Models |
| List supported models and their capabilities (sizes, qualities, edit/variation support). | all |
| Generate one or more images from a text prompt. |
|
| Edit existing images with a prompt and optional mask. |
|
| Generate variations of an image. |
|
All generated files are saved to disk. Set return_image_content: true on any call to also receive the images as MCP image blocks (useful when the client should "see" the result, but adds a lot of tokens).
Related MCP server: GPT Image MCP Server
Install
npm install
npm run buildConfigure your MCP client
Claude Desktop / Claude Code
Add to claude_desktop_config.json (or your project's .mcp.json):
{
"mcpServers": {
"dalle": {
"command": "node",
"args": ["/absolute/path/to/dalle-mcp/dist/index.js"],
"env": {
"OPENAI_API_KEY": "sk-...",
"DALLE_OUTPUT_DIR": "/absolute/path/where/images/save"
}
}
}
}Environment variables
Variable | Purpose |
| Required. Your OpenAI API key. |
| Optional. Override OpenAI base URL. |
| Optional. |
| Optional. |
| Optional. Default directory for saved images. Falls back to |
| Optional. Model used when a tool call omits |
Tool reference
generate_image
Required: prompt.
Optional: model, size, quality, n, background, output_format, output_compression, moderation, style, user, output_dir, filename_prefix, return_image_content.
Model-specific notes:
GPT Image (
gpt-image-1.5,gpt-image-1,gpt-image-1-mini): sizesauto|1024x1024|1536x1024|1024x1536, qualitiesauto|low|medium|high. Supportsbackground,output_format,output_compression,moderation.DALL·E 3: sizes
1024x1024|1792x1024|1024x1792, qualitiesstandard|hd,nmust be 1, supportsstyle.DALL·E 2: sizes
256x256|512x512|1024x1024, qualitystandard.
edit_image
Required: prompt, images (absolute paths, up to 16 for GPT Image).
Optional: mask (transparent pixels indicate editable regions), plus the generation options above. DALL·E 3 does not support edits.
create_variation
DALL·E 2 only. Required: image (PNG, square, under 4MB).
Optional: n, size (256x256|512x512|1024x1024), output_dir, filename_prefix, return_image_content.
list_models
No arguments. Returns a JSON document describing each model's sizes, qualities, and supported options — handy for the caller to consult before picking parameters.
Development
npm run dev # run with tsx, no build step
npm run build # tsc to dist/
npm start # node dist/index.jsThe server speaks MCP over stdio, so you can drive it with any MCP-compatible client or manually by piping JSON-RPC messages to node dist/index.js.
Notes
DALL·E 2 and DALL·E 3 are deprecated by OpenAI and support ends 2026-05-12; prefer the GPT Image family.
GPT Image models always return base64 data; DALL·E models are asked for base64 as well so files can be saved without a second HTTP round-trip.
Available Tools
4 toolscreate_variationCreate image variationA
Generate variations of an existing image using DALL·E 2 (the only model that supports variations). Results are saved to disk and file paths are returned.
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Absolute path to the source image (PNG, square, <4MB). | |
| n | No | Number of variations to generate (default 1). | |
| size | No | Output size. Default 1024x1024. | |
| user | No | ||
| output_dir | No | ||
| filename_prefix | No | ||
| return_image_content | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses that results are saved to disk and file paths are returned, but does not cover potential side effects, error conditions, or rate limits. Adequate but not thorough.
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?
Two sentences deliver key information efficiently with no filler. Front-loaded with the primary verb and resource, making it easy to parse.
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 no output schema, the description mentions file paths returned, covering the essential output. With 7 parameters and no annotations, it could elaborate on return format or usage of optional parameters, but is largely sufficient for a simple generation tool.
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 coverage is 43%, with only image and size having descriptions. The description adds context that results are saved to disk, implying output_dir and filename_prefix usage, but does not fully explain user or return_image_content. Partially compensates for gaps.
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 generates variations of an existing image using DALL·E 2, specifying the resource and action. It distinguishes from siblings like generate_image and edit_image by highlighting the model and purpose.
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 explicitly mentions using DALL·E 2 as the only model supporting variations, guiding when to use this tool. It lacks explicit when-not-to-use or alternative tools, but provides clear context for appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
edit_imageEdit imageC
Edit one or more existing images using a text prompt and optional mask. Supports gpt-image-1.5, gpt-image-1, gpt-image-1-mini, and dall-e-2. Results are saved to disk and file paths are returned.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Description of the desired edit. | |
| images | Yes | Absolute paths to input image files (png/jpg/webp). Up to 16 for GPT Image. | |
| mask | No | Absolute path to a mask image. Transparent pixels indicate areas to edit. Must match the first input image's dimensions. | |
| model | No | Model to use. DALL·E 3 does not support edits. Defaults to env DALLE_DEFAULT_MODEL or gpt-image-1.5. | |
| size | No | ||
| quality | No | ||
| n | No | ||
| background | No | ||
| output_format | No | ||
| output_compression | No | ||
| input_fidelity | No | GPT Image only. 'high' preserves more of the original image. | |
| user | No | ||
| output_dir | No | ||
| filename_prefix | No | ||
| return_image_content | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions saving to disk and returning file paths, but does not disclose other behavioral traits such as destructiveness, permissions, or model-specific behaviors. The description is minimal.
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 concise with three sentences and front-loads the main action. It could be more structured but is efficient.
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 15 parameters, low schema coverage, no output schema, and sibling tools, the description is incomplete. It does not cover parameter details or usage contexts, leaving significant gaps for an agent.
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 only 33%, so the description should compensate. It only mentions 'text prompt' and 'optional mask', which are already captured in the schema. No additional meaning is provided for the other 13 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 the resource 'existing images' using a text prompt and optional mask. It distinguishes from siblings like 'generate_image' by focusing on existing images, but does not explicitly contrast.
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 its siblings. It does not mention alternative tools for generation or variation, leaving the agent without context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageGenerate imageB
Create one or more images from a text prompt using OpenAI's image models (gpt-image-1.5, gpt-image-1, gpt-image-1-mini, dall-e-3, dall-e-2). Images are saved to disk and file paths are returned.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the image to generate. | |
| model | No | Model to use. Defaults to env DALLE_DEFAULT_MODEL or gpt-image-1.5. | |
| size | No | Image dimensions. Allowed values depend on the model (see list_models). | |
| quality | No | GPT Image: auto|low|medium|high. DALL·E 3: standard|hd. DALL·E 2: standard. | |
| n | No | Number of images to generate. DALL·E 3 supports only 1. | |
| background | No | GPT Image only. Use 'transparent' with png/webp for alpha channel output. | |
| output_format | No | GPT Image only. Output file format. | |
| output_compression | No | GPT Image only. Compression % for jpeg/webp (0-100). | |
| moderation | No | GPT Image only. Content moderation strictness. | |
| style | No | DALL·E 3 only. Vivid = hyper-real/dramatic, natural = more muted. | |
| user | No | End-user identifier for OpenAI abuse monitoring. | |
| output_dir | No | Absolute directory to save generated images. Defaults to $DALLE_OUTPUT_DIR or ~/dalle-mcp-output. | |
| filename_prefix | No | Prefix used when naming saved files (alphanumeric/underscore/dash). | |
| return_image_content | No | If true, return the generated images as MCP image content blocks in addition to saving them to disk. Adds significant tokens. Default: false. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description mentions images are saved to disk and file paths returned, but lacks details on API calls, costs, or side effects. With no annotations, more behavioral context would be beneficial.
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?
Single sentence, concise and front-loaded. No wasted words, though could be slightly more structured.
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 14 parameters, no output schema, and zero annotations, the description is too minimal. Does not explain return format sufficiently (e.g., optional image content), error handling, or directory behavior.
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 coverage is 100%, so baseline is 3. Description adds no additional parameter information beyond what schema provides.
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?
Description clearly states 'Create one or more images from a text prompt' and lists specific models, distinguishing it from siblings like create_variation (variations) and edit_image (edits).
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?
No explicit guidance on when to use this tool versus alternatives like create_variation or edit_image. Agent must infer from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsList image modelsA
List supported OpenAI image models with their capabilities (sizes, qualities, edit/variation support, etc.). Use this before calling generate_image or edit_image to check which options a model accepts.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It does not explicitly state that the tool is read-only or non-destructive, which is expected for a listing operation. The behavioral disclosure 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?
Two sentences, front-loaded with the action and resource, no wasted words. Every sentence adds value.
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 no parameters and no output schema, the description covers the tool's purpose and usage context. It could mention the output format, but it's fairly complete for a simple list operation.
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 no parameters, and schema description coverage is 100%. The description adds no parameter info, which is acceptable since none exist. Baseline of 4 is appropriate.
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 uses a specific verb ('List') and resource ('supported OpenAI image models') and distinguishes from siblings by stating to use this tool before generate_image or edit_image to check model capabilities.
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 explicitly advises to use this tool before calling generate_image or edit_image, providing clear context. It does not list when not to use, but the guidance is clear enough.
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
v0.1.0- First observed
create_variation - First observed
edit_image - First observed
generate_image - First observed
list_models
TDQS
Each tool has a clearly distinct purpose: generating new images, editing existing ones, creating variations, and listing supported models. There is no overlap or confusion between them.
All tool names follow a consistent verb_noun pattern using snake_case (create_variation, edit_image, generate_image, list_models), making them predictable and easy to understand.
With 4 tools, the server is well-scoped for its purpose of generating and manipulating images via OpenAI's APIs. Each tool earns its place without unnecessary duplication or gaps.
The set covers the full lifecycle of image creation: generating, editing, and creating variations, along with a model listing tool for configuration. No obvious missing functionality for the intended domain.
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 Qwen Image 3 AI image generation
MCP server for NanoBanana AI image generation and editing
MCP server for Midjourney AI image generation and editing
MCP server for Flux AI image generation
Related MCP Servers
- FlicenseAqualityDmaintenanceAn 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.49-
- 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.401MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides tools to generate, edit, and create variations of images using OpenAI DALL-E models.-
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/sam-david/openai-images-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server