Azure Image Generation MCP
The Azure Image Generation MCP server enables AI-powered image generation using Azure's DALL-E 3 and FLUX models, integrated with LibreChat.
Generate images from text prompts — Describe what you want in natural language and receive a Base64-encoded PNG image in response
Choose between AI models — Select
dall-e-3for photorealistic/artistic content,fluxfor creative illustrations, or letautomode intelligently pick based on your prompt (defaults to FLUX)Control image dimensions — Square (
1024x1024), wide (1792x1024), or tall (1024x1792) formatsAdjust DALL-E 3 style —
vividfor dramatic/artistic results ornaturalfor realistic/subdued imagerySet DALL-E 3 quality —
standardfor faster generation orhdfor higher detailReceive structured responses — Each generation returns the Base64 image along with metadata including model used, size, and generation time
Integrate with LibreChat — Use seamlessly as an MCP tool within the LibreChat interface
Provides access to FLUX.1-Kontext-pro model for creative illustrations and flexible image generation through Azure AI Foundry
Enables AI-powered image generation through Azure OpenAI's DALL-E 3 model for photorealistic images, portraits, and artistic content with customizable quality and style settings
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., "@Azure Image Generation MCPcreate a photorealistic sunset over mountains with a lake"
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.
Azure Image Generation MCP
Model Context Protocol (MCP) server for AI-powered image generation using Azure DALL-E 3 and FLUX models
🎨 Overview
A powerful MCP server that brings professional AI image generation to LibreChat. Generate stunning images using Azure's DALL-E 3 for photorealistic content or FLUX for creative artwork, with intelligent automatic model selection based on your prompts.
Perfect for LibreChat users who want seamless image generation capabilities powered by Azure AI Foundry models.
Related MCP server: ImageGen MCP Server
✨ Features
🤖 Dual Model Support
DALL-E 3: Photorealistic images, portraits, and artistic content
FLUX (FLUX.1-Kontext-pro): Creative illustrations and flexible generation
🧠 Intelligent Model Selection
Automatic model selection based on prompt analysis
FLUX as default for optimal results
DALL-E 3 when explicitly requested or optimal
📐 Multiple Image Sizes
Square (1024x1024) - Perfect for social media
Wide (1792x1024) - Great for banners and headers
Tall (1024x1792) - Ideal for posters and vertical content
⚙️ Customization Options
Quality settings (standard/HD) for DALL-E 3
Style options (vivid/natural) for DALL-E 3
Fast generation times (typically 30-60 seconds)
🔌 Easy Integration
Works seamlessly with LibreChat
Compatible with MCP clients
Simple configuration via environment variables
📋 Prerequisites
Node.js >= 18.0.0
Azure OpenAI API access with:
DALL-E 3 deployment (optional)
FLUX deployment (FLUX.1-Kontext-pro)
LibreChat instance (for LibreChat integration)
🚀 Installation
Option 1: NPM Installation (Recommended)
npm install -g azure-image-generation-mcpOption 2: From Source
git clone https://github.com/malikmalikayesha/azure-image-generation-mcp.git
cd azure-image-generation-mcp
npm installOption 3: NPX (No Installation)
npx azure-image-generation-mcp⚙️ Configuration
1. Environment Variables
Create a .env file or set environment variables:
AZURE_IMAGE_API_KEY=your_azure_api_key_here
AZURE_IMAGE_BASE_URL=https://your-endpoint.cognitiveservices.azure.com/openai/deployments2. LibreChat Integration
Add to your librechat.yaml:
mcpServers:
"Image Generation":
type: stdio
command: node
args:
- /path/to/azure-image-generation-server.js
name: "Image Generation"
displayName: "Image Generation"
timeout: 180000 # 3 minutes for generation
initTimeout: 60000 # 1 minute startup
chatMenu: true # Show in chat tools
serverInstructions: |
🎨 AI Image Generation Tool
Create stunning images using DALL-E 3 or FLUX models.
Simply describe what you want to see!
env:
AZURE_IMAGE_API_KEY: "${AZURE_IMAGE_API_KEY}"
AZURE_IMAGE_BASE_URL: "${AZURE_IMAGE_BASE_URL}"📖 Usage
In LibreChat
Simply ask the AI to generate an image:
"Generate an image of a serene mountain landscape at sunset"
"Create a modern minimalist logo for a tech startup"
"Draw a realistic portrait of a confident businesswoman"
"Make an abstract pattern with geometric shapes"Model Selection
Automatic (Default): The system intelligently chooses between DALL-E 3 and FLUX
FLUX (Default): Used for most requests unless DALL-E is explicitly mentioned
DALL-E 3: Explicitly request by mentioning "DALL-E" in your prompt
Advanced Options
Specify additional parameters in your request:
"Generate a wide landscape image in HD quality using DALL-E"
Size: 1792x1024, Quality: HD, Model: DALL-E 3
"Create a tall poster with vivid colors"
Size: 1024x1792, Style: vivid🔧 Docker Deployment (LibreChat)
If using Docker with LibreChat, add to your Dockerfile:
# Install MCP SDK dependencies
RUN npm install @modelcontextprotocol/sdk@^1.17.2
# Copy Azure image generation files
COPY azure-image-generation-server.js ./Then ensure your docker-compose.yml includes the environment variables:
services:
api:
environment:
- AZURE_IMAGE_API_KEY=${AZURE_IMAGE_API_KEY}
- AZURE_IMAGE_BASE_URL=${AZURE_IMAGE_BASE_URL}🛠️ API Reference
Tool: generate_image
Generates an AI image based on a text prompt.
Parameters
Parameter | Type | Required | Default | Description |
| string | Yes | - | Description of the image to generate |
| string | No |
| Model selection: |
| string | No |
| Image dimensions: |
| string | No |
| DALL-E style: |
| string | No |
| DALL-E quality: |
Response
Returns a structured response with:
Text description of the generated image
Base64-encoded PNG image data
Metadata (model used, size, generation time)
🐛 Troubleshooting
Common Issues
Images not displaying in Azure models:
Ensure you're using LibreChat with the MCP image rendering fix (included in LibreChat v0.7.9+)
Check that your
librechat.yamlconfiguration is correct
MCP server fails to start:
Verify environment variables are set correctly
Check that Node.js version is >= 18.0.0
Ensure
@modelcontextprotocol/sdkis installed
API errors:
Verify your Azure API key is valid
Check that the base URL points to your Azure OpenAI endpoint
Ensure your Azure deployment has DALL-E 3 or FLUX enabled
Generation timeout:
Increase
timeoutvalue inlibrechat.yaml(default: 180000ms)Check your network connectivity to Azure
Debug Mode
Enable debug logging by checking LibreChat logs:
# Docker
docker logs librechat-api
# Local
DEBUG=* npm start📝 Example Prompts
Photorealistic Images
"A professional headshot of a software engineer in a modern office"
"Sunset over Tokyo skyline with Mount Fuji in the distance"
"Close-up of fresh vegetables on a wooden cutting board"Artistic & Creative
"Minimalist logo design for a coffee shop called 'Bean Dreams'"
"Watercolor painting of a cottage in a flower garden"
"Abstract geometric pattern in blues and golds"Marketing & Design
"Modern tech startup hero banner image, wide format"
"Instagram post background with pastel gradients"
"Professional LinkedIn banner for a data scientist"🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Built for LibreChat - Open-source ChatGPT alternative
Uses Model Context Protocol (MCP) by Anthropic
Powered by Azure AI Foundry models
📬 Support
Issues: GitHub Issues
LibreChat Discord: Join the community
Documentation: LibreChat Docs
Made with ❤️ for the LibreChat community
Available Tools
1 toolgenerate_imageA
🎨 Create stunning AI-generated images using Azure DALL-E 3 or FLUX models with intelligent model selection
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Describe the image you want to create in natural language. Be detailed for best results. Examples: "A serene mountain landscape at sunset", "Modern minimalist logo design", "Cute cartoon mascot for a coffee shop" | |
| model | No | Choose AI model: "dall-e-3" (photorealistic, artistic), "flux" (creative, flexible), or "auto" (smart selection based on prompt) | auto |
| size | No | Image dimensions: Square (1024x1024) for social media, Wide (1792x1024) for banners, Tall (1024x1792) for posters | 1024x1024 |
| style | No | Visual style (DALL-E only): "vivid" for dramatic/artistic, "natural" for realistic/subdued | vivid |
| quality | No | Image quality (DALL-E only): "standard" for faster generation, "hd" for higher detail | standard |
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. While it mentions model selection and creation capabilities, it lacks critical information about rate limits, authentication requirements, cost implications, response format, or error handling. For a generative AI tool with potential costs and limitations, this represents significant gaps in behavioral transparency.
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 exceptionally concise and well-structured in a single sentence that communicates the core capability, technology stack, and key feature. Every element earns its place: the emoji adds visual context, 'Create stunning AI-generated images' states the purpose, 'using Azure DALL-E 3 or FLUX models' specifies technology, and 'with intelligent model selection' highlights differentiation. No wasted words.
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 tool's complexity (AI image generation with multiple models and parameters) and lack of both annotations and output schema, the description is incomplete. While concise and clear about purpose, it doesn't address behavioral aspects like cost, rate limits, or response format that are crucial for such a tool. The excellent schema coverage helps, but the description alone doesn't provide sufficient context for safe and effective 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?
The description provides no parameter-specific information beyond what's already comprehensively documented in the input schema (100% coverage). The schema includes detailed descriptions, examples, enums, and defaults for all parameters. The description adds no additional semantic context about parameters, so it meets but doesn't exceed the baseline expectation when schema coverage is complete.
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 with specific verbs ('Create stunning AI-generated images') and resources ('using Azure DALL-E 3 or FLUX models'). It distinguishes the tool's unique capability of 'intelligent model selection' which adds differentiation even without sibling tools. The description goes beyond just restating the name by specifying the technology and key feature.
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 implies usage context through phrases like 'intelligent model selection' and mentions of specific models, but provides no explicit guidance on when to use this tool versus alternatives. There are no sibling tools mentioned, so the lack of comparative guidance is understandable, but it doesn't offer any when/when-not advice or prerequisites for successful use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of confusion or overlap between tools. The tool's purpose is clearly defined and distinct by default.
A single tool inherently has consistent naming, as there are no other tools to compare it against. The name 'generate_image' follows a clear verb_noun pattern.
One tool is too few for a server focused on Azure image generation, as it lacks operations like listing models, checking generation status, or managing images. This minimal set limits agent capabilities and feels incomplete for the domain.
The tool set is severely incomplete for image generation; it only provides generation without supporting operations like model selection, status tracking, or image management. This will cause significant agent failures in workflows requiring more than basic generation.
Related MCP Connectors
Generate images with your own ChatGPT subscription (Plus, Pro or Team), without spending API credits
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
AI image, video & music generation. Flux, Veo 3.1, Suno V5. Free tier included.
Generate, edit, and explore AI images. Flux, Imagen, LoRA identity swap, upscale, and more.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to generate high-quality images using Google's Gemini and Imagen models with support for multiple aspect ratios, dynamic model selection, and direct file saving capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI image generation through multiple providers including OpenAI GPT-Image-1, Google Imagen 4, Gemini 2.5 Flash (Nano Banana), Flux 1.1, Qwen Image, and SeedDream-4, supporting various formats, sizes, and advanced features like background control and seed-based reproduction.8010MIT
- AlicenseAqualityFmaintenanceEnables AI image generation via Antigravity (Google Gemini) and OpenAI DALL-E 3, supporting text-to-image, image editing, multiple outputs, and character consistency.5159MIT
- FlicenseNot gradedqualityCmaintenanceGenerates images using OpenRouter models and retrieves user-uploaded images from LibreChat database, enabling image generation and editing with reference images.1
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/malikmalikayesha/Azure-Image-Generation-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server