claude-foundry-image
With this server you can check its Azure AI Foundry configuration and create or edit PNG images from prompts, writing files to disk rather than returning image data.
check_config— reports which env vars are set, endpoint, deployment, output dir; never reveals the API key.generate_image— generates a PNG from a text prompt via gpt-image-2 on Azure AI Foundry; accepts prompt, width, height, output_path; default 1024x1024.edit_image— edits an existing PNG/JPEG per prompt; accepts image, prompt, output_path; returns new PNG path and leaves source unchanged.Note: the README describes 2.0 tools (
flare_image,sunburst_image,check_config) with model choice, size/quality params, and edits viaimage; the provided schema shows oldergenerate_image/edit_imagetools.
Click on "Deploy 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., "@claude-foundry-image generate an image of a serene lake in autumn"
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.
claude-foundry-image
Claude Code plugin that gives every project and every conversation an image generator backed by your own Azure AI Foundry deployments of OpenAI's gpt-image-2.5, with one tool per model:
Tool | Model | Pick it for |
|
| The default: fast (about 15–25 s at low/medium) high-quality images for everyday work. Blog and social visuals, thumbnails, illustrations, icons, drafts, variations, quick edits. |
|
| The most detailed model, slower. Final deliverables and precise edits that change one thing and keep the rest intact. |
Both tools generate from a prompt, or edit an existing PNG/JPEG when you pass image.
MCP server (
server/server.mjs) — Node ≥ 18, zero dependencies. Tools:flare_image,sunburst_image,check_config.Skill
generate-image— teaches Claude which model to pick, how to expand a one-liner into a usable prompt, valid sizes, where to write files.Skill
setup— one-time configuration walkthrough.
Images are written to disk; only the file path enters the conversation. No base64 in context.
Install
claude plugin marketplace add jpaarhuis/claude-foundry-imageclaude plugin install foundry-image@jpaarhuisOr in an interactive session: /plugin → Marketplaces → add jpaarhuis/claude-foundry-image
→ install foundry-image.
Related MCP server: gpt-image-mcp
Deploy the models
Both models live on one Foundry resource in a region that offers gpt-image-2.5 (September 2026: swedencentral, polandcentral, eastus2, westus3, uaenorth; GlobalStandard only). With the default deployment names nothing else needs configuring:
az cognitiveservices account deployment create -n <resource> -g <rg> --deployment-name gpt-image-2.5-flare --model-name gpt-image-2.5-flare --model-version 2026-09-08 --model-format OpenAI --sku-name GlobalStandard --sku-capacity 10az cognitiveservices account deployment create -n <resource> -g <rg> --deployment-name gpt-image-2.5-sunburst --model-name gpt-image-2.5-sunburst --model-version 2026-09-08 --model-format OpenAI --sku-name GlobalStandard --sku-capacity 10Configure (once)
The server reads its settings from environment variables. Simplest: an env file at
~/.claude/foundry-image.env (or any path in FOUNDRY_IMAGE_ENV_FILE), plain KEY=VALUE
lines, # comments allowed:
GPT_IMAGE_ENDPOINT=https://<resource>.services.ai.azure.com
GPT_IMAGE_API_KEY=<key>
IMAGE_OUTPUT_DIR=C:/Users/<you>/Pictures/aiThe file is read when the server starts; a variable that is already set (non-empty) in
the process environment wins over the file, so OS env vars and settings.json → env keep
working and can override single values. Restart Claude Code after editing it.
Variable | Required | Meaning |
| yes | Resource base URL ( |
| yes | Resource key |
| no | Deployment behind |
| no | Deployment behind |
| no | Default output folder; falls back to the OS temp dir |
| no | Path of the env file; default |
Then, in any session: "run check_config" or /foundry-image:setup for a guided pass.
Use
Just ask: "maak een hero image voor de README, donker, isometrisch, geen tekst". Claude picks the model, expands the prompt, picks a size, writes the PNG (into the repo when it belongs there) and returns the path.
Parameters (same for both image tools):
Param | Meaning |
| Full description when generating; only the change when editing |
| Path to a PNG/JPEG to edit. Omit to generate. The source is never modified. |
|
|
|
|
| Where to write the |
Size rules: both sides divisible by 16, aspect ratio 1:3 to 3:1, no side above 3840 px,
655,360–8,294,400 pixels in total (above 2560x1440 is experimental). So 1024x1024,
1536x864, 2048x1152, 3840x2160 work; 768x768 (too few pixels) and 1000x1000
(not divisible by 16) do not.
Quality drives cost and time: at 1024x1024, low is about 200 output tokens, xhigh
about 3,100 and max about 7,000 (roughly a minute).
Upgrading from 1.x
2.0 drops the MAI backend and the generate_image / edit_image tools with their model
argument. MAI_IMAGE_*, GPT_IMAGE_DEPLOYMENT, GPT_IMAGE_API_VERSION and
IMAGE_DEFAULT_MODEL are no longer read; MAI_IMAGE_OUTPUT_DIR is now IMAGE_OUTPUT_DIR,
and GPT_IMAGE_API_KEY is required (it no longer falls back to the MAI key).
Why env vars and not a config file or setup dialog?
Claude Code plugins have no per-plugin secret storage or setup UI. The convention —
same one the official GitHub plugin uses for its PAT — is ${VAR} expansion in the
plugin's .mcp.json, with the user setting the variables once.
If you want the key out of plaintext files, load it into the environment from a secret store at login (Key Vault, 1Password CLI, Windows Credential Manager) — the server does not care where the variable comes from.
Develop
npm testRuns an offline smoke test: MCP handshake, tool listing, size and quality guards,
missing-config errors, env-file handling, and checks that check_config never leaks a key.
License
MIT
Available Tools
3 toolscheck_configA
Report whether the Foundry image server is configured (which environment variables are set, endpoint and deployment in use, output directory). Never reveals the API key. Call this first when a generation fails with a configuration error.
Inputs: no named parameters.
edit_imageA
Edit an existing PNG or JPEG with gpt-image-2 on Azure AI Foundry, following a text instruction. The result is written to disk as a PNG and the tool returns its path. The source file is never modified.
Inputs: image (required), prompt (required), output_path.
generate_imageA
Generate a PNG image with gpt-image-2 on Azure AI Foundry. The image is written to disk and the tool returns its path; it is not returned inline. Use a detailed prompt covering subject, style, composition, lighting and colors. Each side must be at least 768 pixels and width x height must not exceed 1048576 pixels, so 1024x1024, 768x1024 and 1024x768 are valid but 1024x1536 is not.
Inputs: prompt (required), width, height, output_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: check_config is diagnostic, edit_image modifies an existing image, generate_image creates a new one. No overlap or ambiguity.
All tools follow a consistent verb_noun snake_case pattern: check_config, edit_image, generate_image. No mixing of styles.
Three tools is well-scoped for an image generation and editing server. Each tool serves a necessary function without bloat or deficiency.
The core lifecycle of generation and editing is covered, but there is no tool for deleting images or enumerating previously generated files. These are minor gaps that agents can work around.
Related MCP Connectors
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
MCP server for Qwen Image 3 AI image generation
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that enables Claude Code to generate images using Google's Gemini image generation models.MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables Claude Code and Claude Desktop to generate and edit images using OpenAI's gpt-image-2 model, with results saved to disk.2MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for generating and editing images using gpt-image-2. Enables image creation, editing, listing, and retrieval via natural language tools.-
- AlicenseAqualityDmaintenanceAn MCP server that enables generating images via OpenAI and images/videos via Google Gemini (including Veo video generation), saving outputs to local asset folders. It integrates with Claude Code and any MCP client using your own API keys.3MIT