FLUX Image Generator MCP Server
Generador de imágenes FLUX Servidor MCP
Un servidor MCP (Protocolo de Contexto de Modelo) para generar imágenes utilizando el modelo FLUX de Black Forest Lab. Utiliza el SDK de MCP más reciente (v1.7.0).
Características
Generar imágenes basadas en indicaciones de texto
Personalice las dimensiones de la imagen, solicite un sobremuestreo y configuraciones de seguridad
Guardar las imágenes generadas localmente
Generación de imágenes por lotes a partir de múltiples indicaciones
Related MCP server: Flux Schnell Server
Prerrequisitos
Node.js (v18.0.0 o superior)
Clave API de Black Forest Lab (obtenga una en https://api.bfl.ml )
Instalación
De la fuente
Clonar este repositorio
Instalar dependencias:
npm installCree un archivo
.envbasado en.env.exampley agregue su clave API de Black Forest Lab:
BFL_API_KEY=your_api_key_hereConstruir el proyecto:
npm run buildUsando npm
npm install -g @modelcontextprotocol/server-flux-image-generatorUso
Iniciar el servidor MCP
Inicie el servidor con:
npm startPara el desarrollo con recompilación automática:
npm run watchIntegración con clientes MCP
Para utilizar este servidor con clientes MCP (como Claude), agregue lo siguiente a la configuración de su cliente:
{
"mcpServers": {
"flux-image-generator": {
"command": "mcp-server-flux-image-generator",
"env": {
"BFL_API_KEY": "your_api_key_here"
}
}
}
}Herramientas disponibles
generarImagen
Genera una imagen basada en un mensaje de texto con configuraciones personalizables.
Parámetros:
prompt(cadena, obligatorio): Descripción de texto de la imagen a generarwidth(número, opcional, predeterminado: 1024): Ancho de la imagen en píxelesheight(número, opcional, predeterminado: 1024): Altura de la imagen en píxelespromptUpsampling(booleano, opcional, valor predeterminado: falso): mejora los detalles mediante un muestreo superior del mensajeseed(número, opcional): semilla aleatoria para obtener resultados reproduciblessafetyTolerance(número, opcional, predeterminado: 3): Tolerancia de moderación de contenido (1-5)
Ejemplo:
{
"prompt": "A serene lake at sunset with mountains in the background",
"width": 1024,
"height": 768,
"promptUpsampling": true,
"seed": 12345,
"safetyTolerance": 3
}Imagen rápida
Una herramienta simplificada para generar rápidamente imágenes con configuraciones predeterminadas.
Parámetros:
prompt(cadena, obligatorio): Descripción de texto de la imagen a generar
Ejemplo:
{
"prompt": "A futuristic cityscape with flying cars"
}Generar imágenes por lotes
Genera múltiples imágenes a partir de una lista de indicaciones.
Parámetros:
prompts(matriz de cadenas, obligatoria): lista de indicaciones de texto (máximo 10)width(número, opcional, predeterminado: 1024): Ancho de las imágenesheight(número, opcional, predeterminado: 1024): Altura de las imágenes
Ejemplo:
{
"prompts": [
"A serene lake at sunset",
"A futuristic cityscape",
"A magical forest with glowing plants"
],
"width": 1024,
"height": 768
}Formato de salida
Todas las herramientas devuelven respuestas en este formato:
{
"image_url": "https://storage.example.com/generated_image.jpg",
"local_path": "/path/to/output/flux_1234567890.png"
}Para errores:
{
"error": true,
"message": "Error description"
}La herramienta por lotes devuelve:
{
"total": 3,
"successful": 2,
"failed": 1,
"results": [
{
"prompt": "A serene lake at sunset",
"success": true,
"image_url": "https://storage.example.com/image1.jpg",
"local_path": "/path/to/output/flux_batch_1234567890_0.png"
},
{
"prompt": "A futuristic cityscape",
"success": true,
"image_url": "https://storage.example.com/image2.jpg",
"local_path": "/path/to/output/flux_batch_1234567890_1.png"
},
{
"prompt": "Prohibited content",
"success": false,
"error": "Content policy violation"
}
]
}Licencia
Instituto Tecnológico de Massachusetts (MIT)
Available Tools
3 toolsbatchGenerateImagesC
Generate multiple images from a list of prompts
| Name | Required | Description | Default |
|---|---|---|---|
| prompts | Yes | List of text prompts | |
| width | No | Width of the images | |
| height | No | Height of the images | |
| customPath | No | Custom path to save the generated images |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It doesn't describe what happens during generation (e.g., processing order, error handling), output format, rate limits, authentication needs, or whether it's a read/write operation. The description merely states what the tool does without revealing how it behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence with zero wasted words. It's front-loaded with the core functionality and appropriately sized for the tool's complexity. Every word earns its place in communicating the essential purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a batch generation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address critical context like what the tool returns (image URLs, file paths, error information), how multiple prompts are processed, or any behavioral characteristics. The agent would need to guess about important operational aspects.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain prompt formatting expectations, width/height constraints, or customPath usage scenarios. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('generate multiple images') and the resource ('from a list of prompts'), making the purpose immediately understandable. It distinguishes from 'generateImage' by specifying 'multiple' images, but doesn't explicitly differentiate from 'quickImage' which might imply a similar batch capability.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the sibling tools 'generateImage' or 'quickImage'. There's no mention of use cases, prerequisites, performance considerations, or alternative selection criteria, leaving the agent with insufficient context for optimal tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generateImageC
Generate an image using Black Forest Lab's FLUX model based on a text prompt
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the image to generate | |
| width | No | Width of the image in pixels | |
| height | No | Height of the image in pixels | |
| promptUpsampling | No | Enhance detail by upsampling the prompt | |
| seed | No | Random seed for reproducible results | |
| safetyTolerance | No | Content moderation tolerance (1-5) | |
| customPath | No | Custom path to save the generated image |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the model (FLUX) but fails to describe key traits like rate limits, authentication needs, output format (e.g., image file type), error handling, or performance characteristics. This leaves significant gaps for a tool that likely involves external API calls and resource-intensive operations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of an image generation tool with 7 parameters, no annotations, and no output schema, the description is incomplete. It lacks information on behavioral aspects, usage guidelines, and output details (e.g., how the image is returned), which are crucial for proper tool invocation in this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, meaning all parameters are documented in the schema. The description does not add any additional meaning or context beyond what the schema provides (e.g., it doesn't explain prompt best practices or safety tolerance implications). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Generate an image') and specifies the resource (using Black Forest Lab's FLUX model based on a text prompt), which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'batchGenerateImages' or 'quickImage', which might offer batch processing or faster generation, so it misses full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'batchGenerateImages' or 'quickImage'. It lacks context about scenarios, prerequisites, or exclusions, leaving the agent without explicit usage instructions beyond the basic function.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
quickImageC
Quickly generate an image based on a text prompt with default settings
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Text description of the image to generate | |
| customPath | No | Custom path to save the generated image |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions 'quickly' and 'default settings,' hinting at speed and simplicity, but lacks details on permissions, rate limits, output format (e.g., image type, size), or whether it's a read-only or mutating operation. This is inadequate for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It's front-loaded with the core action and appropriately sized for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no output schema, and a mutation-like tool (image generation), the description is incomplete. It lacks details on behavioral traits, output handling, and differentiation from siblings. While concise, it doesn't provide enough context for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters ('prompt' and 'customPath'). The description adds no additional meaning beyond implying 'default settings' might affect generation, but it doesn't clarify parameter interactions or usage. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'generate an image based on a text prompt with default settings.' It specifies the verb ('generate') and resource ('image'), though it doesn't explicitly differentiate from sibling tools like 'generateImage' or 'batchGenerateImages' beyond mentioning 'default settings.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings. It mentions 'default settings,' which might imply a simpler or faster alternative, but it doesn't specify contexts, exclusions, or named alternatives like 'batchGenerateImages' for batch processing or 'generateImage' for more control.
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.
3 tool updates
- First observed
batchGenerateImages - First observed
generateImage - First observed
quickImage
TDQS
Scored across 3 tools
The tools have significant overlap in purpose, with all three focused on generating images from text prompts. 'generateImage' and 'quickImage' are particularly ambiguous—both generate a single image based on a prompt, differing only in default settings versus customizable ones. 'batchGenerateImages' is more distinct as it handles multiple prompts, but the overall set lacks clear boundaries.
The naming is mixed in style: 'batchGenerateImages' uses camelCase, while 'generateImage' and 'quickImage' are more descriptive but follow a similar verbNoun pattern. There's no consistent casing convention, and the verbs ('batchGenerate', 'generate', 'quick') vary without a clear pattern, making it readable but not predictable.
With only 3 tools, the count feels thin for an image generation server, as it lacks operations for managing or editing images. However, it covers basic generation tasks, so it's borderline—adequate for minimal functionality but could benefit from more comprehensive coverage.
The server is severely incomplete for an image generation domain. It only offers generation tools with no ability to retrieve, update, delete, or edit images. There are no tools for managing image metadata, applying filters, or handling errors, which are common in such systems, leading to significant gaps in agent workflows.
Related MCP Connectors
MCP server for Flux AI image generation
Official FLUX MCP server. Generate, edit, vary, and browse images from Black Forest Labs.
MCP server for Qwen Image 3 AI image generation
MCP server for NanoBanana AI image generation and editing
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables AI assistants to generate images using Black Forest Labs' Flux model via Cloudflare Workers.1MIT
- FlicenseBqualityDmaintenanceAn MCP image generation server based on the Flux Schnell model that provides API access for generating images from text prompts with customizable dimensions and seeds.11-
- FlicenseBqualityNot gradedmaintenanceAn MCP server that enables generating and editing high-quality images with natural language using Black Forest Labs' FLUX.1 Kontext Pro model.25 npm-
- AlicenseBqualityDmaintenanceAn MCP server that enables image generation using Replicate's Flux 1.1 Pro model. It provides a tool for creating visuals from text prompts with customizable settings for aspect ratio, output format, and quality.1MIT