Skip to main content
Glama

openai-images-mcp

OpenAIのgpt-imageおよびDALL·Eモデルを使用して画像を生成・編集します。これらはModel Context Protocolツールとして公開されています。gpt-image-1.5gpt-image-1gpt-image-1-minidall-e-3dall-e-2をサポートしています。

ツール

ツール

目的

モデル

list_models

サポートされているモデルとその機能(サイズ、品質、編集/バリエーションのサポート)を一覧表示します。

すべて

generate_image

テキストプロンプトから1つ以上の画像を生成します。

gpt-image-1.5, gpt-image-1, gpt-image-1-mini, dall-e-3, dall-e-2

edit_image

プロンプトとオプションのマスクを使用して既存の画像を編集します。

gpt-image-1.5, gpt-image-1, gpt-image-1-mini, dall-e-2

create_variation

画像のバリエーションを生成します。

dall-e-2 のみ

生成されたすべてのファイルはディスクに保存されます。呼び出し時に return_image_content: true を設定すると、MCP画像ブロックとして画像を受け取ることもできます(クライアントが結果を「見る」必要がある場合に便利ですが、トークンを多く消費します)。

インストール

npm install
npm run build

MCPクライアントの設定

Claude Desktop / Claude Code

claude_desktop_config.json(またはプロジェクトの .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"
      }
    }
  }
}

環境変数

変数

目的

OPENAI_API_KEY

必須。 OpenAI APIキー。

OPENAI_BASE_URL

オプション。OpenAIのベースURLを上書きします。

OPENAI_ORG_ID

オプション。

OPENAI_PROJECT_ID

オプション。

DALLE_OUTPUT_DIR

オプション。保存された画像のデフォルトディレクトリ。デフォルトは ~/dalle-mcp-output です。

DALLE_DEFAULT_MODEL

オプション。ツール呼び出しで model が省略された場合に使用されるモデル。デフォルトは gpt-image-1.5 です。

ツールリファレンス

generate_image

必須: prompt

オプション: model, size, quality, n, background, output_format, output_compression, moderation, style, user, output_dir, filename_prefix, return_image_content

モデル固有の注意点:

  • GPT Image (gpt-image-1.5, gpt-image-1, gpt-image-1-mini): サイズ auto|1024x1024|1536x1024|1024x1536、品質 auto|low|medium|highbackground, output_format, output_compression, moderation をサポート。

  • DALL·E 3: サイズ 1024x1024|1792x1024|1024x1792、品質 standard|hdn は1である必要があり、style をサポート。

  • DALL·E 2: サイズ 256x256|512x512|1024x1024、品質 standard

edit_image

必須: prompt, images(絶対パス、GPT Imageの場合は最大16個まで)。

オプション: mask(透明なピクセルが編集可能な領域を示します)、および上記の生成オプション。DALL·E 3は編集をサポートしていません。

create_variation

DALL·E 2のみ。必須: image(PNG、正方形、4MB未満)。

オプション: n, size (256x256|512x512|1024x1024), output_dir, filename_prefix, return_image_content

list_models

引数なし。各モデルのサイズ、品質、サポートされているオプションを記述したJSONドキュメントを返します。パラメータを選択する前に呼び出し元が確認するのに便利です。

開発

npm run dev     # run with tsx, no build step
npm run build   # tsc to dist/
npm start       # node dist/index.js

サーバーはstdio経由でMCPと通信するため、MCP互換クライアントで操作するか、node dist/index.js にJSON-RPCメッセージをパイプすることで手動で操作できます。

注意点

  • DALL·E 2およびDALL·E 3はOpenAIによって非推奨となっており、サポートは 2026年5月12日 に終了します。GPT Imageファミリーの使用を推奨します。

  • GPT Imageモデルは常にbase64データを返します。DALL·Eモデルもbase64を要求するようにしているため、2回目のHTTPラウンドトリップなしでファイルを保存できます。

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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