Skip to main content
Glama

Azure AI Image Editor MCP Server

by satomic

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

  1. Text-to-Image Generation - Generate high-quality images from text descriptions using Azure AI Foundry models
  2. Image Editing - Edit and modify existing images
  3. Configurable Models - Support for multiple Azure AI models via environment variables

Demo

Click 👇 to go to the demo on YouTube

Project Structure

azure-image-editor/ ├── .venv/ # Python virtual environment ├── src/ │ ├── azure_image_client.py # Azure API client │ └── mcp_server.py # STDIO MCP server ├── tests/ # Test files ├── logs/ # Server logs ├── tmp/ # Temporary files ├── requirements.txt # Python dependencies ├── .env # Environment configuration ├── .env.example # Environment configuration template └── README.md # Project documentation

Prerequisites

⚠️ Important: Before using this MCP server, you must deploy the required model in your Azure AI Foundry environment.

Azure AI Foundry Model Deployment

  1. Access Azure AI Foundry: Go to Azure AI Foundry
  2. Deploy the model: Deploy flux.1-kontext-pro (or your preferred model) in your Azure AI Foundry workspace
  3. 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

  1. Clone and setup environment:
git clone https://github.com/satomic/Azure-AI-Image-Editor-MCP.git cd azure-image-editor python -m venv .venv source .venv/bin/activate # Linux/Mac # or .venv\Scripts\activate # Windows pip install -r requirements.txt

Configure VSCode MCP

Add the following to your VSCode MCP configuration:

{ "servers": { "azure-image-editor": { "command": "/full/path/to/.venv/bin/python", "args": ["/full/path/to/azure-image-editor/src/mcp_server.py"], "env": { "AZURE_BASE_URL": "https://your-endpoint.services.ai.azure.com", // deployment endpoint "AZURE_API_KEY": "${input:azure-api-key}", "AZURE_DEPLOYMENT_NAME": "FLUX.1-Kontext-pro", // The name you gave your deployment "AZURE_MODEL": "flux.1-kontext-pro", // Default model "AZURE_API_VERSION": "2025-04-01-preview" // Default API version } } }, "inputs": [ { "id": "azure-api-key", "type": "promptString", "description": "Enter your Azure API Key", "password": "true" } ] }

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 generation
  • size (optional): Image size - "1024x1024", "1792x1024", "1024x1792", default: "1024x1024"
  • output_path (optional): Output file path, returns base64 encoded image if not provided

Example:

{ "name": "generate_image", "arguments": { "prompt": "A beautiful sunset over mountains", "size": "1024x1024", "output_path": "/path/to/output/image.png" } }
2. edit_image

Edit existing images with intelligent dimension preservation

Parameters:

  • image_path (required): Path to the image file to edit
  • prompt (required): English text description of how to edit the image
  • size (optional): Output image size, uses original dimensions if not specified
  • output_path (optional): Output file path, returns base64 encoded image if not provided

Example:

{ "name": "edit_image", "arguments": { "image_path": "/path/to/input/image.png", "prompt": "Make this black and white", "output_path": "/path/to/output/edited_image.png" } }

Technical Specifications

  • Python version: 3.8+
  • Main dependencies:
    • mcp: MCP protocol support
    • httpx: HTTP client with timeout handling
    • pillow: Image processing and dimension detection
    • aiofiles: Async file operations
    • pydantic: Data validation
    • python-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

  1. Timeout Errors: Image processing has 5-minute timeout, check network connectivity
  2. API Errors: Verify Azure credentials and endpoint URL
  3. Dependency Issues: Ensure virtual environment is activated and dependencies installed
  4. Server Connection Issues: Verify VSCode MCP configuration path is correct

License

MIT License

-
security - not tested
F
license - not found
-
quality - not tested

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.

  1. Features
    1. Demo
      1. Project Structure
        1. Prerequisites
          1. Azure AI Foundry Model Deployment
        2. Installation and Setup
          1. Configure VSCode MCP
          2. Available MCP Tools
        3. Technical Specifications
          1. Troubleshooting
            1. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A 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 -
                4
                20
                MIT License
              • -
                security
                A
                license
                -
                quality
                A 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 -
                13
                MIT License
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                Provides 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 -
                16
                Apache 2.0
                • Linux
                • Apple
              • A
                security
                A
                license
                A
                quality
                A 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 -
                2
                32
                15
                MIT License
                • Linux
                • Apple

              View all related MCP servers

              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/satomic/Azure-AI-Image-Editor-MCP'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server