AI-powered image generation using Google Gemini or OpenAI (gpt-image-2), integrated with Claude Code.
> /plugin marketplace add guinacio/claude-image-gen> /plugin install media-pipeline@media-pipeline-marketplace
FAQ
media-pipeline is a Claude Code plugin with 1 hand-picked skill for content work, indexed on Flowy. Install it with the command on its page. It includes image-generation. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Repo: guinacio/claude-image-gen
AI-powered image generation using Google Gemini or OpenAI (gpt-image-2), integrated with Claude Code.
The plugin installs skill + CLI + MCP server in one stepβno separate configuration needed.
# Add the marketplace
/plugin marketplace add guinacio/claude-image-gen
# Install the plugin
/plugin install media-pipeline@media-pipeline-marketplace
Or install directly from GitHub:
/plugin install guinacio/claude-image-gen
Once installed:
Tip: Since the skill runs the CLI directly, you can disable the MCP server in Claude Code's MCP list to reduce startup overhead. The skill will continue to work without it.
For Claude Desktop users, install the pre-built extension:
media-pipeline.mcpb from Releases.mcpb fileFor developers who want to customize or build from source:
cd mcp-server
npm install
npm run bundle
cd mcp-server
GEMINI_API_KEY=your-api-key-here node build/cli.bundle.js \
--prompt "Landing page hero image for a fintech startup" \
--aspect-ratio "16:9"
The CLI routes to Gemini or OpenAI based on the model name and returns structured JSON on stdout. It does not require the MCP server layer. Any custom output path must still remain inside the configured output directory.
Option A: Using MCP server
claude mcp add --transport stdio media-pipeline \
--env GEMINI_API_KEY=your-api-key-here \
-- node /path/to/claude-image-gen/mcp-server/build/bundle.js
The -- separates Claude CLI flags from the server command.
Option B: Manual config
Add to your Claude Code config (~/.claude.json):
{
"mcpServers": {
"media-pipeline": {
"command": "node",
"args": ["/path/to/claude-image-gen/mcp-server/build/bundle.js"],
"env": {
"GEMINI_API_KEY": "${GEMINI_API_KEY}",
"GEMINI_DEFAULT_MODEL": "${GEMINI_DEFAULT_MODEL:-gemini-3-pro-image-preview}",
"OPENAI_API_KEY": "${OPENAI_API_KEY}",
"OPENAI_DEFAULT_MODEL": "${OPENAI_DEFAULT_MODEL:-gpt-image-2}",
"IMAGE_PROVIDER": "${IMAGE_PROVIDER:-gemini}",
"IMAGE_OUTPUT_DIR": "${IMAGE_OUTPUT_DIR:-./generated-images}",
"GEMINI_REQUEST_TIMEOUT_MS": "${GEMINI_REQUEST_TIMEOUT_MS:-60000}",
"MEDIA_PIPELINE_LOG_LEVEL": "${MEDIA_PIPELINE_LOG_LEVEL:-info}"
}
}
}
}
The ${VAR:-default} syntax uses environment variables with fallback defaults.
If not using the plugin:
cp -r skills/image-generation ~/.claude/skills/
To create your own .mcpb extension for Claude Desktop:
cd mcp-server
npm install -g @anthropic-ai/mcpb
npm run pack:mcpb
This creates mcp-server/media-pipeline.mcpb using bundled runtime entry points for both the MCP server and the standalone CLI.
Use create_asset to create a hero image for a tech startup website
The skill will proactively suggest image generation when:
| Variable | Required | Default | Description |
|---|---|---|---|
GEMINI_API_KEY | At least one of GEMINI_API_KEY / OPENAI_API_KEY | - | Your Gemini API key |
GEMINI_DEFAULT_MODEL | No | gemini-3-pro-image-preview | Default Gemini model to use |
OPENAI_API_KEY | At least one of GEMINI_API_KEY / OPENAI_API_KEY | - | Your OpenAI API key |
OPENAI_DEFAULT_MODEL | No | gpt-image-2 | Default OpenAI model to use |
IMAGE_PROVIDER | No | gemini | Provider (gemini or openai) used when a request omits model |
IMAGE_OUTPUT_DIR | No | ~/generated-images | Where to save images |
GEMINI_REQUEST_TIMEOUT_MS | No | 60000 | Request timeout, applies to both Gemini and OpenAI requests |
MEDIA_PIPELINE_LOG_LEVEL | No | info | Stderr logging level |
The server is dual-provider: it routes each request to Google Gemini or OpenAI (gpt-image-2) automatically based on the model name β models starting with gpt-image or dall-e go to OpenAI, everything else goes to Gemini. When a request omits model entirely, IMAGE_PROVIDER selects which provider's default model is used.
1024x1024, 1536x1024, and 1024x1536. Requested aspect ratios are mapped to the nearest supported size, and if the mapping isn't exact the response includes a warning describing the substitution.Gemini models are fetched dynamically from the Gemini API at runtime; the CLI and MCP tool validate Gemini model choices against the current image-capable model list, and GEMINI_DEFAULT_MODEL is used when available. For OpenAI, gpt-image-2 is the default model (OPENAI_DEFAULT_MODEL); any gpt-image*/dall-e* model name routes to OpenAI.
| Ratio | Best For |
|---|---|
1:1 | Social media, thumbnails |
16:9 | Hero images, presentations |
9:16 | Mobile stories, vertical banners |
4:3 | Blog posts, general web |
3:2 | Photography-style images |
On OpenAI models, aspect ratios other than
1:1/3:2/2:3-equivalent are mapped to the nearest supported size (see Providers).
Use this formula for effective prompts:
[Style] [Subject] [Composition] [Context/Atmosphere]
Example:
Minimalist 3D illustration of abstract geometric shapes floating in space,
soft gradient background from deep purple to electric blue, subtle glow effects,
modern professional aesthetic, wide composition for website header
See skills/image-generation/references/prompt-crafting.md for advanced techniques.
CLI Mode (Default) - Used by the skill:
Claude β Skill β Bash β bundled CLI β Gemini API / OpenAI API
MCP Mode (Optional) - For direct tool calls:
Claude β MCP Tool β bundled MCP server β Gemini API / OpenAI API
The MCP server uses intentionally abstract naming (media-pipeline / create_asset) rather than image-specific names (gemini-image-gen / generate_image).
Why? When tool names directly match intent (e.g., "I need to generate an image" β generate_image), AI assistants tend to call the MCP tool directly, bypassing the skill layer. By using generic names:
image-generation) becomes the semantically obvious choice for image tasksThis is a form of prompt engineering for tool selectionβmaking the abstraction layer the natural choice while the underlying implementation has a name that doesn't invite direct use.
claude-image-gen/
βββ .claude-plugin/ # Plugin configuration
β βββ plugin.json # Plugin manifest
β βββ marketplace.json # Marketplace distribution
βββ mcp-server/ # Server and CLI implementation
β βββ src/
β β βββ index.ts # MCP server entry point
β β βββ cli.ts # CLI entry point (skill uses this)
β β βββ gemini-client.ts
β β βββ openai-client.ts
β β βββ provider.ts # Routes requests to Gemini or OpenAI by model name
β β βββ image-storage.ts
β β βββ types.ts
β βββ build/
β β βββ bundle.js # Bundled MCP server
β β βββ cli.bundle.js # Bundled CLI (all deps included)
β βββ .mcpbignore # Package only the runtime files needed by the bundle
β βββ manifest.json # MCPB extension manifest
β βββ icon.png # Extension icon
β βββ package.json
β βββ tsconfig.json
βββ skills/ # Claude skills
β βββ image-generation/
β βββ SKILL.md # Skill instructions (uses CLI)
β βββ references/
βββ .mcp.json # MCP configuration
βββ README.md
MIT
.claude-plugin/
marketplace.json
plugin.json
.gitattributes
.gitignore
.mcp.json
example/
florianopolis-slides.html
img-floripa-beaches.png
img-floripa-closing.png
img-floripa-culture.png
img-floripa-hero.png
img-floripa-nature.png
LICENSE
mcp-server/
.mcpbignore
build/
bundle.js
cli.bundle.js
cli.d.ts
cli.js
gemini-client.d.ts
gemini-client.js
image-storage.d.ts
image-storage.js
index.d.ts
index.js
media-pipeline-service.d.ts
media-pipeline-service.js
openai-client.d.ts
openai-client.js
provider.d.ts
provider.js
reference-images.d.ts
reference-images.js
runtime.d.ts
runtime.js
schemas.d.ts
schemas.js
server-handlers.d.ts
server-handlers.js
types.d.ts
types.js
icon.png
icon.svg
manifest.json
media-pipeline.mcpb
package-lock.json
package.json
scripts/
smoke-test.mjs
src/
cli.ts
gemini-client.ts
image-storage.ts
index.ts
media-pipeline-service.ts
openai-client.ts
provider.ts
reference-images.ts
runtime.ts
schemas.ts
server-handlers.ts
types.ts
tests/
image-storage.test.mjs
media-pipeline-service.test.mjs
openai-client.test.mjs
protocol-v2.test.mjs
protocol.test.mjs
provider.test.mjs
reference-images.test.mjs
server-handlers.test.mjs
tsconfig.json
README.md
skills/
image-generation/
references/
prompt-crafting.md
SKILL.mdΒ© 2026 Flowy Β· Free and open source
Built for Claude Code Β· Not affiliated with Anthropic