gpt-image-mcp
Click on "Deploy 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., "@gpt-image-mcpGenerate a landscape image of a mountain at sunset."
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.
gpt-image MCP
MCP server for AI-powered image generation using OpenAI's gpt-image-1 and gpt-image-2 models with advanced text rendering and native transparency support.
Features
Advanced text rendering with gpt-image-1 - Crisp, legible typography and logos in generated images
Native transparency support - Built-in transparent background without post-processing
Multi-format output (PNG, JPEG, WebP) - Flexible format options with optimized compression
Flexible dimensions and aspect ratios - Square (1024×1024), landscape (1536×1024), and portrait (1024×1536)
Batch image editing capabilities - Process multiple images with parallel processing
Token-optimized MCP responses - Efficient response formats for MCP protocol limits
Related MCP server: GPT-Image-1 MCP Server
Installation
Recommended: Using npx
{
"mcpServers": {
"gpt-image-mcp": {
"command": "npx",
"args": ["@napolab/gpt-image-mcp"],
"env": {
"OPENAI_API_KEY": "sk-your-api-key"
}
}
}
}Alternative: Local Installation
npm install -g @napolab/gpt-image-mcpClaude Desktop Configuration
Configure in ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"gpt-image-mcp": {
"command": "npx",
"args": ["@napolab/gpt-image-mcp"],
"env": {
"OPENAI_API_KEY": "sk-your-api-key"
}
}
}
}Configuration
Environment Variables
Variable | Required | Default | Description |
| Yes | - | Your OpenAI API key |
| No |
| Default output directory |
| No |
| Default image dimensions |
| No |
| Default quality (standard/hd) |
| No |
| Default format (png/jpeg/webp) |
Available Tools
generate-image
Generate images using gpt-image-1 with advanced text rendering and superior instruction following.
Parameters:
Parameter | Type | Required | Default | Description |
| string | Yes | - | Image description (English only) |
| string | No |
| "square", "landscape", or "portrait" |
| string | No |
| "standard" or "hd" |
| string | No |
| Directory to save the image |
| string | No | - | Custom filename |
| boolean | No |
| Whether to save locally |
| boolean | No |
| Include base64 in response |
Example:
await client.callTool("generate-image", {
prompt: "A serene Japanese garden with cherry blossoms",
aspect_ratio: "landscape",
quality: "hd",
});edit-image
Edit existing images with AI-powered modifications including inpainting, outpainting, style transfer, and background changes.
Parameters:
Parameter | Type | Required | Default | Description |
| object | Yes | - | Image input (URL, base64, or local file) |
| string | Yes | - | Description of desired changes (English only) |
| string | Yes | - | Type of edit to perform |
| number | No |
| Edit strength (0.0 to 1.0) |
| boolean | No |
| Maintain original composition |
| string | No |
| Output format |
Edit Types:
inpaint- Fill in or modify specific areasoutpaint- Extend image beyond boundariesbackground_change- Replace or modify backgroundstyle_transfer- Apply artistic stylesobject_removal- Remove unwanted objectsvariation- Create variations of original
Example:
await client.callTool("edit-image", {
source_image: {
type: "local",
value: "/path/to/image.jpg",
},
edit_prompt: "Add a sunset sky background",
edit_type: "background_change",
});batch-edit
Apply the same edit to multiple images efficiently with parallel processing.
Parameters:
Parameter | Type | Required | Default | Description |
| array | Yes | - | Array of image inputs |
| string | Yes | - | Edit description (English only) |
| string | Yes | - | Type of edit to apply |
| object | No | - | Batch processing configuration |
Example:
await client.callTool("batch-edit", {
images: [
{ type: "local", value: "/path/to/image1.jpg" },
{ type: "local", value: "/path/to/image2.jpg" },
],
edit_prompt: "Apply vintage sepia filter",
edit_type: "style_transfer",
});Usage Examples
Basic Image Generation
// Generate a simple image
const result = await client.callTool("generate-image", {
prompt: "A modern minimalist logo design",
aspect_ratio: "square",
quality: "hd",
});
console.log("Generated image:", result.data.file_path);Advanced Options
// Generate with all parameters
const result = await client.callTool("generate-image", {
prompt: "Professional product photography of a smartphone",
aspect_ratio: "portrait",
quality: "hd",
output_directory: "./product_images",
filename: "smartphone_hero",
output_format: "png",
include_base64: true,
});Image Editing
// Generate base image
const baseImage = await client.callTool("generate-image", {
prompt: "A mountain landscape",
aspect_ratio: "landscape",
});
// Edit the generated image
const editedImage = await client.callTool("edit-image", {
source_image: {
type: "local",
value: baseImage.data.file_path,
},
edit_prompt: "Add dramatic storm clouds",
edit_type: "background_change",
strength: 0.7,
});Batch Processing
// Process multiple images
const result = await client.callTool("batch-edit", {
images: [
{ type: "local", value: "image1.jpg" },
{ type: "local", value: "image2.jpg" },
{ type: "local", value: "image3.jpg" },
],
edit_prompt: "Apply Instagram-style filter",
edit_type: "style_transfer",
batch_settings: {
max_concurrent: 3,
error_handling: "continue_on_error",
},
});Development
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests for new functionality
Submit a pull request
Testing
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Run linting
npm run lint
# Type checking
npm run typecheckBuilding
# Build for production
npm run build
# Development mode with hot reload
npm run devLicense
MIT License - see the LICENSE file for details.
Support
Documentation - Full documentation and examples
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
MCP server for NanoBanana AI image generation and editing
MCP server for Flux AI image generation
MCP server for OpenAI Sora AI video generation
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.69-
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that enables high-quality image generation using OpenAI's GPT-Image-1 model with support for style variations and HD quality. It automatically downloads and saves generated images to a local directory as PNG files while managing metadata and batch processing.-
- AlicenseAqualityDmaintenanceAn MCP server for image generation, editing, and analysis using OpenAI's gpt-image-1 model, with specialized templates for YouTube thumbnails, blog headers, social media, and more.7MIT
- FlicenseAqualityDmaintenanceMCP server for AI image generation supporting text-to-image and image-to-image editing via any OpenAI-compatible service, with configurable models, aspect ratios, and sizes.2-