Help us improve
Share bugs, ideas, or general feedback.
Image generation and editing plugin for Claude Code
npx claudepluginhub thorrak/imagegen-pluginGenerate and edit images using OpenAI's image models via the imagegen-mcp server
Share bugs, ideas, or general feedback.
Generate and edit images directly from Claude Code using OpenAI's image models (GPT-Image-1, DALL-E 2, DALL-E 3). Powered by imagegen-mcp.
npx)This repository serves as its own plugin marketplace. Add it to Claude Code, then install the plugin:
Step 1: Add the marketplace
Run Claude Code and use the /plugins command, then select Manage marketplaces and add this repository:
thorrak/imagegen-plugin
Step 2: Install the plugin
Once the marketplace is added, install the plugin:
/plugins install imagegen@imagegen-marketplace
Or browse interactively via /plugins > Discover.
Clone the repository and point Claude Code to it directly:
git clone https://github.com/thorrak/imagegen-plugin.git
claude --plugin-dir /path/to/imagegen-plugin
Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY="your-api-key-here"
Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) to persist across sessions. The plugin's MCP server reads this variable automatically on startup.
Generate an image from a text prompt:
/generate-image a minimalist weather app icon, flat design, blue gradient
/generate-image --model dall-e-3 --size 1792x1024 a panoramic mountain landscape
/generate-image --transparent a coffee shop logo, simple vector style
Edit an existing image:
/edit-image ./assets/logo.png change the background color to navy blue
/edit-image ./photo.png --mask ./mask.png replace the sky with a starry night
You can also ask Claude conversationally — the plugin's skill activates automatically:
Both commands support optional flags:
| Flag | Values | Default | Notes |
|---|---|---|---|
--model | gpt-image-1, dall-e-2, dall-e-3 | gpt-image-1 | |
--size | e.g. 1024x1024, 1792x1024 | 1024x1024 | Valid sizes vary by model |
--format | png, jpeg, webp | png | |
--quality | auto, standard, hd | auto | hd is DALL-E 3 only |
--transparent | (flag, no value) | off | GPT-Image-1 + PNG/WebP only |
--n | number | 1 | DALL-E 3 limited to 1 |
| Model | Best For | Editing | Transparent BG | Sizes |
|---|---|---|---|---|
| gpt-image-1 | General use, highest quality | Yes | Yes | 1024x1024, 1536x1024, 1024x1536 |
| dall-e-3 | Artistic/creative images | No | No | 1024x1024, 1792x1024, 1024x1792 |
| dall-e-2 | Quick drafts, low cost | Yes | No | 256x256, 512x512, 1024x1024 |
Generated images are saved to ./generated-images/ in your project directory with descriptive filenames (e.g., weather-app-icon.png, hero-banner.png).
| Component | Description |
|---|---|
| MCP Server | Auto-starts imagegen-mcp via npx — connects to OpenAI's image APIs |
| Skill | Activates automatically when you discuss image generation — guides model selection, parameters, and prompting |
| Commands | /generate-image and /edit-image for quick, flag-based access |
MCP server fails to start:
OPENAI_API_KEY is set: echo $OPENAI_API_KEYnode --version (v18+ required)npx works: npx --versionImage generation fails:
Plugin not loading:
/plugins in Claude Code and verify imagegen is listed and enabledBuilt on imagegen-mcp by spartanz51.