mcp-openai-images-audio
Generates, edits, or composes images using OpenAI's gpt-image-2 and gpt-image-1.5 models, writing files to disk.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-openai-images-audiogenerate a photo of a cat wearing a hat, save to ~/cat.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-openai-images-audio
MCP server that exposes OpenAI's gpt-image-2 and gpt-image-1.5 to Claude Code as a single tool. Generate, edit, or compose images straight from a chat. Files are written to disk; the model never returns base64 to your context.
This isn't a wrapper for everything OpenAI does. It's one tool: image. That's intentional.

One call, size: 2048x1152, quality: high, no references — produced this UI mockup. Real readable typography, real-looking code preview, accurate Instagram visual language. That's the level you should expect.
Install
pip install mcp-openai-images-audioOr run directly without installing:
uvx mcp-openai-images-audioRelated MCP server: AI Image-Gen MCP Server
Connect to Claude Code
claude mcp add openai-images \
--scope user \
-e OPENAI_API_KEY=sk-... \
-- uvx mcp-openai-images-audioImportant:
Organization verification is mandatory for
gpt-image-2. Verify at https://platform.openai.com/settings/organization/general. Takes a few minutes, propagates within 15 minutes.The API key needs billing credit. Without it you get a 400 with
billing_hard_limit_reached.The server runs over stdio. No HTTP, no separate process to keep alive — Claude Code starts and stops it for you.
How the tool works
One tool, three modes selected by references_paths:
empty / not passed →
/v1/images/generations(text → new image)1 path →
/v1/images/edits(modify that image)2..16 paths →
/v1/images/edits(compose with labeled references)
The server picks the model on its own:
background='transparent'→gpt-image-1.5(gpt-image-2 currently rejects alpha — confirmed regression in OpenAI's docs)everything else →
gpt-image-2
The actual model used is reported in the response.
Parameters
Param | Required | Notes |
| yes | English. Structure matters — see the prompting guide. |
| yes | Absolute path. Parent must exist. File must NOT exist. Extension picks format: |
| yes | One of: |
| no | List of absolute paths, up to 16 files, each ≤50 MB. |
| no |
|
| no |
|
| no |
|
The server hard-codes moderation=low, n=1, output_compression=100. Not configurable.
Prompting guide
Before the first call, Claude reads the resource image-guide://full. It covers:
prompt structure (medium → subject → scene → composition → lighting → texture → constraints)
photorealism rules (camera language, anti-words like "8K", "masterpiece")
text rendering inside images
edit/compose modes with role labeling
sizeselection per use casewhen to set
qualityandinput_fidelitythe transparent-background trap — if you write "transparent background" in the prompt instead of passing
background='transparent', the model paints the editor checkerboard pattern into RGB. The image looks transparent in a thumbnail but isn't.
The server detects the checkerboard trap after writing the file and returns alpha_appears_baked: true. Don't trust the visual preview without checking that flag.
Response
{
"path": "/abs/path.png",
"bytes": 1219063,
"size": "1024x1024",
"model": "gpt-image-2",
"mode": "generate",
"has_alpha": false,
"alpha_used": null,
"tokens_used": 289,
"estimated_cost_usd": 0.0117
}If transparency was requested, alpha_appears_baked is also included. If anything looks wrong, a warnings array is added with human-readable text.
Logs
Each call appends one JSON line to ~/.cache/mcp-openai-images-audio/log.jsonl. The log rotates at 10 MB; one previous file is kept as log.jsonl.1.
tail -f ~/.cache/mcp-openai-images-audio/log.jsonlRecommendations
For UI mockups with readable text, use
size: 3840x2160andquality: high. Smaller sizes blur small fonts.For logos / icons that need transparency, set
background: 'transparent'— the server will route togpt-image-1.5automatically. Don't try to ask for transparency in the prompt.For portrait edits, pass
input_fidelity: 'high'. Otherwise the face drifts across iterations.For drafts, use
quality: 'low'(~$0.006/image). Promote tohighonly when the result has to be final.Don't pass
qualityat all for most cases. The default is good enough.The model gives most weight to the first ~50 words of the prompt. Put the medium and subject up front.
Pricing notes
Cost depends on size and quality. Typical 1024×1024 cases:
quality: low→ ~$0.006quality: medium→ ~$0.05quality: high→ ~$0.21
4K is roughly 4× the price of 2048×1152. The tool reports estimated_cost_usd per call; treat it as approximate — it tracks OpenAI's published per-token rates.
Build from source
git clone https://github.com/eduard256/mcp-openai-images-audio.git
cd mcp-openai-images-audio
uv sync
uv run mcp-openai-images-audioTests:
uv run --extra dev pytestKnown limitations
gpt-image-2does not supportbackground: transparent. The server falls back togpt-image-1.5automatically. Quality on transparent calls is thereforegpt-image-1.5quality, not the flagship.nis hard-coded to 1. To get multiple variants, call the tool multiple times in parallel.No
tts/audiotool yet despite the package name. Coming in a later version.No streaming partial images. The tool returns when the file is fully written.
License
MIT
Available Tools
1 toolimageA
Generate, edit, or compose images via OpenAI's gpt-image family.
BEFORE the FIRST call in a conversation, read the MCP resource
image-guide://full for the full prompting guide (structure,
realism rules, edit/compose modes, when to set quality/fidelity).
You only need to read it once per conversation.
Mode is selected by references_paths:
omitted/empty -> generate from text alone
1 path -> edit that image
2..16 paths -> generate using them as labeled references
Model routing is automatic and reported in the response:
background='transparent' -> gpt-image-1.5 (gpt-image-2 rejects alpha)
everything else -> gpt-image-2 (flagship)
Returns metadata only — the file is written to output_path.
Read the file with the Read tool only if you need to verify the result.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Structured English description of the desired image. When references_paths has more than one entry, label each one explicitly in the prompt (e.g. "Image 1: subject. Image 2: style reference."). See image-guide://full for the full prompting guide. | |
| output_path | Yes | ABSOLUTE filesystem path where the result will be saved. Extension determines format: .png / .jpg / .jpeg / .webp. Parent directory MUST already exist (create it via Bash mkdir -p before retrying). File MUST NOT already exist. | |
| size | Yes | Output resolution. REQUIRED — pick deliberately based on the use case: - 1024x1024 — generic single subject, avatar, icon - 1536x1024 / 1024x1536 — landscape / portrait composition - 2048x2048 — high-res square (hero blocks, album art) - 2048x1152 / 1152x2048 — 16:9 / 9:16 banners, video thumbs - 3840x2160 / 2160x3840 — 4K, only when text/UI must be crisp | |
| references_paths | No | Optional. Up to 16 ABSOLUTE paths to existing PNG/JPG/WebP files (each ≤50 MB) used as input images. Omit for pure text-to-image generation. | |
| quality | No | Optional. OMIT in most cases — the default ('auto') already produces excellent quality. Pass 'low' for cheap drafts. Pass 'high' only when text legibility (UI mockups), photorealism, or final-output quality is critical. | |
| input_fidelity | No | Optional. Only relevant when references_paths is set. Pass 'high' when faces/identity must be preserved exactly (portrait edits, virtual try-on, product placement). Otherwise omit — defaults to 'low' on the OpenAI side, which is cheaper and faster. | |
| background | No | Background handling. Use 'transparent' for logos, icons, isolated products, or anything you'll composite later (only valid with .png/.webp). 'opaque' forces a solid background. 'auto' lets the model decide. | auto |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description fully bears the burden of behavioral disclosure. It explains mode selection, automatic model routing, output behavior (returns metadata, writes to file), and file constraints (absolute path, parent directory must exist, file must not already exist). All behavioral traits are disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections for first-time setup, mode selection, model routing, and output behavior. Every sentence adds value. While comprehensive, it is not overly verbose; a small improvement could be to condense the quality section slightly, but overall it is efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (7 parameters, multiple modes, model routing, external resource) and the presence of an output schema, the description is complete. It covers first-time reading, mode selection, parameter semantics, output handling, and edge cases (file existence, directory creation). No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (each parameter has a schema description), baseline is 3. However, the tool description adds substantial value beyond the schema: it provides structured prompt guidance, detailed size use cases, quality/fidelity defaults and recommendations, background handling rules, and file path requirements. This greatly aids correct parameter usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate, edit, or compose images via OpenAI's gpt-image family.' It further distinguishes between generation, editing, and composition modes based on the references_paths parameter. No sibling tools exist, so differentiation is not needed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly advises reading a resource guide before the first call. It provides clear context for mode selection based on references_paths, model routing based on background, and when to set quality/fidelity. It covers prerequisites and usage scenarios thoroughly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Only one tool exists, so there is no ambiguity or overlap in tool selection.
With a single tool, naming consistency is inherently perfect.
One tool for a domain that could benefit from separate tools (e.g., generate, edit, compose) is borderline. The tool uses modes via parameters, which is acceptable but minimal.
The tool covers generate, edit, and compose operations, plus background transparency. Minor gaps exist (e.g., no explicit inpainting or variations) but overall the surface is reasonable for a single-tool server.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Generate images with your own ChatGPT subscription (Plus, Pro or Team), without spending API credits
Generate and edit images and create short videos inside Claude. Prepaid credits, no subscription.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides tools for generating and editing images using OpenAI's gpt-image-1 model via an MCP interface, enabling AI assistants to create and modify images based on text prompts.15Apache 2.0
- AlicenseAqualityDmaintenanceTransforms DALL-E 3, DALL-E 2, and GPT-Image-1 into MCP-compatible tools for generating images from natural language descriptions, supporting batch creation, style control, and flexible sizing.13MIT
- FlicenseNot gradedqualityCmaintenanceEnables generating images from text prompts using OpenAI's GPT-Image-2 model within Claude Code and Codex conversations.1
- AlicenseAqualityBmaintenanceConnects Claude Code to image generation models (OpenAI GPT Image 2, Google Nano Banana) for generating, editing, and converting images via natural language.638MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/eduard256/mcp-openai-images-audio'
If you have feedback or need assistance with the MCP directory API, please join our Discord server