- Explore MCP Servers
- mcp-gpt-image
Mcp Gpt Image
What is Mcp Gpt Image
mcp-gpt-image is an MCP server designed for generating and editing images using the OpenAI API. It allows users to create new images from text prompts and edit existing images based on user-defined modifications.
Use cases
Use cases include generating unique artwork, creating variations of existing images, and role-playing as a designer to visualize concepts based on specific prompts.
How to use
To use mcp-gpt-image, you can either pull the Docker image and configure it with your OpenAI API key and image directory, or use npx to run the package directly with the required environment variables.
Key features
Key features include image generation from text prompts, image editing based on text descriptions, and the ability to save generated images along with scaled-down preview images.
Where to use
mcp-gpt-image can be used in various fields such as graphic design, content creation, marketing, and any application that requires image generation or modification based on textual input.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Gpt Image
mcp-gpt-image is an MCP server designed for generating and editing images using the OpenAI API. It allows users to create new images from text prompts and edit existing images based on user-defined modifications.
Use cases
Use cases include generating unique artwork, creating variations of existing images, and role-playing as a designer to visualize concepts based on specific prompts.
How to use
To use mcp-gpt-image, you can either pull the Docker image and configure it with your OpenAI API key and image directory, or use npx to run the package directly with the required environment variables.
Key features
Key features include image generation from text prompts, image editing based on text descriptions, and the ability to save generated images along with scaled-down preview images.
Where to use
mcp-gpt-image can be used in various fields such as graphic design, content creation, marketing, and any application that requires image generation or modification based on textual input.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
mcp-gpt-image
An MCP server for generating and editing images using the OpenAI API.
Generated images are saved in the specified directory and returned along with scaled-down preview images.
Key Features
1. Image Generation (generate_image)
Generates new images from text prompts.
Input Parameters:
prompt: Description of the image you want to generate (required)size: Output image size (optional, default: “auto”)- “1024x1024”
- “1536x1024”
- “1024x1536”
- “auto”
2. Image Editing (edit_image)
Edits existing images based on text prompts.
Input Parameters:
image: File path of the image to edit (required)prompt: Text prompt describing the desired edits (required)
Usage Examples
Generating Variations
https://github.com/user-attachments/assets/c0f69b09-237f-4cc4-96cc-f528d36b1fa9
Role-playing as a Designer
https://github.com/user-attachments/assets/91ded8fb-b372-4020-a326-788c38670edc
Installation
Using Docker
- Pull the Docker image
docker pull 4kk11/mcp-gpt-image
- Configuration example (claude_desktop_config.json)
{
"mcpServers": {
"gpt-image": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"YOUR_IMAGES_DIR:/app/temp",
"-e",
"OPENAI_API_KEY=YOUR_API_KEY",
"4kk11/mcp-gpt-image"
]
}
}
}
Using npx
Configuration example (claude_desktop_config.json):
{
"mcpServers": {
"gpt-image": {
"command": "npx",
"args": [
"-y",
"mcp-gpt-image"
],
"env": {
"OPENAI_API_KEY": "YOUR_API_KEY",
"IMAGES_DIR": "YOUR_IMAGES_DIR"
}
}
}
}
Environment Variables
| Variable Name | Description | Default Value |
|---|---|---|
| OPENAI_API_KEY | OpenAI API key (required) | - |
| IMAGES_DIR | Path to directory for saving generated/edited images | ./temp |
For Developers
Building and Managing Docker Images
# Build Docker image
make docker-build
# Remove Docker image
make docker-clean
{
"mcpServers": {
"gpt-image": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"YOUR_IMAGES_DIR:/app/temp",
"-e",
"OPENAI_API_KEY",
"mcp-gpt-image"
],
"env": {
"OPENAI_API_KEY": "YOUR_API_KEY"
}
}
}
}
License
This project is released under the MIT License. See LICENSE file for details.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










