openai-imagegen-mcp
Provides tools for generating and editing images using OpenAI's gpt-image-1 model, with options for customization and local storage.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openai-imagegen-mcpGenerate a serene mountain landscape at sunset with transparent background, save as PNG"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenAI Image Generation MCP Server
A Model Context Protocol (MCP) Server that interfaces with the OpenAI API for image generation using the gpt-image-1 model.
Features
Generate images using OpenAI's gpt-image-1 model with various customization options
Edit images by providing source images and prompts
Save generated images to local storage in specified folders
Control image formats, quality, and background transparency
Related MCP server: MCP OpenAI Image Generation Server
Installation
Install uv
On Mac you can install it using homebrew
brew install uvUsage with Claude Code
Configure Claude Code to use this MCP server by updating your .cursor/mcp.json or other agent configuration:
{
"mcpServers": {
"openai-image": {
"command": "uv",
"args": [
"--directory",
"/Users/marabian/mcp-servers/openai-imagegen-mcp",
"run",
"mcp",
"run",
"main.py"
],
"env": {
"OPENAI_API_KEY": "your_api_key_here",
"DEFAULT_SAVE_DIR": "/path/to/default/save/directory"
}
}
}
}Important Configuration Notes:
Replace
your_api_key_herewith your actual OpenAI API key.For the
DEFAULT_SAVE_DIR:Set this to a directory where you want to save all generated images
You can use a relative path like
./imageswithin your projectFor projects, consider using a path like
${PROJECT_ROOT}/generated-imagesDefaults to
./imagesin the MCP server directory if not specified
When working in different projects:
The agent will save images to
DEFAULT_SAVE_DIRby defaultYou can override this within each tool call using the
save_dirparameterImages will be organized with unique timestamps to prevent conflicts
Available Tools
The OpenAI Image Generation MCP Server provides the following tools:
Image Generation
generate_image- Generate an image based on a text promptedit_image- Edit an existing image based on a new promptget_available_models- List available OpenAI image generation models
Image Management
list_saved_images- List images saved in the specified directoryset_save_directory- Set the directory where generated images will be saved
Examples
Generating an Image
# Generate a landscape image with transparent background
generate_image(
prompt="A serene mountain landscape at sunset",
size="1536x1024",
background="transparent",
output_format="png",
save_dir="/path/to/project/images",
filename="sunset_landscape"
)Editing Images
# Combine multiple source images into a new composition
edit_image(
prompt="Create a cohesive scene with these objects",
image_paths=["/path/to/image1.png", "/path/to/image2.png"],
quality="high",
save_dir="/path/to/project/edits",
filename="composed_scene"
)This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides tools for generating and editing images using OpenAI's gpt-image-1 model via an MCP interface, enabling AI assistants to create and modify images based on text prompts.15Apache 2.0
- Alicense-quality-maintenanceEnables AI assistants to generate and edit images through OpenAI's DALL-E models via MCP tools. Supports text-to-image generation and image-to-image editing with configurable parameters for size, quality, and style.
- Alicense-qualityDmaintenanceEnables image generation using OpenAI's DALL-E and GPT-Image models directly through the Model Context Protocol. It allows users to create and save images with fine-grained control over parameters like size, quality, and background transparency.86MIT
- AlicenseAqualityCmaintenanceEnables image generation and editing using OpenAI's GPT Image API (gpt-image-1, 1.5, 2) with support for multi-image generation, history management, and batch processing.12611MIT
Related MCP Connectors
Generate images, video, and audio with Glif's media-generation agent
LLM chat, text summarization and AI image generation
Generate logos, social posts, app screenshots, comic panels & visual-novel assets from prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/marabian/openai-imagegen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server