OpenAI Image

Provides an MCP server that generates images via OpenAI models using text prompts.
  • typescript

0

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You run an MCP server that exposes OpenAI image generation capabilities through a simple, scalable interface. This server lets you generate images using GPT-Image-1, GPT-Image-1-Mini, DALL-E 3, and DALL-E 2 models by connecting via an MCP client. It requires an OpenAI API key and can be run locally or integrated into your MCP-based workflow for easy image creation from text prompts.

How to use

Connect to the image generation MCP server from your MCP client. You will use the four image generation tools described below to create images from text prompts. Each tool maps to a specific OpenAI model and supports a range of options such as image size, output format, and quality. Ensure you provide your OpenAI API key in the environment configuration for the server to authenticate with OpenAI.

How to install

Prerequisites: you need Node.js and npm installed on your system. Verify versions with node -v and npm -v.

Option 1: Quick start with npx (no installation required) — this starts the MCP server using stdio transport.

OPENAI_API_KEY=your_api_key_here npx @lpenguin/openai-image-mcp

Option 2: Install the package globally and run it from the CLI.

npm install -g @lpenguin/openai-image-mcp
openai-image-mcp

Option 3: Development setup for local work (clone, install, build, run)

// Step 1
npm install

// Step 2
Create a `.env` file and add your API key
`OPENAI_API_KEY=your_openai_api_key_here`

// Step 3
Build the TypeScript code
`npm run build

Run the MCP server in development mode (auto-reload if configured):

npm run dev

Additional configuration notes

To integrate with Claude or other MCP clients, you will add an MCP server configuration in your MCP settings. You can run the server via npm, npx, or a local node command depending on how you installed it.

MCP Server configurations

The following configurations show how to start the MCP server using different approaches. Each configuration passes the required OpenAI API key via the environment.

Configuration examples

json
{
  "mcpServers": {
    "image-generation": {
      "command": "npx",
      "args": ["-y", "@lpenguin/openai-image-mcp"],
      "env": {
        "OPENAI_API_KEY": "your_openai_api_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
json
{
  "mcpServers": {
    "image-generation": {
      "command": "openai-image-mcp",
      "env": {
        "OPENAI_API_KEY": "your_openai_api_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
json
{
  "mcpServers": {
    "image-generation": {
      "command": "node",
      "args": ["dist/mcp-server.js"],
      "env": {
        "OPENAI_API_KEY": "your_openai_api_key_here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Notes on API key configuration

The MCP server requires an OpenAI API key. Provide it either through an environment variable when running the server directly, or by including it in the MCP settings configuration under env so it is passed to the server at startup.

Usage examples

Use the following prompts to generate images with the different models. Each tool is designed to leverage a specific model, with options for size, quality, and output format.

Available tools

generate_image_gpt

Generates an image using the GPT-Image-1 model with options for size, output format, background transparency, and moderation. Supports multiple images via the n parameter.

generate_image_gpt_mini

Generates an image using the GPT-Image-1-Mini model with the same feature set as GPT-Image-1 but at a lower cost.

generate_image_dalle3

Generates a single image using the DALL-E 3 model with style control and size options. Note: allows only one image per request.

generate_image_dalle2

Generates images using the DALL-E 2 model with options for size and number of images.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational