A Model Context Protocol (MCP) tool server for OpenAI's GPT-4o/gpt-image-1 image generation and editing APIs. - Generate images from text prompts using OpenAI's latest models. - Edit images (inpainting, outpainting, compositing) with advanced prompt control. - Supports: Claude Desktop, Cursor, VSCode, Windsurf, and any MCP-compatible client. - create-image: Generate images from a prompt, with adva
Add this skill
npx mdskills install SureScaleAI/openai-gpt-image-mcpWell-documented MCP server with clear setup, tool descriptions, and thoughtful handling of large file payloads
A Model Context Protocol (MCP) tool server for OpenAI's GPT-4o/gpt-image-1 image generation and editing APIs.
git clone https://github.com/SureScaleAI/openai-gpt-image-mcp.git
cd openai-gpt-image-mcp
yarn install
yarn build
Add to Claude Desktop or VSCode (including Cursor/Windsurf) config:
{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": { "OPENAI_API_KEY": "sk-..." }
}
}
}
Also supports Azure deployments:
{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": {
"AZURE_OPENAI_API_KEY": "sk-...",
"AZURE_OPENAI_ENDPOINT": "my.endpoint.com",
"OPENAI_API_VERSION": "2024-12-01-preview"
}
}
}
}
Also supports supplying an environment files:
{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js", "--env-file", "./deployment/.env"]
}
}
}
create-image, set n to generate up to 10 images at once.edit-image, provide a mask image (file path or base64) to control where edits are applied.--env-file path/to/file/.envsrc/index.ts for all options.src/index.tsyarn buildnode dist/index.jsMIT
OPENAI_API_KEY is valid and has image API access./ (e.g., /path/to/image.png): (e.g., C:/path/to/image.png or C:\path\to\image.png)result exceeds maximum length of 1048576.file_output path, images will be saved to /tmp (or the directory set by the MCP_HF_WORK_DIR environment variable) with a unique filename.MCP_HF_WORK_DIR: Set this to control where large images and file outputs are saved. Example: export MCP_HF_WORK_DIR=/your/desired/dirInstall via CLI
npx mdskills install SureScaleAI/openai-gpt-image-mcpOpenAI GPT Image MCP is a free, open-source AI agent skill. A Model Context Protocol (MCP) tool server for OpenAI's GPT-4o/gpt-image-1 image generation and editing APIs. - Generate images from text prompts using OpenAI's latest models. - Edit images (inpainting, outpainting, compositing) with advanced prompt control. - Supports: Claude Desktop, Cursor, VSCode, Windsurf, and any MCP-compatible client. - create-image: Generate images from a prompt, with adva
Install OpenAI GPT Image MCP with a single command:
npx mdskills install SureScaleAI/openai-gpt-image-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
OpenAI GPT Image MCP works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.