OpenAI GPT Image MCP
openai-gpt-image-mcp
OpenAI の GPT-4o/gpt-image-1 画像生成および編集 API 用のモデル コンテキスト プロトコル (MCP) ツール サーバー。
OpenAI の最新モデルを使用して、テキスト プロンプトから画像を生成します。
高度なプロンプト コントロールを使用して画像を編集します(インペインティング、アウトペインティング、合成)。
サポート対象: Claude Desktop、Cursor、VSCode、Windsurf、および MCP 互換クライアント。
✨ 特徴
create-image : プロンプトから、詳細オプション (サイズ、品質、背景など) を使用して画像を生成します。
edit-image : プロンプトとオプションのマスクを使用して画像を編集または拡張します。ファイル パスと base64 入力の両方をサポートします。
ファイル出力: 生成された画像を直接ディスクに保存するか、base64 として受け取ります。
Related MCP server: imagegen-mcp
🚀 インストール
git clone https://github.com/SureScaleAI/openai-gpt-image-mcp.git
cd openai-gpt-image-mcp
yarn install
yarn build🔑 構成
Claude Desktop または VSCode (Cursor/Windsurf を含む) の設定に追加します。
{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": { "OPENAI_API_KEY": "sk-..." }
}
}
}⚡ 上級
create-imageの場合、nを設定すると、一度に最大 10 枚の画像が生成されます。edit-imageには、編集を適用する場所を制御するためのマスク イメージ (ファイル パスまたは base64) を指定します。すべてのオプションについては、
src/index.ts参照してください。
🧑💻 開発
TypeScript ソース:
src/index.tsビルド:
yarn build実行:
node dist/index.js
📝 ライセンス
マサチューセッツ工科大学
🩺 トラブルシューティング
OPENAI_API_KEYが有効であり、イメージ API にアクセスできることを確認してください。認証済みのOpenAI組織が必要です。認証後、画像APIアクセスが有効になるまで15~20分かかる場合があります。
ファイル パスは絶対パスである必要があります。
ファイル出力の場合、ディレクトリが書き込み可能であることを確認してください。
ファイルの種類に関するエラーが表示される場合は、画像ファイルの拡張子と形式を確認してください。
⚠️ 制限事項と大きなファイルの処理
1MBのペイロード制限: MCPクライアント(Claude Desktopを含む)では、ツールレスポンスに1MBの厳格な制限があります。大きな画像(特に高解像度画像や複数の画像)をbase64で返すと、この制限を簡単に超えてしまう可能性があります。
**ファイル出力への自動切り替え:**画像サイズの合計が1MBを超える場合、ツールは自動的に画像をディスクに保存し、base64ではなくファイルパスを返します。これにより互換性が確保され、
result exceeds maximum length of 1048576といったエラーを回避できます。デフォルトのファイルの場所:
file_outputパスを指定しない場合、画像は一意のファイル名で/tmp(またはMCP_HF_WORK_DIR環境変数で設定されたディレクトリ) に保存されます。環境変数:
MCP_HF_WORK_DIR: 大きな画像やファイル出力の保存場所を制御するには、これを設定します。例:export MCP_HF_WORK_DIR=/your/desired/dir
**ベスト プラクティス:**大きな画像や実稼働画像の場合は、常にファイル出力を使用し、クライアントがファイル パスを処理できるように構成されていることを確認します。
📚 参考文献
🙏 クレジット
openai Node.js SDK を使用
SureScale.aiによって構築
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
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 AI images and videos from any compatible MCP client.
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
- 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-
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps OpenAI's image generation and editing APIs, enabling text-to-image and image-to-image operations via tools.20437ISC
- FlicenseAqualityDmaintenanceMCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.2-
- AlicenseAqualityDmaintenanceAn MCP server that generates and edits images using OpenAI's GPT Image model, allowing users to create images from text descriptions and edit existing images through natural language.117MIT
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/SureScaleAI/openai-gpt-image-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server