DALL-E MCP Server
DALL-E MCP サーバー
OpenAI の DALL-E API を使用して画像を生成するための MCP (Model Context Protocol) サーバー。
特徴
DALL-E 2またはDALL-E 3を使用して画像を生成する
既存の画像を編集する(DALL-E 2のみ)
既存の画像のバリエーションを作成する(DALL-E 2 のみ)
OpenAI APIキーを検証する
Related MCP server: GPT Image MCP Server
インストール
# Clone the repository
git clone https://github.com/Garoth/dalle-mcp.git
cd dalle-mcp
# Install dependencies
npm install
# Build the project
npm run buildClineユーザーへの重要なお知らせ
このDALL-E MCPサーバーをClineで使用する場合は、 saveDirパラメータを現在の作業ディレクトリに設定し、生成された画像を現在のワークスペースディレクトリに保存することをお勧めします。これにより、Clineは会話の中で生成された画像を適切に見つけて表示できるようになります。
Cline での使用例:
{
"prompt": "A tropical beach at sunset",
"saveDir": "/path/to/current/workspace"
}使用法
サーバーの実行
# Run the server
node build/index.jsCline の構成
VSCode の設定内の Cline MCP 設定ファイルに dall-e サーバーを追加します (例: ~/.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": []
}
}
}必ず次の点に注意してください:
/path/to/dalle-mcp-server/build/index.jsを、ビルドされた index.js ファイルへの実際のパスに置き換えます。your-api-key-hereを OpenAI API キーに置き換えます
利用可能なツール
画像を生成する
テキストプロンプトに基づいて DALL-E を使用して画像を生成します。
{
"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"
}パラメータ:
prompt(必須): 希望する画像のテキスト説明model(オプション): 使用する DALL-E モデル (「dall-e-2」または「dall-e-3」、デフォルト: 「dall-e-3」)size(オプション): 生成される画像のサイズ (デフォルト: "1024x1024")DALL-E 3: 「1024x1024」、「1792x1024」、または「1024x1792」
DALL-E 2: 「256x256」、「512x512」、または「1024x1024」
quality(オプション):生成される画像の品質、DALL-E 3のみ(「標準」または「hd」、デフォルト:「標準」)style(オプション):生成される画像のスタイル、DALL-E 3のみ(「鮮明」または「自然」、デフォルト:「鮮明」)n(オプション): 生成する画像の数 (1-10、デフォルト: 1)saveDir(オプション): 生成された画像を保存するディレクトリ (デフォルト: 現在のディレクトリ、または.env の SAVE_DIR)。Cline**ユーザーの場合:**画像を正しく表示するために、現在のワークスペースディレクトリに設定することをお勧めします。fileName(オプション): 拡張子なしの生成された画像の基本ファイル名 (デフォルト: "dalle-{timestamp}")
編集画像
テキスト プロンプトに基づいて DALL-E を使用して既存の画像を編集します。
⚠️ 既知の問題(2025年3月18日): DALL-E 2 画像編集 API には現在、適切な RGBA 形式の画像とマスクを使用しているにもかかわらず、プロンプトを無視して編集されていない元の画像を返すことがあるというバグがあります。この問題はOpenAI コミュニティフォーラムで報告されています。この問題が発生した場合は、代わりに
create_variationツールをお試しください。こちらの方がより確実に動作するようです。
{
"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"
}パラメータ:
prompt(必須): 希望する編集内容のテキスト説明imagePath(必須): 編集する画像へのパスmask(オプション):マスク画像へのパス(白い領域は編集され、黒い領域は保持されます)model(オプション):使用する DALL-E モデル(現在は「dall-e-2」のみが編集をサポートしています。デフォルト:「dall-e-2」)size(オプション): 生成される画像のサイズ (デフォルト: "1024x1024")n(オプション): 生成する画像の数 (1-10、デフォルト: 1)saveDir(オプション): 編集した画像を保存するディレクトリ (デフォルト: 現在のディレクトリ、または.env の SAVE_DIR)。Cline**ユーザーの場合:**画像を正しく表示するために、現在のワークスペースディレクトリに設定することをお勧めします。fileName(オプション): 編集した画像の基本ファイル名(拡張子なし)(デフォルト: "dalle-edit-{timestamp}")
バリエーションを作成する
DALL-E を使用して既存の画像のバリエーションを作成します。
{
"imagePath": "/path/to/image.png",
"model": "dall-e-2",
"size": "1024x1024",
"n": 4,
"saveDir": "/path/to/save/directory",
"fileName": "image-variation"
}パラメータ:
imagePath(必須): バリエーションを作成するための画像へのパスmodel(オプション): 使用する DALL-E モデル (現在は「dall-e-2」のみがバリエーションをサポートしています。デフォルト: 「dall-e-2」)size(オプション): 生成される画像のサイズ (デフォルト: "1024x1024")n(オプション): 生成するバリエーションの数 (1-10、デフォルト: 1)saveDir(オプション): バリエーション画像を保存するディレクトリ (デフォルト: 現在のディレクトリ、または.env の SAVE_DIR)。Cline**ユーザーの場合:**画像を正しく表示するために、現在のワークスペースディレクトリに設定することをお勧めします。fileName(オプション): 拡張子なしのバリエーション画像の基本ファイル名 (デフォルト: "dalle-variation-{timestamp}")
検証キー
OpenAI API キーを検証します。
{}パラメータは必要ありません。
発達
テスト構成
注意: 次の .env 構成は、通常の操作ではなく、テストの実行にのみ必要です。
このプロジェクトのテストを開発または実行している場合は、ルート ディレクトリに OpenAI API キーを使用して.envファイルを作成します。
# 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/directoryCline で通常の操作を行うには、上記の「MCP 設定への追加」セクションで説明されているように、MCP 設定 JSON で API キーを構成します。
API キーはOpenAI の API キー ページから取得できます。
テストの実行
# 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"注: テストでは実際の API 呼び出しが使用されるため、OpenAI アカウントに料金が発生する可能性があります。
テスト画像の生成
このプロジェクトには、開発とテスト用のテスト イメージを生成するスクリプトが含まれています。
# Generate a test image in the assets directory
npm run generate-test-imageこれにより、編集機能とバリエーション機能をテストするために使用できる単純なテスト イメージがassetsディレクトリに作成されます。
ライセンス
マサチューセッツ工科大学
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.
4 tool updates
- First observed
create_variation - First observed
edit_image - First observed
generate_image - First observed
validate_key
TDQS
Scored across 4 tools
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
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.115MIT
- 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.70-
- 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.29 npm1MIT
- 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.24-