Install
$ agentstack add mcp-capitansuat-codex-media-gen ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo 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.
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
- User asks for an image
- Skill loads via
tool_search(Desktop Commander tools are deferred) - Claude runs Codex CLI with a generation prompt
- Codex calls gpt-image-2 (covered by the user's ChatGPT Plus/Pro)
- 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.jsonwith
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:
- Open Claude Desktop or claude.ai web
- Go to skills (or plugin) settings
- Add this repo as a skill source, or copy
SKILL.mdinto your local
skills directory
- 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:
- Run
tool_searchto load Desktop Commander tools - Verify Codex is installed and configured
- Build an English prompt optimized for gpt-image-2
- Run Codex in the background
- Wait 45-75 seconds for generation
- Copy the result to a sensible path (default:
~/Pictures/codex-generated/) - Display the image inline in the chat
- 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:
- 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.
- 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-genskill 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.
- Author: capitansuat
- Source: capitansuat/codex-media-gen
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.