Overview
This MCP tool server enables image generation and editing via OpenAI's GPT-4o/gpt-image-1 image APIs within the Model Context Protocol. It supports generating images from prompts with advanced options such as size, quality, and background, and can edit or extend images using a prompt with an optional mask, accepting input as file paths or base64. Outputs can be saved directly to disk or returned as base64, with automatic file-output when payloads exceed MCP size limits. The server is designed to work with Claude Desktop, Cursor, VSCode, Windsurf, and any MCP-compatible client. It includes guidance for installation and configuration, including local deployment and Azure deployments, with environment variable support (OPENAI_API_KEY, AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, OPENAI_API_VERSION) and optional env-file usage. Development and run instructions are provided (TypeScript source at src/index.ts, build with yarn, run with node dist/index.js). File paths must be absolute, and a default file location is /tmp or a directory specified by MCP_HF_WORK_DIR. The server relies on the MCP SDK and OpenAI Node.js SDK for image API access.
Features
create-image
Generate images from prompts with advanced options such as size, quality, and background control.
edit-image
Edit or extend images using a prompt and optional mask, supporting file paths and base64 input.
File output
Save generated images to disk or return them as base64, with automatic file-output for large payloads.
Who Is This For?
- MCP clients:Integrate with Claude Desktop, Cursor, VSCode, Windsurf, or any MCP-compatible client to access image generation/editing via the MCP server.
- Developers:Configure and deploy MCP servers for image generation/editing using OpenAI APIs.




