- Home
- MCP servers
- Azure Image Editor
Azure Image Editor
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run an MCP server that leverages Azure AI Foundry to generate and edit images from text prompts. It supports multiple models, can operate via STDIO for local development or HTTP/JSON-RPC for remote access, and returns either file outputs or base64-encoded images to clients.
How to use
Connect your MCP client to the server using either the STDIO mode for local development or the HTTP/JSON-RPC mode for remote access. In STDIO mode, you interact with the server directly through your IDE or editor. In HTTP mode, you send JSON-RPC requests to the server’s REST endpoint to generate or edit images.
How to install
Prerequisites you need before running the server are Python 3.8+ and a virtual environment utility. You will also configure environment variables for Azure access.
git clone https://github.com/satomic/Azure-AI-Image-Editor-MCP.git
cd azure-image-editor
python -m venv .venv
# Linux/Mac
source .venv/bin/activate
# Windows
.venv\Scripts\activate
pip install -r requirements.txt
To run the HTTP/JSON-RPC server locally, set the required environment variables and start the HTTP server using the provided script.
export AZURE_BASE_URL=https://your-endpoint.services.ai.azure.com
export AZURE_API_KEY=your-api-key
export AZURE_DEPLOYMENT_NAME=FLUX.1-Kontext-pro
export AZURE_MODEL=flux.1-kontext-pro
export AZURE_API_VERSION=2025-04-01-preview
export MCP_SERVER_HOST=127.0.0.1
export MCP_SERVER_PORT=8000
# Start the HTTP MCP server
python src/mcp_server_http.py
Configuration and usage notes
Two server modes are supported. In STDIO mode, run the local Python executable and the MCP server script to enable direct I/O with your tooling. In HTTP/JSON-RPC mode, the server exposes a JSON-RPC endpoint at the configured host and port, returning image data and status information.
# STDIO mode example (conceptual)
path/to/.venv/bin/python path/to/azure-image-editor/src/mcp_server.py
Troubleshooting
If you encounter timeouts, verify the Azure credentials and the endpoint. Ensure the virtual environment is activated and dependencies are installed. For HTTP mode, confirm the server host/port are reachable and the JSON-RPC requests are correctly formed.
Security and notes
Keep your Azure API key secure and do not expose it in client-side code. Use environment variables to configure secrets and restrict network access to the HTTP endpoint as appropriate for your deployment.
Available tools
generate_image
Create images from text prompts with optional size and output path. Returns image data or saves to a file if output_path is provided.
edit_image
Edit existing images based on a text prompt. Supports STDIO with file paths or HTTP with base64 or Data URL image data. Returns edited image data and can save to a server path.