
How to add openai-gpt-image-mcp to Claude Desktop
MCP server for OpenAI GPT-4o / gpt-image-1 image generation and editing. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 102โ ยท stdio ยท apikey
Claude Desktop config for openai-gpt-image-mcp
git clone https://github.com/SureScaleAI/openai-gpt-image-mcp.git && cd openai-gpt-image-mcp && yarn install && yarn build{
"mcpServers": {
"openai-gpt-image-mcp": {
"command": "node",
"args": [
"/absolute/path/to/dist/index.js"
],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the openai-gpt-image-mcp config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm openai-gpt-image-mcp's tools appear under the ๐ tools menu.
Before you start
- Node.js (to run the built dist/index.js)
- Yarn (for install and build)
- An OpenAI API key with image API access (OPENAI_API_KEY), or Azure OpenAI credentials (AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, OPENAI_API_VERSION)
- A verified OpenAI organization (image API access can take 15โ20 minutes to activate after verification)
What openai-gpt-image-mcp can do in Claude Desktop
create-imageGenerate images from a text prompt, with advanced options (size, quality, background, etc). Set n to generate up to 10 images at once. Output can be returned as base64 or saved to disk.
edit-imageEdit or extend images using a prompt and an optional mask (inpainting, outpainting, compositing). Supports both file path and base64 input; provide a mask image to control where edits are applied.
Security
Requires an OpenAI API key (OPENAI_API_KEY) or Azure OpenAI credentials, supplied via the client config env block or an --env-file. Your OpenAI organization must be verified to access the image API; activation can take 15โ20 minutes after verification. The key grants billable access to OpenAI's image APIs, so keep it scoped and out of source control.
openai-gpt-image-mcp + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the openai-gpt-image-mcp config there under the "mcpServers" key and restart the client.
Is openai-gpt-image-mcp safe to use with Claude Desktop?
Requires an OpenAI API key (OPENAI_API_KEY) or Azure OpenAI credentials, supplied via the client config env block or an --env-file. Your OpenAI organization must be verified to access the image API; activation can take 15โ20 minutes after verification. The key grants billable access to OpenAI's image APIs, so keep it scoped and out of source control.
Which models and providers are supported?
It targets OpenAI's GPT-4o / gpt-image-1 image generation and editing APIs, and also supports Azure OpenAI deployments by supplying AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, and OPENAI_API_VERSION.
How are large images handled?
MCP clients have a hard 1MB limit for tool responses. If the total image size exceeds 1MB, the server automatically saves images to disk and returns the file path(s) instead of base64. Set MCP_HF_WORK_DIR to control where files are saved (defaults to /tmp).
Why can't I access the image API even with a valid key?
You must have a verified OpenAI organization. After verifying, it can take 15โ20 minutes for image API access to activate. Also ensure file paths passed to the tools are absolute.