Imagegen MCP Server

MCP server to generate images from text using OpenAI's API

Local serverstdioTypeScript

What is the Imagegen MCP server?

MCP server to generate images from text using OpenAI's API. The imagegen mcp server wraps that behind the Model Context Protocol, so an assistant can use it rather than through you.

What it actually does

Here's an example of generating an image directly in Cursor using the text-to-image tool integrated via MCP:

  • Exposes OpenAI image generation capabilities through MCP tools
  • Supports text-to-image generation using models like DALL-E 2, DALL-E 3, and gpt-image-1 (if available/enabled)
  • Supports image-to-image editing using DALL-E 2 and gpt-image-1 (if available/enabled)
  • Configurable via environment variables and command-line arguments
  • Handles various parameters like size, quality, style, format, etc
  • Saves generated/edited images to temporary files and returns the path along with the base64 data

Configuration

You will need one environment variable: OPENAI_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Node.js (v18 or later recommended) * npm or yarn * An OpenAI API key

Adding it to your client

Installation goes through your MCP client rather than a global install: point it at You on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

When to reach for it

Plenty of AI and media services servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. It is maintained by spartanz51; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the imagegen mcp server does with a few real requests.

How to install the Imagegen MCP server

{
  "mcpServers": {
    "imagegen-1": {
      "command": "npx",
      "args": ["-y", "You"],
      "env": {
        "OPENAI_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Node.js (v18 or later recommended) * npm or yarn * An OpenAI API key
VariableDescriptionRequired
OPENAI_API_KEYCredential the server authenticates with.Yes

Frequently asked questions

It connects Imagegen to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Imagegen directly.