openai-gpt-image-mcp

openai-gpt-image-mcp

25

This project is a server implementing the Model Context Protocol for handling image generation and editing functionalities using OpenAI's GPT models. It provides robust features for creating and editing images and integrates easily with various MCP-compatible clients.

What should I do if my OPENAI_API_KEY is not working?

Ensure your API key is valid and has access to the image API. Verify your OpenAI organization and wait 15–20 minutes for access to activate.

How do I handle large image files?

For large images, use file output to save images to disk. Set the MCP_HF_WORK_DIR environment variable to control the save location.

What is the payload limit for MCP clients?

MCP clients have a 1MB limit for tool responses. If the image size exceeds this limit, the tool will save images to disk and return the file path.

How can I ensure file paths are correctly formatted?

Use absolute paths. On Unix/macOS/Linux, start with '/'. On Windows, use a drive letter followed by ':'.

What should I do if I encounter file type errors?

Check your image file extensions and formats to ensure compatibility.