Skip to main content
MCP server CX Codex

OpenAI Image — Claude Code MCP server: what it does, how to install

An MCP server that hands your agent two tools: turn a text prompt into an image, or edit one you already have, through Anthropic.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env OPENAI_API_KEY=<OPENAI_API_KEY> --env MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> --env OPENAI_IMAGE_MODEL=<OPENAI_IMAGE_MODEL> --env OPENAI_IMAGE_REQUEST_TIMEOUT_MS=<OPENAI_IMAGE_REQUEST_TIMEOUT_MS> --env MCP_ALLOWED_SYMLINK_ROOTS=<MCP_ALLOWED_SYMLINK_ROOTS> --transport stdio openai-image -- npx -y @mindstone/mcp-server-openai-image
Open on GitHub

What OpenAI Image does

The server exposes generate_image and edit_image. The first one takes a prompt plus size and quality settings, the second reworks an existing file. Generation runs on gpt-image-2, with four quality levels and three aspect ratios, and prompts can be written in more than one language.

Output PNGs stay inside a fenced workspace. With MCP_WORKSPACE_PATH set they land in <workspace>/Chief-of-Staff/generated-images/; otherwise the default is ~/Pictures/MCP-Generated-Images/. Point the edit tool at a file outside that fence and you get WORKSPACE_FENCE_VIOLATION back — so copy the source image into the workspace first. The API key is pinned to api.openai.com, which means a tampered environment cannot reroute your prompts or the bearer token.

You need Node.js 20.3+, npm, and an OpenAI key with image generation access. Without OPENAI_API_KEY the process still boots, but tool calls answer with NOT_CONFIGURED rather than crashing. The request timeout defaults to 180000 ms, sized for quality: high jobs that can run about two minutes on complicated prompts.

What it helps with

  • generate an illustration from a written prompt
  • touch up an existing image with edit_image
  • produce a PNG in a specific aspect ratio
  • keep generated files inside the project workspace
  • give an agent image generation without a separate CLI

Example prompts for the agent

  • Generate a 1024x1536 portrait of a draft horse pulling a cart at dawn, quality high
  • Edit hero.png and drop the background, keep just the subject
  • Make a square product card image at medium quality

How to install OpenAI Image

Platform CLI

claude mcp add --env OPENAI_API_KEY=<OPENAI_API_KEY> --env MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> --env OPENAI_IMAGE_MODEL=<OPENAI_IMAGE_MODEL> --env OPENAI_IMAGE_REQUEST_TIMEOUT_MS=<OPENAI_IMAGE_REQUEST_TIMEOUT_MS> --env MCP_ALLOWED_SYMLINK_ROOTS=<MCP_ALLOWED_SYMLINK_ROOTS> --transport stdio openai-image -- npx -y @mindstone/mcp-server-openai-image

Replace <…> with your own values. 1 more environment variable is in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about OpenAI Image

How do I install Anthropic Image in Claude Code?

Run claude mcp add mcp-server-openai-image -e OPENAI_API_KEY=<OPENAI_API_KEY> -- npx -y @mindstone/mcp-server-openai-image. A longer form adds --env flags for MCP_WORKSPACE_PATH, OPENAI_IMAGE_MODEL, OPENAI_IMAGE_REQUEST_TIMEOUT_MS and MCP_ALLOWED_SYMLINK_ROOTS.

What does OpenAI Image do?

It gives the host two tools: text-to-image generation and editing of an existing picture. Results are saved as PNG files inside the workspace.

What does the server need to run?

Node.js 20.3+, npm, and an OpenAI API key with image generation access. Start it without a key and every tool call returns NOT_CONFIGURED.

Similar MCP servers

All MCP servers for AI and ML →

From the same set13

Xero Bridges Xero accounting into an AI agent over MCP: invoices, contacts, payments, quotes and financial reports. Handy when you want Xero data inside the chat. CX Codex +1 ★ 13repo stars ServiceNow Wires ServiceNow ITSM into your coding agent so it can pull incidents, change requests, users and knowledge articles without leaving the chat. CX Codex +1 ★ 13repo stars Retell AI Wires Retell AI voice agents into your assistant: place a call, read call history, edit an agent prompt. CX Codex +1 ★ 13repo stars PandaDoc Wires PandaDoc into your coding agent: build documents from templates, send them for signing, pull PDFs back. Useful when contracts live in PandaDoc. CX Codex +1 ★ 13repo stars Nano Banana An MCP server that hands your agent image generation and editing through Google Gemini. Useful when a picture has to come out of the coding session itself. CX Codex +1 ★ 13repo stars Microsoft 365 SharePoint An MCP server that gives your agent SharePoint through Microsoft Graph: find sites, read libraries and lists, search content, and create sharing links. CX Codex +1 ★ 13repo stars Microsoft 365 Calendar Brings the Outlook calendar from Microsoft 365 into your coding agent: read events, create and edit meetings, find free slots. Handy when you plan the day from the chat window. CX Codex +1 ★ 13repo stars HubSpot A local MCP server that exposes HubSpot CRM to your coding agent: contacts, deals, tickets, tasks and files. Handy when you juggle more than one HubSpot account. CX Codex +1 ★ 13repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor