Skip to main content
Glama

mcpGetImage

Servidor MCP en Python para pedir imágenes de dulces, refinarlas como fotografía de producto sobre fondo blanco y quitarles el fondo con rembg/U2-Net, inspirado en el flujo de PACA.

El flujo usa Image API porque la guía de OpenAI la recomienda cuando se necesita crear una imagen desde un solo prompt. El modelo por defecto es gpt-image-2, configurable con OPENAI_IMAGE_MODEL.

Requisitos

  • Python 3.10+

  • OPENAI_API_KEY

  • La primera vez, rembg descarga el modelo U2-Net localmente.

Related MCP server: nano-banana-claude

Instalación

python3.12 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env

Edita .env y agrega tu OPENAI_API_KEY.

Ejecutar como servidor MCP

mcp-get-image

Ese comando es para clientes MCP y usa stdio. Si lo corres directo en la terminal, se queda esperando mensajes JSON-RPC del cliente; no es un chat interactivo. Para probar manualmente usa la CLI de abajo.

Configuración típica para un cliente MCP:

{
  "mcpServers": {
    "mcp-get-image": {
      "command": "/Users/djoker/code/mcpGetImage/.venv/bin/mcp-get-image"
    }
  }
}

Herramientas MCP

  • refine_candy_prompt: convierte una petición como "necesito imágenes de dulces" en un prompt de producto más preciso.

  • generate_candy_image: genera la imagen con OpenAI, pide fondo blanco, remueve el fondo y guarda un WebP transparente.

  • remove_background: procesa una imagen local existente y la exporta como WebP transparente.

CLI local

Sirve para probar sin cliente MCP:

mcp-get-image-cli "gomitas enchiladas mexicanas en bolsa transparente"

Mientras genera, la CLI escribe progreso en stderr:

[ 20%] Refining candy prompt for white-background product photography.
[ 40%] Calling OpenAI Images. This is usually the slowest step.
[ 60%] White-background image saved: ...
[ 80%] Removing background with rembg/U2-Net.
[100%] Transparent WebP saved: ...

OpenAI no expone porcentaje interno real durante una llamada normal a images.generate, así que el 40% puede tardar. Ese mensaje significa que la imagen ya fue solicitada y estamos esperando respuesta del modelo.

Para ver el prompt sin generar imagen ni gastar API:

mcp-get-image-cli --prompt-only "gomitas enchiladas mexicanas en bolsa transparente"

Para quitar fondo a una imagen local:

mcp-get-image-cli --remove-background outputs/mi_imagen.png

Los archivos se guardan por defecto en ./outputs.

Notas

El API oficial de OpenAI Images permite generar imágenes desde texto con modelos GPT Image y devuelve base64 para los modelos GPT Image. Este proyecto usa images.generate, configurable con OPENAI_IMAGE_MODEL; por defecto usa gpt-image-2.

Available Tools

3 tools
generate_candy_imageC

Generate a candy image with OpenAI, then remove its white background.

ParametersJSON Schema
NameRequiredDescriptionDefault
styleNofotografia de producto premium
requestYes
compositionNoproducto centrado, vista tres cuartos
output_nameNo
extra_detailsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the two main operations but omits critical details such as output format, whether the removal is automatic, potential side effects on the generated image, or any limitations. This leaves the agent under-informed about the tool's runtime behavior.

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

Conciseness5/5

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

The description is a single, concise sentence that front-loads the core action. It avoids wordiness and includes no redundant information, achieving optimal efficiency.

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

Completeness2/5

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

Given the tool's moderate complexity (5 parameters, no annotations) and zero schema description coverage, the one-line description is insufficient for an agent to invoke it correctly. The presence of an output schema does not compensate for missing parameter semantics and usage context.

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?

Schema description coverage is 0%, and the description provides zero explanation of the parameters (style, request, composition, output_name, extra_details). The description must compensate for the lack of schema documentation but fails entirely, leaving agents without clues to what each parameter means.

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

Purpose5/5

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

The description clearly states a two-step action: generate a candy image using OpenAI and then remove its white background. This is a specific verb-plus-resource statement that distinguishes the tool from sibling tools like 'remove_background' and 'refine_candy_prompt' by combining both generation and background removal.

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

Usage Guidelines2/5

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

No explicit guidance is provided on when to use this tool versus alternatives. While the description implies a use case (generating a new candy image with a cleaned background), it does not mention that users needing only background removal should use 'remove_background' instead, nor does it outline any prerequisites or exclusions.

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

refine_candy_promptB

Refine a candy image request into a white-background product prompt.

ParametersJSON Schema
NameRequiredDescriptionDefault
styleNofotografia de producto premium
requestYes
compositionNoproducto centrado, vista tres cuartos
extra_detailsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It only states the core function and does not mention any side effects, return values, or limitations. For a transformation tool, there's no context about output format or relationship to other tools, so transparency is minimal.

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

Conciseness5/5

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

The description is a single sentence with no wasted words. It is front-loaded with the verb 'Refine' and provides the essential purpose efficiently.

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

Completeness2/5

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

With 4 parameters and no annotations, the one-sentence description is insufficient to fully understand tool usage. It does not explain parameter semantics, default values, or how the refined prompt should be used alongside sibling tools. Though an output schema exists, the description itself lacks enough context.

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?

Schema description coverage is 0% (none of the 4 parameters are described). The description provides no parameter-level semantics, failing to explain what 'request', 'style', 'composition', or 'extra_details' mean or how they interact. Since coverage is low, the description should compensate but doesn't.

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

Purpose5/5

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

The description uses the specific verb 'refine' and states the resource ('candy image request') and outcome ('white-background product prompt'). This clearly distinguishes it from sibling tools 'generate_candy_image' and 'remove_background'.

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

Usage Guidelines3/5

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

The description implies usage (when you need to turn a candy request into a product prompt) but does not explicitly state when-not-to-use or mention alternative tools. No exclusions are given, so guidance is present but implied rather than explicit.

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

remove_backgroundA

Remove the background from a local image and save a transparent WebP.

ParametersJSON Schema
NameRequiredDescriptionDefault
image_pathYes
output_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior3/5

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

Without annotations, the description carries the burden of disclosing behavior. It explains the transformation (background removed) and the output format (transparent WebP), and notes the input is a local image. However, it does not mention side effects like overwriting, default output behavior when output_path is null, or error conditions, leaving some behavioral gaps.

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

Conciseness5/5

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

The description is a single sentence of 12 words, highly concise and front-loaded. Every word earns its place, clearly stating the action and result without redundancy.

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

Completeness3/5

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

Given the tool's simplicity and the presence of an output schema, the description covers the core functionality. However, it omits important operational details such as default output path behavior and whether existing files are overwritten. It is minimally complete but lacks robustness for an unannotated tool.

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

Parameters2/5

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

With 0% schema description coverage, the description should compensate. It clarifies that image_path refers to a local image, but it does not explain the output_path parameter at all, including its optionality or default behavior. The description adds minimal value over the raw schema.

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

Purpose5/5

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

The description clearly states the tool's function: removing the background from a local image and saving a transparent WebP. This specific verb+resource structure distinguishes it from the sibling tools, which are about candy prompt refinement and image generation, making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage when the user wants to remove an image background, but does not explicitly state when to use it versus alternatives or mention any prerequisites. Since sibling tools are unrelated, the implied context is sufficient for basic selection, though explicit guidance is missing.

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. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedgenerate_candy_image
    • First observedrefine_candy_prompt
    • First observedremove_background

TDQS

A3.6/5.0
Disambiguation5/5

Each tool targets a distinct stage: prompt refinement, image generation with background removal, and standalone background removal for local images. No two tools have overlapping purposes.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: refine_candy_prompt, generate_candy_image, remove_background. The naming is uniform and predictable.

Tool Count5/5

Three tools perfectly cover the intended workflow: refine, generate, and process. The count is well-scoped for the server's purpose.

Completeness4/5

The pipeline is complete for candy image generation with background removal. The only minor gap is the absence of a standalone background-refinement option, but the core workflow is fully supported.

Maintenance

ActivityStale
ResponsivenessSyncing

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

Related MCP Servers

Latest Blog Posts

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/raulisai/mcpGetImage'

If you have feedback or need assistance with the MCP directory API, please join our Discord server