Codex / OpenAI Image

v0.1.2
io.github.meet30997/codex-openai-image-mcp Checked 4 days ago Published 1 month ago

Generate, edit and make matching sets of images with the Codex CLI or the OpenAI Images API

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_image Generate image

Generate one or more images from a text prompt. Saves full-size PNGs (plus a .json sidecar with the prompt and settings) in the output folder and returns their paths with small previews.

ParameterTypeDescription
prompt *stringWhat to draw. Be specific about subject, style, composition and colours.
countintegerNumber of variants to generate (1-4).
out_namestringFile name without extension, relative to the output folder, e.g. "icons/rocket". Defaults to a slug of the prompt.
referencesarrayPaths of existing images to match the style of (inside the working folder).
sizestringWidth x height in px, e.g. "1024x1024" or "1536x1024".
transparentbooleanAsk for a transparent background.

edit_image Edit image

Change an existing image with a text instruction (e.g. 'make the sky a sunset', 'remove the person on the left', 'turn it into a watercolour', 'remove the background'). The original is never modified; edited copies are saved in the output folder with a .json sidecar, and their paths are returned with small previews.

ParameterTypeDescription
image *stringPath of the image to edit (inside the working folder).
prompt *stringThe change to make. Say what should change and, if it matters, what must stay the same.
countintegerNumber of edited variants (1-4).
maskstringOptional PNG whose transparent areas mark where to edit (openai-api only). Resized to the image if needed.
out_namestringFile name without extension, relative to the output folder. Defaults to "<input name>-edited".
referencesarrayExtra images the edit uses: an object to insert, or a style to apply (inside the working folder).
sizestringOutput size as width x height in px, e.g. "1024x1024". Defaults to the size of the input image.
transparentbooleanAsk for a transparent background, e.g. for a cutout.

generate_set Generate matching set

Generate several different images that share one style, e.g. a set of icons, stickers, badges, character portraits or story illustrations. Each item gets its own file, named after the item, in one folder. Returns paths and previews.

ParameterTypeDescription
items *arrayThe images to make, one per item.
style *stringThe look every image shares: medium, palette, rendering, lighting, framing, background.
folderstringFolder for the set, relative to the output folder. Defaults to a slug of the style.
referencesarrayExisting images whose style the whole set should match (inside the working folder).
sizestringWidth x height in px for every image, e.g. "1024x1024".
transparentbooleanAsk for transparent backgrounds.