Skip to main content
Glama

🚀 Inicio rápido

npx -y @cloudwerxlab/gpt-image-1-mcp

📋 Requisitos previos

🔑 Variables de entorno

💻 Ejemplo de uso con NPX

# Set your OpenAI API key
export OPENAI_API_KEY=sk-your-openai-api-key

# Optional: Set custom output directory
export GPT_IMAGE_OUTPUT_DIR=/home/username/Pictures/ai-generated-images

# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp
# Set your OpenAI API key
$env:OPENAI_API_KEY = "sk-your-openai-api-key"

# Optional: Set custom output directory
$env:GPT_IMAGE_OUTPUT_DIR = "C:\Users\username\Pictures\ai-generated-images"

# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp
:: Set your OpenAI API key
set OPENAI_API_KEY=sk-your-openai-api-key

:: Optional: Set custom output directory
set GPT_IMAGE_OUTPUT_DIR=C:\Users\username\Pictures\ai-generated-images

:: Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp

Related MCP server: OpenAI MCP

🔌 Integración con clientes MCP

🛠️ Configuración en un cliente MCP

{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": [
        "-y",
        "@cloudwerxlab/gpt-image-1-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "PASTE YOUR OPEN-AI KEY HERE",
        "GPT_IMAGE_OUTPUT_DIR": "OPTIONAL: PATH TO SAVE GENERATED IMAGES"
      }
    }
  }
}

Configuraciones de ejemplo para diferentes sistemas operativos

{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-api-key",
        "GPT_IMAGE_OUTPUT_DIR": "C:\\Users\\username\\Pictures\\ai-generated-images"
      }
    }
  }
}
{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-api-key",
        "GPT_IMAGE_OUTPUT_DIR": "/home/username/Pictures/ai-generated-images"
      }
    }
  }
}

Nota : Para las rutas de Windows, use barras invertidas dobles ( \\ ) para escapar la barra invertida en JSON. Para Linux/MacOS, use barras diagonales ( / ).

✨ Características

💡 Capacidades mejoradas

🔄 Cómo funciona

📁 Comportamiento del directorio de salida

Instalación y uso

Paquete NPM

Este paquete está disponible en npm: @cloudwerxlab/gpt-image-1-mcp

Puedes instalarlo globalmente:

npm install -g @cloudwerxlab/gpt-image-1-mcp

O ejecútelo directamente con npx como se muestra en la sección Inicio rápido.

Herramienta: create_image

Genera una nueva imagen basándose en una solicitud de texto.

Parámetros

Parámetro

Tipo

Requerido

Descripción

prompt

cadena

Sí

La descripción del texto de la imagen a generar (máximo 32.000 caracteres)

size

cadena

No

Tamaño de la imagen: "1024x1024" (predeterminado), "1536x1024" o "1024x1536"

quality

cadena

No

Calidad de imagen: "alta" (predeterminada), "media" o "baja"

n

entero

No

Número de imágenes a generar (1-10, predeterminado: 1)

background

cadena

No

Estilo de fondo: "transparente", "opaco" o "automático" (predeterminado)

output_format

cadena

No

Formato de salida: "png" (predeterminado), "jpeg" o "webp"

output_compression

entero

No

Nivel de compresión (0-100, predeterminado: 0)

user

cadena

No

Identificador de usuario para el seguimiento del uso de OpenAI

moderation

cadena

No

Nivel de moderación: «bajo» o «automático» (predeterminado)

Ejemplo

<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image</tool_name>
<arguments>
{
  "prompt": "A futuristic city skyline at sunset, digital art",
  "size": "1024x1024",
  "quality": "high",
  "n": 1,
  "background": "auto"
}
</arguments>
</use_mcp_tool>

Respuesta

La herramienta devuelve:

  • Un mensaje de texto formateado con detalles sobre las imágenes generadas

  • Las imágenes como datos codificados en base64

  • Metadatos que incluyen el uso de tokens y rutas de archivos

Herramienta: create_image_edit

Edita una imagen existente basándose en un mensaje de texto y una máscara opcional.

Parámetros

Parámetro

Tipo

Requerido

Descripción

image

cadena, objeto o matriz

Sí

Las imágenes a editar (cadena base64 u objeto de ruta de archivo)

prompt

cadena

Sí

La descripción del texto de la edición deseada (máximo 32.000 caracteres)

mask

cadena u objeto

No

La máscara que define las áreas a editar (cadena base64 u objeto de ruta de archivo)

size

cadena

No

Tamaño de la imagen: "1024x1024" (predeterminado), "1536x1024" o "1024x1536"

quality

cadena

No

Calidad de imagen: "alta" (predeterminada), "media" o "baja"

n

entero

No

Número de imágenes a generar (1-10, predeterminado: 1)

background

cadena

No

Estilo de fondo: "transparente", "opaco" o "automático" (predeterminado)

user

cadena

No

Identificador de usuario para el seguimiento del uso de OpenAI

Ejemplo con imagen codificada en Base64

<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image_edit</tool_name>
<arguments>
{
  "image": "BASE64_ENCODED_IMAGE_STRING",
  "prompt": "Add a small robot in the corner",
  "mask": "BASE64_ENCODED_MASK_STRING",
  "quality": "high"
}
</arguments>
</use_mcp_tool>

Ejemplo con ruta de archivo

<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image_edit</tool_name>
<arguments>
{
  "image": {
    "filePath": "C:/path/to/your/image.png"
  },
  "prompt": "Add a small robot in the corner",
  "mask": {
    "filePath": "C:/path/to/your/mask.png"
  },
  "quality": "high"
}
</arguments>
</use_mcp_tool>

Respuesta

La herramienta devuelve:

  • Un mensaje de texto formateado con detalles sobre las imágenes editadas

  • Las imágenes editadas como datos codificados en base64

  • Metadatos que incluyen el uso de tokens y rutas de archivos

🔧 Solución de problemas

🚨 Problemas comunes

🔍 Manejo y generación de informes de errores

El servidor MCP incluye un sistema integral de gestión de errores que proporciona información detallada cuando algo falla. Cuando se produce un error:

  1. Formato de error : Todos los errores se devuelven con:

    • Un mensaje de error claro que describe qué salió mal

    • El código o tipo de error específico

    • Contexto adicional sobre el error cuando esté disponible

  2. Comportamiento del asistente de IA : al utilizar este servidor MCP con asistentes de IA:

    • La IA siempre informará el mensaje de error completo para ayudar con la solución de problemas.

    • La IA explicará la causa probable del error en un lenguaje sencillo.

    • La IA sugerirá pasos específicos para resolver el problema.

📄 Licencia

🙏 Agradecimientos

Available Tools

2 tools
create_imageD
ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
backgroundNo
nNo
output_compressionNo
output_formatNo
qualityNo
sizeNo
userNo
moderationNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_image_editD
ParametersJSON Schema
NameRequiredDescriptionDefault
imageYes
promptYes
backgroundNo
maskNo
nNo
qualityNo
sizeNo
userNo

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updates
    • First observedcreate_image
    • First observedcreate_image_edit

TDQS

D1.5/5.0

Scored across 2 tools

Disambiguation2/5

The two tools have overlapping purposes—both involve creating images—and without descriptions, it's unclear how they differ. 'create_image_edit' suggests editing an existing image, but this could easily be confused with the base 'create_image' tool, leading to potential misselection.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'create_image' as the base, and 'create_image_edit' extends this logically. The naming is predictable and clear, with no deviations in style or convention.

Tool Count2/5

With only 2 tools, the server feels thin for an image-related domain, which typically requires operations like listing, retrieving, updating, or deleting images. This limited set may not support common workflows, making it under-scoped.

Completeness1/5

The tool surface is severely incomplete for an image server; there are no tools for reading, updating, deleting, or managing images beyond creation and editing. This will cause significant agent failures in handling image lifecycles or varied tasks.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers