AgentStack
MCP verified MIT Self-run

Codex Media Gen

mcp-capitansuat-codex-media-gen · by capitansuat

A Claude skill that lets Claude generate real AI raster images by shelling out to the user's locally-installed Codex CLI (gpt-image-2) through Desktop Commander MCP.

No reviews yet
0 installs
10 views
0.0% view→install

Install

$ agentstack add mcp-capitansuat-codex-media-gen

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Codex Media Gen? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

codex-media-gen

A Claude skill that lets Claude in claude.ai web or Claude Desktop generate real AI raster images on the user's local machine, by shelling out to the locally-installed Codex CLI (gpt-image-2 model) through the Desktop Commander MCP bridge.

Why this exists

Claude in claude.ai web and Claude Desktop cannot generate raster images natively. When a user asks for "an illustration of X", Claude either declines or offers SVG/mermaid as a substitute. This skill closes that gap: if the user has Codex CLI installed on their Mac with image generation enabled, Claude can call it through Desktop Commander and return a real PNG.

The user experience should feel native: ask for an image, an image appears, no meta-commentary about "I can't do this directly."

How it works

                  ChatGPT image_gen tool inside Codex CLI
                                  |
   Claude (web or Desktop)  ──>   Codex CLI on user's Mac  ──>  PNG on disk
              ^                                                       |
              |                                                       v
              └────────────  Desktop Commander MCP  ←─────────  inline preview
  1. User asks for an image
  2. Skill loads via tool_search (Desktop Commander tools are deferred)
  3. Claude runs Codex CLI with a generation prompt
  4. Codex calls gpt-image-2 (covered by the user's ChatGPT Plus/Pro)
  5. PNG is written to disk, Claude reads it back and displays inline

Requirements

On the user's Mac:

  • Codex CLI v0.130.0+ installed at ~/.npm-global/bin/codex

``bash npm install -g @openai/codex ``

  • Codex authenticated with ChatGPT Plus or Pro (~/.codex/auth.json with

auth_mode: chatgpt)

  • Image generation feature enabled in ~/.codex/config.toml:

``toml [features] image_generation = true ``

  • Desktop Commander MCP connected to Claude (Claude Desktop or web with

the MCP server configured)

Installation

This is a Claude skill, not a standalone tool. To use it:

  1. Open Claude Desktop or claude.ai web
  2. Go to skills (or plugin) settings
  3. Add this repo as a skill source, or copy SKILL.md into your local

skills directory

  1. The skill will activate automatically when you ask for an image

Exact installation steps depend on which Claude client you use and how it discovers skills. Skill loading is currently in active development across Claude clients.

Usage

Just ask:

Generate an illustration of a retro astronaut drinking coffee in space
şu görseli üret: minimalist mountain landscape at sunset

Claude will:

  1. Run tool_search to load Desktop Commander tools
  2. Verify Codex is installed and configured
  3. Build an English prompt optimized for gpt-image-2
  4. Run Codex in the background
  5. Wait 45-75 seconds for generation
  6. Copy the result to a sensible path (default: ~/Pictures/codex-generated/)
  7. Display the image inline in the chat
  8. Tell you the file's full path

Trigger phrases

The skill activates on phrases like:

  • "Make me a picture of..."
  • "Generate an illustration..."
  • "Create a banner..."
  • "I need a hero image..."
  • "Design a logo concept..."
  • "Şu görseli üret..."
  • "Bana bir illüstrasyon yap..."

It does NOT activate for:

  • SVG, mermaid, or ASCII art requests (Claude handles those directly)
  • Analysis of existing images (Claude's vision handles that)
  • Video (out of scope)

File structure

codex-media-gen/
├── README.md       # This file
├── LICENSE         # MIT
└── SKILL.md        # The actual skill definition Claude loads

SKILL.md is what Claude reads. The frontmatter at the top of that file controls when the skill triggers and how it's described to Claude.

Output location policy

By default the skill picks a path based on conversation context:

| Context | Destination | |---------|-------------| | Ad-hoc request, no project context | ~/Pictures/codex-generated/-.png | | User is in a git repo / project dir | /assets/ | | User named a path | Exactly there | | Note in a notes app | Adjacent attachments/ folder |

You can override by saying "save to /some/path/file.png" in your request.

Known failure modes

See SKILL.md for the full table. The two most common:

  1. Claude says "I cannot generate images" or offers SVG as a fallback.

This means Claude didn't load Desktop Commander tools first. The skill's v0.4 prompt explicitly forbids this pattern but some clients may still trip. Tell Claude to run tool_search("desktop commander") and try again.

  1. Output is a tiny ~5 KB PNG with a perfect geometric shape.

Codex fell back to a Python-rendered placeholder instead of calling gpt-image-2. Make sure [features] image_generation = true is in ~/.codex/config.toml.

Out of scope

This skill deliberately stays small. Not included:

  • Batch generation (multiple images per call)
  • Automatic retry-on-quality loops
  • Video (a separate codex-video-gen skill could cover Sora)
  • Image editing of existing files
  • Transparent-background workflow
  • Notes-app auto-linking

If you need any of these, fork the skill or open an issue describing the use case.

License

MIT.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.