Connect OpenAI image generation to Grok Bot / Claude / Cursor with @gofelixpy's openai-image MCP: stills and GIFs, about two minutes of pasting config
ChatGPT Pro/Business users get monthly API credits that cover the Images API. Overseas engineer @gofelixpy open-sourced @felixpy/openai-image (MIT, stdio MCP): tools `openai_image_generate` / `openai_image_edit`, writes absolute-path files, never returns base64; default model gpt-image-2.6-flare, GIF supported. Author says ~2 minutes to attach the MCP to Grok Bot so every agent can use it; sample meme GIF ~$0.06. On the box, npm ci + npm test: smoke 2/2 passed (shebang; after MCP initialize, tools/list exposes exactly generate and edit). No OPENAI_API_KEY set, no real image generated.
Visit site @felixpy/openai-image (MCP) ↗- Pricing
- Freemium
- Region
- Global
- Where it's from
- Overseas
- Added
- Nov 6, 2026
- Tested on
- Nov 6, 2026
- Version we used
- @felixpy/openai-image 0.2.0 (npm); commit d598cbf; default model gpt-image-2.6-flare
- Categories
- ImageAutomation & AgentsProductivity
- Original author
- Felix Yang @gofelixpy ↗
- Our test
- Partly tested
- Cost / time
- MCP package free (MIT). Images billed on OpenAI; Pro/Business monthly credits apply until exhausted. Node ≥20 (package engines; openai SDK prefers ≥22).
The task
Let Grok Bot (or Claude Code / Cursor / Codex) generate/edit stills and looping GIFs into a project folder—without downloading from a web UI by hand.
Steps
- Get an OpenAI API key. With ChatGPT Pro/Business, claim monthly API credits on platform.openai.com billing (subscription usually needs to be ≥7 days old); otherwise prepaid credit. Create the key in that same org.
- Register the MCP. Grok Bot: custom local MCP running `npx -y @felixpy/openai-image@latest`, put `OPENAI_API_KEY` in the masked secret field—or paste the author's setup prompt and let the bot configure it. Claude Code: `claude mcp add openai-image -e OPENAI_API_KEY=… -- npx -y @felixpy/openai-image@latest`. Cursor/Codex: same pattern in mcp config.
- Confirm tools `openai_image_generate` and `openai_image_edit` appear. First call: make a small still into `images/` and check the absolute path returned.
- GIFs: edit a still into a short loop, or generate a GIF directly; keep size (e.g. 512×512) and frame count modest. Author suggests a score-and-fix loop after each result.
- Pin versions in production (`@0.2.0`); `@latest` hits npm each start; bare `npx` can stick on a cached old build.
Prompt
Use openai-image to generate one 1024x1024 medium-quality still into my project's images folder—plain white background, single subject, no text—then tell me the absolute path; never write the API key into a file.
What the author says
@gofelixpy: Pro/Business monthly API credits cover the Images API; one open-source MCP gives every Grok Bot on the account generate/edit (including GIF). Author's sample: 512×512 nine-frame meme GIF ~$0.06 in ~11s; same command works in Claude Code / Cursor / Codex.
Our test
Cloned felixpy/openai-image (v0.2.0 / commit d598cbf), npm ci, npm test (node --test smoke). Read README / README_ZH. No OPENAI_API_KEY, no MCP registration in Grok Bot or Claude Code, no real image generated.
What we found when we tried it:smoke: 2 passed / 0 failed—dist keeps the node shebang; after stdio MCP initialize, tools/list is exactly openai_image_edit and openai_image_generate, schemas require output_dir and mention gif. Host Node v20.19.2 warned on [email protected] engines (≥22) but tests still passed.
How to get in
Public npm and GitHub; needs OpenAI API reachability (CN network/payment may block). README is bilingual; original tutorial in English.
Who it suits
People who already have OpenAI credits and want Grok Bot or a local agent to emit stills/GIFs; low value if you only use the ChatGPT website and have no key.
Pitfalls
- The process starts without a key, but tool calls fail—confirm the env var before assuming the MCP can draw.
- Large multi-frame GIFs can hit size limits; start at 512. Outputs are local paths—watch disk and privacy.
- Credits are org-scoped: the key must live in the org that received them.
- Our run: smoke 2/2 passed; no live Images API call—cost and quality depend on your account.
More in this category
- Turn a selfie into a transparent animated sticker setImageSeedream 5.5JimengHuashu skillSkill is free; image gen uses Jimeng credits◐ Partly testedChina
- One sentence to batch WebP and trim edgesImageimage-processingClaude CodePillowSkill free; needs Claude Code + Pillow◐ Partly testedOverseas
- One photo plus a minimal paper-print twinImageCodexSkillImage genSkill free; needs Codex image generation◐ Partly testedChina
- Paint one dieline, fold a low-poly GLB with a Fold clipImageOrigamiClaude CodeBlenderSkill free; paint ~$0.10–0.25 each◐ Partly testedOverseas
- Pixel VFX as code—plus a Claude refine loopImagepixelfxClaude Codepixel VFXLib+skill free; new FX need Claude◐ Partly testedOverseas