openai-gpt-image-mcp Details
A Model Context Protocol (MCP) tool server designed for OpenAI's GPT-4o and gpt-image-1 image generation and editing APIs. This MCP server exposes image-generation capabilities via two primary tools, create-image and edit-image, enabling developers to generate images from prompts and perform inpainting, outpainting, or compositing edits with fine-grained prompt control. It also provides file-output options so generated content can be saved to disk or returned as base64, and it supports a range of MCP-compatible clients, including Claude Desktop, Cursor, VSCode, Windsurf, among others. Built on the MCP SDK and OpenAI and OpenAI-compatible tooling, this server offers a ready-to-run solution for integrating image APIs into MCP-enabled workflows.
Use Case
This MCP server provides a compact, pluggable endpoint for generating and editing images via MCP clients. It exposes two concrete MCP tools: create-image and edit-image. The server handles requests from MCP clients and returns image data either as base64 or via file paths, depending on payload size and client configuration. The configuration examples demonstrate how to wire the MCP into Claude Desktop or VS Code, including optional Azure deployment options. Example usage from the documentation shows how to configure and run the server, making it straightforward to integrate OpenAI image APIs into your MCP-based tooling. Key snippets include installation steps, MCP server configuration, and environment-variable-based deployment for Azure or local environments.
Available Tools (2)
Examples & Tutorials
Installation:
git clone https://github.com/SureScaleAI/openai-gpt-image-mcp.git
cd openai-gpt-image-mcp
yarn install
yarn buildConfiguration (Claude Desktop / VS Code):
{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js"],
"env": { "OPENAI_API_KEY": "sk-..." }
}
}
}Azure deployment example:
{
"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"
}
}
}
}Env-file usage:
{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": ["/absolute/path/to/dist/index.js", "--env-file", "./deployment/.env"]
}
}
}Run locally:
node dist/index.jsInstallation Guide
1) Clone the repository and install dependencies:
git clone https://github.com/SureScaleAI/openai-gpt-image-mcp.git
cd openai-gpt-image-mcp
yarn install
yarn build2) Run the MCP server:
node dist/index.jsIntegration Guides
Frequently Asked Questions
Is this your MCP?
Claim ownership and get verified badge
1MB Payload Limit: MCP clients (including Claude Desktop) have a hard 1MB limit for tool responses. Large images (especially high-res or multiple images) can easily exceed this limit if returned as base64. Auto-Switch to File Output: If the total image size exceeds 1MB, the tool will automatically save images to disk and return the file path(s) instead of base64. Default File Location: If you do not specify a file_output path, images will be saved to /tmp (or the directory set by MCP_HF_WORK_DIR) with a unique filename. Environment Variable: MCP_HF_WORK_DIR: Set this to control where large images and file outputs are saved. Best Practice: For large or production images, always use file output and ensure your client is configured to handle file paths.
OPENAI_API_KEY must be valid and have image API access. You must have a verified OpenAI organization. File paths must be absolute. When outputting files, ensure the directory is writable. For Azure deployments, provide AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, and OPENAI_API_VERSION as needed. You can also supply an environment file via --env-file.
Compare Alternatives
Similar MCP Tools
6 related toolsAnki MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to interact with Anki, the spaced repetition flashcard application. The Anki MCP Server allows AI models to access Anki's card data, enabling features like automated flashcard creation, review, and management.
1MCP Agent
A unified Model Context Protocol server implementation that aggregates multiple MCP servers into one. The 1mcp-app/agent is an open-source project that provides a single entry point for multiple MCP servers, making it easier to manage and interact with various AI models and tools.
Roundtable AI MCP Server
Roundtable AI MCP Server is a zero-configuration local MCP server that unifies multiple AI coding assistants (Codex, Claude Code, Cursor, Gemini) through intelligent auto-discovery and a standardized interface. It coordinates specialized sub-agents from within your IDE to solve engineering problems in parallel, sharing context and synthesizing responses into a single, high-quality output. This documentation details installation, available MCP tools, integration with popular IDEs, and a broad ecosystem of specialized tools and CLIs that can be invoked as part of a roundtable-powered workflow, enabling developers to delegate tasks to the right AI for each facet of a problem without leaving their development environment.
MCPJungle
MCPJungle is a self-hosted MCP Gateway and Registry for AI agents. It serves as a central registry and gateway to manage Model Context Protocol (MCP) servers and the tools they expose. By consolidating MCP server registration, tool discovery, and access control, MCPJungle enables AI agents and clients to discover, group, and securely invoke tools from a single, unified gateway. The project provides a CLI, Docker-based deployment options, and enterprise-ready features such as tool grouping, access control, and observability to streamline MCP-based workflows across organizations.
mcpmcp-server
mcpmcp-server is a focused solution for discovering, setting up, and integrating MCP servers with your favorite clients to unlock AI-powered workflows. It streamlines how you connect MCP-powered servers to popular clients, enabling seamless AI-assisted interactions across your daily tools. The project emphasizes an approachable, config-driven approach to linking MCP servers with clients like Claude Desktop, while directing you to the homepage for variations across apps and platforms. This README highlights a practical JSON configuration example and notes on supported environments, helping you get started quickly and confidently.
Imagen3-MCP
Imagen3-MCP is an image generation service based on Google's Imagen 3.0 that exposes its functionality through MCP (Model Control Protocol). The project provides a server to run a local MCP service that accesses Google Gemini-powered image generation, enabling developers to integrate advanced image synthesis into their applications. The documentation covers prerequisites (Gemini API key), installation steps for Cherry Studio, and a Cursor-based JSON configuration example for embedding the MCP server in broader tooling. This MCP is designed to be deployment-friendly, with configurable environment variables and optional proxy settings to adapt to various network environments.