GPT Image 1 MCP
🚀 クイックスタート
npx -y @cloudwerxlab/gpt-image-1-mcp📋 前提条件
🔑 環境変数
💻 NPX の使用例
# Set your OpenAI API key
export OPENAI_API_KEY=sk-your-openai-api-key
# Optional: Set custom output directory
export GPT_IMAGE_OUTPUT_DIR=/home/username/Pictures/ai-generated-images
# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp# Set your OpenAI API key
$env:OPENAI_API_KEY = "sk-your-openai-api-key"
# Optional: Set custom output directory
$env:GPT_IMAGE_OUTPUT_DIR = "C:\Users\username\Pictures\ai-generated-images"
# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp:: Set your OpenAI API key
set OPENAI_API_KEY=sk-your-openai-api-key
:: Optional: Set custom output directory
set GPT_IMAGE_OUTPUT_DIR=C:\Users\username\Pictures\ai-generated-images
:: Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcpRelated MCP server: OpenAI MCP
🔌 MCPクライアントとの統合
🛠️ MCP クライアントでの設定
{
"mcpServers": {
"gpt-image-1": {
"command": "npx",
"args": [
"-y",
"@cloudwerxlab/gpt-image-1-mcp"
],
"env": {
"OPENAI_API_KEY": "PASTE YOUR OPEN-AI KEY HERE",
"GPT_IMAGE_OUTPUT_DIR": "OPTIONAL: PATH TO SAVE GENERATED IMAGES"
}
}
}
}さまざまなオペレーティングシステムの構成例
{
"mcpServers": {
"gpt-image-1": {
"command": "npx",
"args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
"env": {
"OPENAI_API_KEY": "sk-your-openai-api-key",
"GPT_IMAGE_OUTPUT_DIR": "C:\\Users\\username\\Pictures\\ai-generated-images"
}
}
}
}{
"mcpServers": {
"gpt-image-1": {
"command": "npx",
"args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
"env": {
"OPENAI_API_KEY": "sk-your-openai-api-key",
"GPT_IMAGE_OUTPUT_DIR": "/home/username/Pictures/ai-generated-images"
}
}
}
}注:Windowsのパスの場合、JSON内のバックスラッシュ文字をエスケープするには、二重のバックスラッシュ(
\\)を使用してください。Linux/macOSの場合は、スラッシュ(/)を使用してください。
✨ 特徴
💡 強化された機能
🔄仕組み
📁 出力ディレクトリの動作
インストールと使用方法
NPMパッケージ
このパッケージはnpmで入手可能です: @cloudwerxlab/gpt-image-1-mcp
グローバルにインストールできます:
npm install -g @cloudwerxlab/gpt-image-1-mcpまたは、クイック スタート セクションに示されているように、npx を使用して直接実行します。
ツール: create_image
テキストプロンプトに基づいて新しい画像を生成します。
パラメータ
パラメータ | タイプ | 必須 | 説明 |
| 弦 | はい | 生成する画像のテキスト説明(最大 32,000 文字) |
| 弦 | いいえ | 画像サイズ: 「1024x1024」(デフォルト)、「1536x1024」、または「1024x1536」 |
| 弦 | いいえ | 画像品質: 「高」(デフォルト)、「中」、または「低」 |
| 整数 | いいえ | 生成する画像の数(1~10、デフォルト:1) |
| 弦 | いいえ | 背景スタイル: 「透明」、「不透明」、または「自動」(デフォルト) |
| 弦 | いいえ | 出力形式: 「png」(デフォルト)、「jpeg」、または「webp」 |
| 整数 | いいえ | 圧縮レベル(0~100、デフォルト:0) |
| 弦 | いいえ | OpenAI 使用状況追跡用のユーザー識別子 |
| 弦 | いいえ | モデレーションレベル:「低」または「自動」(デフォルト) |
例
<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image</tool_name>
<arguments>
{
"prompt": "A futuristic city skyline at sunset, digital art",
"size": "1024x1024",
"quality": "high",
"n": 1,
"background": "auto"
}
</arguments>
</use_mcp_tool>応答
ツールは次を返します:
生成された画像の詳細を記載したフォーマットされたテキストメッセージ
base64でエンコードされたデータとしての画像
トークンの使用状況やファイルパスなどのメタデータ
ツール: create_image_edit
テキスト プロンプトとオプションのマスクに基づいて既存の画像を編集します。
パラメータ
パラメータ | タイプ | 必須 | 説明 |
| 文字列、オブジェクト、または配列 | はい | 編集する画像(base64文字列またはファイルパスオブジェクト) |
| 弦 | はい | 希望する編集のテキスト説明(最大 32,000 文字) |
| 文字列またはオブジェクト | いいえ | 編集する領域を定義するマスク(base64文字列またはファイルパスオブジェクト) |
| 弦 | いいえ | 画像サイズ: 「1024x1024」(デフォルト)、「1536x1024」、または「1024x1536」 |
| 弦 | いいえ | 画像品質: 「高」(デフォルト)、「中」、または「低」 |
| 整数 | いいえ | 生成する画像の数(1~10、デフォルト:1) |
| 弦 | いいえ | 背景スタイル: 「透明」、「不透明」、または「自動」(デフォルト) |
| 弦 | いいえ | OpenAI 使用状況追跡用のユーザー識別子 |
Base64エンコードされた画像の例
<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image_edit</tool_name>
<arguments>
{
"image": "BASE64_ENCODED_IMAGE_STRING",
"prompt": "Add a small robot in the corner",
"mask": "BASE64_ENCODED_MASK_STRING",
"quality": "high"
}
</arguments>
</use_mcp_tool>ファイルパスの例
<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image_edit</tool_name>
<arguments>
{
"image": {
"filePath": "C:/path/to/your/image.png"
},
"prompt": "Add a small robot in the corner",
"mask": {
"filePath": "C:/path/to/your/mask.png"
},
"quality": "high"
}
</arguments>
</use_mcp_tool>応答
ツールは次を返します:
編集された画像の詳細を記載したフォーマットされたテキストメッセージ
編集された画像はbase64でエンコードされたデータとして
トークンの使用状況やファイルパスなどのメタデータ
🔧 トラブルシューティング
🚨 よくある問題
🔍 エラー処理とレポート
MCPサーバーには、問題発生時に詳細な情報を提供する包括的なエラー処理機能が搭載されています。エラーが発生すると、以下の処理が行われます。
エラー形式: すべてのエラーは次の形式で返されます:
何が問題だったのかを説明する明確なエラーメッセージ
特定のエラーコードまたはタイプ
エラーに関する追加のコンテキスト(利用可能な場合)
AI アシスタントの動作: この MCP サーバーを AI アシスタントと共に使用する場合:
AIは常に完全なエラーメッセージを報告し、トラブルシューティングを支援します。
AIはエラーの原因を分かりやすい言葉で説明する
AIは問題を解決するための具体的な手順を提案します
📄 ライセンス
🙏 謝辞
Available Tools
2 toolscreate_imageD
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| background | No | ||
| n | No | ||
| output_compression | No | ||
| output_format | No | ||
| quality | No | ||
| size | No | ||
| user | No | ||
| moderation | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_image_editD
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| prompt | Yes | ||
| background | No | ||
| mask | No | ||
| n | No | ||
| quality | No | ||
| size | No | ||
| user | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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?
Tool has no description.
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.
2 tool updates
- First observed
create_image - First observed
create_image_edit
TDQS
Scored across 2 tools
The two tools have overlapping purposes—both involve creating images—and without descriptions, it's unclear how they differ. 'create_image_edit' suggests editing an existing image, but this could easily be confused with the base 'create_image' tool, leading to potential misselection.
Both tools follow a consistent verb_noun pattern with 'create_image' as the base, and 'create_image_edit' extends this logically. The naming is predictable and clear, with no deviations in style or convention.
With only 2 tools, the server feels thin for an image-related domain, which typically requires operations like listing, retrieving, updating, or deleting images. This limited set may not support common workflows, making it under-scoped.
The tool surface is severely incomplete for an image server; there are no tools for reading, updating, deleting, or managing images beyond creation and editing. This will cause significant agent failures in handling image lifecycles or varied tasks.
Maintenance
Related MCP Connectors
MCP server for NanoBanana AI image generation and editing
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
MCP server for Qwen Image 3 AI image generation
Generate AI images and videos from any compatible MCP client.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.18MIT
- AlicenseNot gradedqualityFmaintenanceA 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.19 npm1MIT
- AlicenseDqualityDmaintenanceA Model Context Protocol server that provides image generation capabilities using Google's Gemini 2 API, allowing users to generate multiple images with customizable parameters like prompts, aspect ratios, and person generation settings.188 npm5MIT
- AlicenseBqualityCmaintenanceA Model Context Protocol server that provides OpenAI's DALL-E 3 image generation capabilities, allowing LLMs to generate high-quality images through a standardized interface.18 npm1MIT