GPT Image Generator

GPT Image Generator

cloudwerx-dev

Connects to OpenAI's gpt-image-1 model to generate and edit images from text prompts, file paths, or base64 inputs. Provides direct image creation capabilities through the Model Context Protocol.

Enables direct image generation and editing through OpenAI's gpt-image-1 model with support for text prompts, file paths, and base64 encoded inputs for creative workflows and visual content creation.

18393 views8Local (stdio)

What it does

  • Generate images from text descriptions
  • Edit existing images with prompts
  • Process base64 encoded image inputs
  • Handle image files from local paths
  • Create visual content on demand

Best for

Content creators needing quick image generationDevelopers building AI-powered apps with visualsCreative workflows requiring automated image editing
Uses OpenAI's gpt-image-1 modelMultiple input formats supportedNPX ready - no installation needed

About GPT Image Generator

GPT Image Generator is a community-built MCP server published by cloudwerx-dev that provides AI assistants with tools and capabilities via the Model Context Protocol. Generate and edit images instantly using GPT Image Generator, an advanced AI image generator for creative visual content It is categorized under ai ml.

How to install

You can install GPT Image Generator in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

GPT Image Generator is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

GPT Image 1 MCP Logo

@cloudwerxlab/gpt-image-1-mcp

npm version npm downloads license node version Website

A Model Context Protocol (MCP) server for generating and editing images using the OpenAI gpt-image-1 model.

OpenAI GPT-Image-1 MCP Compatible

πŸš€ Quick Start

NPX Ready

Run this MCP server directly using NPX without installing it. View on npm.

npx -y @cloudwerxlab/gpt-image-1-mcp

The -y flag automatically answers "yes" to any prompts that might appear during the installation process.

πŸ“‹ Prerequisites

Node.js v14+

Node.js (v14 or higher)

OpenAI API Key

OpenAI API key with access to gpt-image-1

πŸ”‘ Environment Variables

VariableRequiredDescription
OPENAI_API_KEYβœ… YesYour OpenAI API key with access to the gpt-image-1 model
GPT_IMAGE_OUTPUT_DIR❌ NoCustom directory for saving generated images (defaults to user's Pictures folder under gpt-image-1 subfolder)

πŸ’» Example Usage with NPX

Operating SystemCommand Line Example
Linux/macOS
# Set your OpenAI API key
export OPENAI_API_KEY=sk-your-openai-api-key

# Optional: Set custom output directory
export GPT_IMAGE_OUTPUT_DIR=/home/username/Pictures/ai-generated-images

# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp
Windows (PowerShell)
# Set your OpenAI API key
$env:OPENAI_API_KEY = "sk-your-openai-api-key"

# Optional: Set custom output directory
$env:GPT_IMAGE_OUTPUT_DIR = "C:\Users\username\Pictures\ai-generated-images"

# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp
Windows (Command Prompt)
:: Set your OpenAI API key
set OPENAI_API_KEY=sk-your-openai-api-key

:: Optional: Set custom output directory
set GPT_IMAGE_OUTPUT_DIR=C:\Users\username\Pictures\ai-generated-images

:: Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp

πŸ”Œ Integration with MCP Clients

VS Code MCP Extension Roo Compatible Cursor Compatible Augment Compatible Windsurf Compatible

πŸ› οΈ Setting Up in an MCP Client

Step 1: Locate Settings File

  • For Roo: c:\Users\<username>\AppData\Roaming\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json
  • For VS Code MCP Extension: Check your extension documentation for the settings file location
  • For Cursor: ~/.config/cursor/mcp_settings.json (Linux/macOS) or %APPDATA%\Cursor\mcp_settings.json (Windows)
  • For Augment: ~/.config/augment/mcp_settings.json (Linux/macOS) or %APPDATA%\Augment\mcp_settings.json (Windows)
  • For Windsurf: ~/.config/windsurf/mcp_settings.json (Linux/macOS) or %APPDATA%\Windsurf\mcp_settings.json (Windows)

Step 2: Add Configuration

Add the following configuration to the mcpServers object:

{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": [
        "-y",
        "@cloudwerxlab/gpt-image-1-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "PASTE YOUR OPEN-AI KEY HERE",
        "GPT_IMAGE_OUTPUT_DIR": "OPTIONAL: PATH TO SAVE GENERATED IMAGES"
      }
    }
  }
}

Example Configurations for Different Operating Systems

Operating SystemExample Configuration
Windows
{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-api-key",
        "GPT_IMAGE_OUTPUT_DIR": "C:\\Users\\username\\Pictures\\ai-generated-images"
      }
    }
  }
}
Linux/macOS
{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-api-key",
        "GPT_IMAGE_OUTPUT_DIR": "/home/username/Pictures/ai-generated-images"
      }
    }
  }
}

Note: For Windows paths, use double backslashes (\\) to escape the backslash character in JSON. For Linux/macOS, use forward slashes (/).

✨ Features

🎨 Core Tools

  • create_image: Generate new images from text prompts
  • create_image_edit: Edit existing images with text prompts and masks

πŸš€ Key Benefits

  • Simple integration with MCP clients
  • Full access to OpenAI's gpt-image-1 capabilities
  • Streamlined workflow for AI image generation

πŸ’‘ Enhanced Capabilities

πŸ“Š Output & Formatting

  • βœ… Beautifully Formatted Output: Responses include emojis and detailed information
  • βœ… Automatic Image Saving: All generated images saved to disk for easy access
  • βœ… Detailed Token Usage: View token consumption for each request

βš™οΈ Configuration & Handling

  • βœ… Configurable Output Directory: Customize where images are saved
  • βœ… File Path Support: Edit images using file paths instead of base64 encoding
  • βœ… Comprehensive Error Handling: Detailed error reporting with specific error codes, descriptions, and troubleshooting suggestions

πŸ”„ How It Works

πŸ–ΌοΈ Image Generation✏️ Image Editing
  1. Server receives prompt and parameters
  2. Calls OpenAI API using gpt-image-1 model
  3. API returns base64-encoded images
  4. Server saves images to configured directory
  5. Returns formatted response with paths and metadata
  1. Server receives image, prompt, and optional mask
  2. For file paths, reads and prepares files for API
  3. Uses direct curl command for proper MIME handling
  4. API returns base64-encoded edited images
  5. Server saves images to configured directory
  6. Returns formatted response with paths and metadata

πŸ“ Output Directory Behavior

πŸ“‚ Storage Location

  • πŸ”Ή Default Location: User's Pictures folder under gpt-image-1 subfolder (e.g., C:\Users\username\Pictures\gpt-image-1 on Windows)
  • πŸ”Ή Custom Location: Set via GPT_IMAGE_O

    README truncated. View full README on GitHub.

Alternatives

Related Skills

Browse all skills
ai-image-generation

Generate AI images with FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image

6
ai-image

Generate AI images using OpenAI's gpt-image-1 model with customizable aspect ratios and artistic themes. Use when the user wants to create images, generate artwork, or mentions image generation with specific styles like Ghibli, futuristic, Pixar, oil painting, or Chinese painting.

5
ai-portrait-generator

Generate ultra-photorealistic portraits using structured JSON prompts. Use when creating AI-generated portraits, character art, or realistic human images with cinematic quality and detailed specifications.

4
eachlabs-image-generation

Generate new images from text prompts using EachLabs AI models. Supports text-to-image with multiple model families including Flux, GPT Image, Gemini, Imagen, Seedream, and more. Use when the user wants to create new images from text. For editing existing images, see eachlabs-image-edit.

4
nano-image-generator

Generate images using Nano Banana Pro (Gemini 3 Pro Preview). Use when creating app icons, logos, UI graphics, marketing banners, social media images, illustrations, diagrams, or any visual assets. Triggers include phrases like 'generate an image', 'create a graphic', 'make an icon', 'design a logo', 'create a banner', or any request needing visual content.

1
gpt

OpenAI GPT integration. Chat completions, image generation, embeddings, and fine-tuning via OpenAI API.

1