Azure Image Editor MCP Server
中文 | English
This is an MCP (Model Context Protocol) server that supports Azure AI Foundry image generation and editing capabilities.
Features
- Text-to-Image Generation - Generate high-quality images from text descriptions using Azure AI Foundry models
- Image Editing - Edit and modify existing images
- Configurable Models - Support for multiple Azure AI models via environment variables
Demo
Click 👇 to go to the demo on YouTube
Project Structure
Prerequisites
⚠️ Important: Before using this MCP server, you must deploy the required model in your Azure AI Foundry environment.
Azure AI Foundry Model Deployment
- Access Azure AI Foundry: Go to Azure AI Foundry
- Deploy the model: Deploy
flux.1-kontext-pro
(or your preferred model) in your Azure AI Foundry workspace - Get deployment details: Note down your:
- Base URL (endpoint)
- API key
- Deployment name
- Model name
Without proper model deployment, the MCP server will not function correctly.
Installation and Setup
- Clone and setup environment:
Configure VSCode MCP
Add the following to your VSCode MCP configuration:
Important: Replace /full/path/to/
with the actual absolute path to this project directory.
Available MCP Tools
1. generate_image
Generate images from text prompts
Parameters:
prompt
(required): English text description for image generationsize
(optional): Image size - "1024x1024", "1792x1024", "1024x1792", default: "1024x1024"output_path
(optional): Output file path, returns base64 encoded image if not provided
Example:
2. edit_image
Edit existing images with intelligent dimension preservation
Parameters:
image_path
(required): Path to the image file to editprompt
(required): English text description of how to edit the imagesize
(optional): Output image size, uses original dimensions if not specifiedoutput_path
(optional): Output file path, returns base64 encoded image if not provided
Example:
Technical Specifications
- Python version: 3.8+
- Main dependencies:
mcp
: MCP protocol supporthttpx
: HTTP client with timeout handlingpillow
: Image processing and dimension detectionaiofiles
: Async file operationspydantic
: Data validationpython-dotenv
: Environment variable management
- Azure AI Foundry:
- Default model: flux.1-kontext-pro (configurable)
- Default API version: 2025-04-01-preview (configurable)
- Supported image sizes: 1024x1024, 1792x1024, 1024x1792
- Timeout: 5 minutes per request
Troubleshooting
- Timeout Errors: Image processing has 5-minute timeout, check network connectivity
- API Errors: Verify Azure credentials and endpoint URL
- Dependency Issues: Ensure virtual environment is activated and dependencies installed
- Server Connection Issues: Verify VSCode MCP configuration path is correct
License
MIT License
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables text-to-image generation and image editing using Azure AI Foundry models. Supports generating high-quality images from text descriptions and modifying existing images through natural language prompts.
Related MCP Servers
- AsecurityAlicenseAqualityA server that integrates Flux's advanced image generation and manipulation features into AI coding assistants, enabling seamless text-to-image and image control workflows in IDEs like Cursor and Windsurf.Last updated -420MIT License
- -securityAlicense-qualityA server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.Last updated -13MIT License
- -securityAlicense-qualityProvides tools for generating and editing images using OpenAI's gpt-image-1 model via an MCP interface, enabling AI assistants to create and modify images based on text prompts.Last updated -16Apache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol server that enables generating and editing images using OpenAI's gpt-image-1 model, allowing AI assistants to create and modify images from text prompts.Last updated -23616MIT License