FLUX Image Generator MCP Server
The FLUX Image Generator MCP Server generates images using Black Forest Lab's FLUX model based on text prompts. You can:
Generate single images with customizable dimensions, prompt upsampling, seeds, and safety settings
Quickly generate images with default settings
Batch generate up to 10 images from multiple prompts
Save generated images locally with optional custom paths
Integrate with MCP clients like Claude for image generation workflows
Create reproducible results through seed values and enhance detail through prompt upsampling
Uses .ENV files for configuration, allowing users to securely store their Black Forest Lab API key.
Provides tools for generating images using Black Forest Lab's FLUX model with features including text-to-image generation, customizable dimensions, prompt upsampling, and batch image generation.
Runs as a Node.js application, requiring v18.0.0 or higher for operation as a prerequisite for the server.
Available as an npm package for easy installation using the package manager.
Click on "Install 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., "@FLUX Image Generator MCP Servergenerate a serene lake at sunset with mountains, 1024x768, upsampling on"
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.
FLUX Image Generator MCP Server
An MCP (Model Context Protocol) server for generating images using Black Forest Lab's FLUX model. Uses the latest MCP SDK (v1.7.0).
Features
Generate images based on text prompts
Customize image dimensions, prompt upsampling, and safety settings
Save generated images locally
Batch image generation from multiple prompts
Related MCP server: Flux Schnell Server
Prerequisites
Node.js (v18.0.0 or higher)
Black Forest Lab API key (get one at https://api.bfl.ml)
Installation
From Source
Clone this repository
Install dependencies:
npm installCreate a
.envfile based on.env.exampleand add your Black Forest Lab API key:
BFL_API_KEY=your_api_key_hereBuild the project:
npm run buildUsing npm
npm install -g @modelcontextprotocol/server-flux-image-generatorUsage
Starting the MCP Server
Start the server with:
npm startFor development with auto-recompilation:
npm run watchIntegrating with MCP Clients
To use this server with MCP clients (like Claude), add the following to your client's configuration:
{
"mcpServers": {
"flux-image-generator": {
"command": "mcp-server-flux-image-generator",
"env": {
"BFL_API_KEY": "your_api_key_here"
}
}
}
}Available Tools
generateImage
Generates an image based on a text prompt with customizable settings.
Parameters:
prompt(string, required): Text description of the image to generatewidth(number, optional, default: 1024): Width of the image in pixelsheight(number, optional, default: 1024): Height of the image in pixelspromptUpsampling(boolean, optional, default: false): Enhance detail by upsampling the promptseed(number, optional): Random seed for reproducible resultssafetyTolerance(number, optional, default: 3): Content moderation tolerance (1-5)
Example:
{
"prompt": "A serene lake at sunset with mountains in the background",
"width": 1024,
"height": 768,
"promptUpsampling": true,
"seed": 12345,
"safetyTolerance": 3
}quickImage
A simplified tool for quickly generating images with default settings.
Parameters:
prompt(string, required): Text description of the image to generate
Example:
{
"prompt": "A futuristic cityscape with flying cars"
}batchGenerateImages
Generates multiple images from a list of prompts.
Parameters:
prompts(array of strings, required): List of text prompts (maximum 10)width(number, optional, default: 1024): Width of the imagesheight(number, optional, default: 1024): Height of the images
Example:
{
"prompts": [
"A serene lake at sunset",
"A futuristic cityscape",
"A magical forest with glowing plants"
],
"width": 1024,
"height": 768
}Output Format
All tools return responses in this format:
{
"image_url": "https://storage.example.com/generated_image.jpg",
"local_path": "/path/to/output/flux_1234567890.png"
}For errors:
{
"error": true,
"message": "Error description"
}The batch tool returns:
{
"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"
}
]
}License
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.
TDQS
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.
Maintenance
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
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
- AlicenseBqualityDmaintenanceAn 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
- 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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/frankdeno/flux-image-generator-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server