MCP OpenAI Images
Downloads font families from the official Google Fonts repository and makes them available for rendering text overlays on images.
Generates and edits images using the OpenAI Images API, including image generation from text prompts, variations from reference images, inpainting with masks, and configurable output sizes, qualities, and formats.
Click on "Deploy 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 Generate a square image for Instagram and overlay 'Summer Sale' in our brand font"
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
A local MCP server (stdio) that lets Claude (or any MCP client) generate and edit images with the OpenAI Images API (GPT Image models) — from scratch, from up to 16 reference images, or with inpainting masks — and then crop them to exact sizes and overlay text using your real brand fonts.
Built for marketing pipelines: generate a master image for a topic, then derive per-channel pieces (blog, LinkedIn, Instagram, YouTube thumbnail, newsletter) from it so they stay visually consistent.
It runs locally on your Mac on purpose: cloud sandboxes (such as Cowork's) block egress to api.openai.com, while a local MCP server is reachable from Claude Code, Claude Desktop, and Cowork sessions through the remote-devices bridge.
Tools
Tool | What it does | Cost |
| Generates an image from a text prompt | OpenAI |
| Generates a new image from 1–16 reference images (URL — including signed URLs —, local path, data URL, or base64), with an optional | OpenAI |
| Applies | Free |
| Downloads a font family from the official Google Fonts repository into | Free |
| Lists the image models your API key can use (also a connection test) | Free |
| Summarizes estimated spend per model from the local log | Free |
Tool names and responses are in Spanish, since the server is used by Spanish-speaking agents.
Common parameters
Parameter | Description |
| Prompt sent verbatim to OpenAI (English recommended) |
|
|
|
|
|
|
| Number of variants (1–10) |
| Overrides the default model for this call |
|
|
|
|
| Array of |
| Filename prefix |
| Also return |
| Return a 512px thumbnail so the agent can review the result (default |
Post-processing order: OpenAI image → crop_to → overlay_text (coordinates refer to the final image).
Related MCP server: image-studio-mcp
Requirements
macOS (other platforms should work, but font lookup is tuned for macOS)
Node.js 20 or later
An OpenAI API key with access to GPT Image models
Installation
git clone https://github.com/Go-Business-Inc/MCP-OpenIA.git
cd MCP-OpenIA
npm install
npm run build
cp .env.example .env
chmod 600 .envPut your key in .env as OPENAI_API_KEY=.... Never hardcode it, paste it into a chat, or store it in shared documents.
Brand fonts
overlay_text looks for font files in fonts/, ~/Library/Fonts, and /Library/Fonts. Drop the .ttf files of your brand typefaces into fonts/ (see fonts/README.md). If a font can't be found — or lacks a character in your text — the tool returns an error instead of silently substituting another typeface, and it checks the font before calling OpenAI, so no money is spent.
To add a font later, drop its files into fonts/ (or install it on the Mac) — no restart needed. For Google Fonts families, the agent can also call instalar_fuente_google with the family name (e.g. "Playfair Display"): it downloads the variable (or non-italic static) .ttf files and the license only from the official google/fonts repository, validates them, and makes them available immediately. The tool is described to the agent as usable only when the user explicitly requests a font, so it won't swap your brand typography on its own. Commercial fonts must be installed manually.
Text is drawn from the font file's glyph outlines (via fontkit), not through the system text renderer, so the result doesn't depend on which fonts are installed. Variable fonts are supported: fontWeight sets the wght axis and fontSize the opsz axis when present.
Registering the server
The server has to be registered in each Claude app that should use it. Claude Code and Claude Desktop keep separate configurations, so registering it in one doesn't make it available in the other.
Claude Code
claude mcp add --scope user openai-images -- node /absolute/path/to/MCP-OpenIA/dist/index.jsThen restart your Claude Code session and check that the tools are listed with /mcp.
Claude Desktop (and Cowork)
Claude Desktop reads its MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Cowork sessions reach local servers through Claude Desktop's remote-devices bridge, so registering the server here is what makes it available in Cowork too.
Don't edit claude_desktop_config.json while Claude Desktop is running. The app keeps that file in memory and rewrites it on its own while it runs (for example, when a Cowork session connects), so an entry added with the app open is silently removed minutes later — often before you restart. The app doesn't write the file when it quits, so edits made while it's closed are safe.
Option A — registration script (recommended)
Open Terminal.app (or iTerm). Don't use Claude Desktop's built-in terminal or ask Claude inside the app to run it: the script would be stopped when the app quits.
Run:
cd /absolute/path/to/MCP-OpenIA ./scripts/register-claude-desktop.shQuit Claude Desktop with Cmd+Q (closing the window isn't enough).
The script waits for the app to quit, backs up the config (claude_desktop_config.json.bak-<timestamp>), adds the openai-images entry pointing at your node and dist/index.js, and reopens Claude Desktop. If the app isn't running, it registers right away. It gives up without changing anything if the app isn't quit within 30 minutes.
Optional environment variables: NODE_BIN (node binary to register, default: the node on your PATH), MCP_NAME (default openai-images), TIMEOUT_SECONDS (default 1800).
Option B — manual
Quit Claude Desktop completely (Cmd+Q).
Add the entry to
~/Library/Application Support/Claude/claude_desktop_config.json, keeping everything else in the file:{ "mcpServers": { "openai-images": { "command": "/usr/local/bin/node", "args": ["/absolute/path/to/MCP-OpenIA/dist/index.js"] } } }Use the output of
which nodeascommand— Claude Desktop doesn't load your shell'sPATH, so a barenodemay not be found.Open Claude Desktop again.
Verify
The entry is still in the config after the app has been open for a few minutes:
grep -A3 '"openai-images"' ~/Library/Application\ Support/Claude/claude_desktop_config.jsonThe app launched the server — this log file exists and shows no startup errors:
tail -n 20 ~/Library/Logs/Claude/mcp-server-openai-images.logIn a new Cowork or chat session, ask Claude to run
listar_modelos_imagen. It should list the image models your OpenAI key can use. Sessions that were already open when the server was registered won't see it.
Output
Every image is saved to output/YYYY-MM-DD/, and the response includes its file_path, dimensions, estimated cost, and a preview thumbnail.
To attach an image to another system, pass the file_path to a tool that uploads local files (for example, an upload_file_path tool in a Pipefy MCP server running on the same machine).
incluir_base64: true adds file_name + file_base64 to each image, but a base64-encoded image is millions of characters: MCP clients truncate large tool outputs (Claude Code's MAX_MCP_OUTPUT_TOKENS) and it fills the agent's context. Passing the file path is the recommended route.
Errors
The server never reports success without a real image. Failures return isError: true and a JSON payload with a tipo_error field:
| Meaning |
| OpenAI's safety system rejected the prompt ( |
| The OpenAI account is out of credits or hit its spend limit. Not retryable — needs a human to top up billing. |
| Any other API error (HTTP status, code, offending parameter) |
| Invalid parameters caught locally before calling OpenAI — nothing was spent |
| The image was generated (and billed) but cropping/text failed. |
| Reference download failed (e.g. expired signed URL), missing file, missing font, etc. |
Cost log
Each call appends one JSON line to logs/uso.jsonl: model, size, quality, n, token usage, estimated cost in USD, duration, and output files. Prices live in src/costs.ts (checked 2026-09-13 against OpenAI's pricing page) — update them if OpenAI changes its rates.
Troubleshooting
Symptom | Cause and fix |
Cowork / Claude Desktop says the tools don't exist | The entry isn't in |
The entry disappears from the config | Claude Desktop rewrote the file while running. Register again with the app quit (Option A does this for you). |
Works in Claude Code but not in Claude Desktop (or vice versa) | They use separate configs — register the server in both. |
|
|
Tools respond with "OPENAI_API_KEY no está configurada" | Create |
| The OpenAI account has no credits or hit its spend limit — top up in OpenAI's billing settings. |
Text overlay fails with "Fuente … no encontrada" | Add the font files to |
Changes to the code don't show up | Run |
Configuration
Environment variable | Default | Purpose |
| — | Required. Your OpenAI API key |
|
| Default model ( |
| — | OpenAI organization, if your key belongs to several |
|
| Where images are saved |
|
| Cost/usage log |
|
| Font files for |
Variables can go in .env (read from the project folder, not the working directory) or in the env block of your MCP client config.
Credits
Built by Go Business Inc.
Go Business Inc. helps companies transform their operations through digital automation: process-based CRM and sales pipelines, AI chatbots and agents, automated marketing journeys, customer self-service portals, business intelligence dashboards, hardware automation, and remote-work management.
Available Tools
6 toolscomponer_imagenRecortar / poner texto de marca sobre una imagen existenteA
Aplica crop_to y/o overlay_text (fuentes reales de marca) sobre una imagen que ya existe — URL, ruta local o base64 — sin llamar a OpenAI (costo cero). Úsalo para ajustar el texto de un thumbnail sin regenerar, o para recomponer cuando generar_imagen/generar_variacion devolvió tipo_error 'postproceso' (usa imagenes_originales).
Inputs: source (required), crop_to, overlay_text, output_format, +4 more.
generar_imagenGenerar imagen (OpenAI GPT Image)A
Genera una imagen desde cero a partir de un prompt en inglés con la API de OpenAI. Guarda el archivo en disco y devuelve su ruta (file_path) para adjuntarla a Pipefy con upload_file_path. Si OpenAI rechaza el prompt o la llamada falla, devuelve error explícito (tipo_error, código, mensaje) — nunca una imagen vacía.
Inputs: prompt (required), n, size, model, +9 more.
generar_variacionGenerar variación desde referencias (OpenAI GPT Image)A
Genera una imagen nueva a partir de 1 a 16 imágenes de referencia (endpoint de edición de OpenAI). Úsalo para derivar las piezas (Blog, LinkedIn, Instagram, YouTube, Newsletter) desde la imagen maestra del Tema y mantener consistencia visual. Acepta URLs (incluidas URLs firmadas de Pipefy), rutas locales, data URLs o base64. Con mask hace inpainting de una zona. Devuelve file_path igual que generar_imagen.
Inputs: prompt (required), reference_images (required), n, mask, +12 more.
instalar_fuente_googleInstalar fuente de Google FontsA
Descarga e instala una familia tipográfica desde el repositorio oficial de Google Fonts para usarla en overlay_text. USAR SOLO cuando el usuario pida explícitamente instalar o usar una fuente concreta. Nunca la instales por iniciativa propia ni para cambiar la tipografía de marca (Manrope/Inter) sin que el usuario lo pida. Solo Google Fonts; las fuentes comerciales hay que instalarlas a mano. Después de instalarla, usa el nombre de 'familia' en fontFamily.
Inputs: familia (required).
listar_modelos_imagenListar modelos de imagen disponiblesARead-only
Lista los modelos de imagen de OpenAI a los que tiene acceso la API key configurada. Sirve también como prueba de conexión.
Inputs: no named parameters.
resumen_gastoResumen de gasto en OpenAIARead-only
Resume las llamadas y el costo estimado registrados en el log local, agrupado por modelo.
Inputs: dias.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Every tool targets a distinct operation: generation from prompt, variation from references, composition via crop/overlay, font installation, model listing, and expense summary. The two 'generar' tools are clearly differentiated by input type and purpose, so there's no ambiguity.
Most tools follow a verb_noun pattern (generar_imagen, generar_variacion, componer_imagen, instalar_fuente_google, listar_modelos_imagen), but 'resumen_gasto' is a noun phrase rather than a verb. This single deviation prevents a perfect score.
With 6 tools, the server is well-scoped for an image generation workflow. Each tool has a clear role, and the count feels neither sparse nor overwhelming — it's a tight, purposeful set.
The surface covers the core image lifecycle: creation, variation, editing, styling, model discovery, and cost tracking. There are no obvious dead ends or missing operations for the stated domain of OpenAI image generation.
Maintenance
Related MCP Connectors
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
MCP server for Qwen Image 3 AI image generation
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Generate AI images and videos from any compatible MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables text-to-image generation and editing using OpenAI's gpt-image-1 model, supporting multiple output formats, quality settings, and background options.69-
- AlicenseBqualityDmaintenanceA local MCP server for generating and editing images using OpenAI-compatible APIs. It provides text-to-image generation and image editing capabilities with configurable endpoints and saves output directly to local files.225 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server that wraps OpenAI's image generation and editing APIs, enabling text-to-image and image-to-image operations via tools.186 npm37ISC
- AlicenseAqualityCmaintenanceAn MCP server that generates and edits images using OpenAI's GPT Image model, allowing users to create images from text descriptions and edit existing images through natural language.139 npmMIT