FLUX MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FLUX_OUTPUT_DIR | No | Output directory for generated images | |
| FLUX_MODEL_CACHE | No | Optional: Custom HuggingFace cache directory | |
| FLUX_UNLOAD_TIMEOUT | No | Auto-unload timeout in seconds (default: 300 = 5 minutes) | 300 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| generate_imageA | Generate high-quality images using FLUX models. Two models available: FLUX.1-dev (faster, 40 steps default) and FLUX.2-dev (highest quality, 50 steps default). Both models are optimized for quality output. Images are saved to the configured output directory with embedded metadata. IMPORTANT: This tool is LONG-RUNNING and NON-BLOCKING. flux1-dev takes ~4-8 min, flux2-dev takes ~30-40 min. The MCP client may receive a timeout error - this is EXPECTED and NORMAL. Do NOT treat a timeout as a failure. Inform the user that generation is running in the background and they should upload the result image when ready. |
| unload_modelA | Immediately unload the FLUX model from GPU memory. Use this to free up VRAM when you're done generating images. The model will be automatically reloaded on the next generation request. |
| get_statusA | Get current status of the FLUX generator. Shows whether the model is loaded, time until auto-unload, and current VRAM usage. |
| set_timeoutA | Set the auto-unload timeout for the FLUX model. The model will automatically unload after this many seconds of inactivity. Set to 0 to disable auto-unload. |
| get_previewA | Retrieve a preview (thumbnail) of a generated image. Use this after generate_image completes — especially useful for FLUX.2-dev background generations where the MCP client timed out. Pass the image_id from generate_image output, or omit to get the last generated image. Returns the thumbnail inline and the full-size image path. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/tehw0lf/flux-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server