Skip to main content
Glama
jpaarhuis
by jpaarhuis

claude-foundry-image

Claude Code 플러그인으로, 모든 프로젝트와 모든 대화에 Azure AI Foundry 배포(MAI 이미지 API, 예: MAI-Image-2.5-Pro)를 기반으로 하는 이미지 생성기를 제공합니다.

  • MCP 서버 (server/server.mjs) — Node ≥ 18, 제로 의존성. 도구: generate_image, edit_image, check_config.

  • 스킬 generate-image — Claude가 도구를 사용해야 할 시점, 한 줄짜리 요청을 사용 가능한 프롬프트로 확장하는 방법, 유효한 크기, 파일을 저장할 위치를 알려줍니다.

  • 스킬 setup — 일회성 설정 안내.

이미지는 디스크에 저장되며, 파일 경로만 대화에 포함됩니다. 컨텍스트에 base64는 없습니다.

설치

claude plugin marketplace add jpaarhuis/claude-foundry-image
claude plugin install foundry-image@jpaarhuis

또는 대화형 세션에서: /plugin → 마켓플레이스 → jpaarhuis/claude-foundry-image 추가 → foundry-image 설치.

Related MCP server: gpt-image-mcp

설정 (한 번만)

서버는 환경 변수에서 설정을 읽습니다. ~/.claude/settings.json의 env 아래에 넣으세요. — 하나의 파일, 모든 플랫폼, Claude Code만 볼 수 있습니다:

{
  "env": {
    "MAI_IMAGE_ENDPOINT": "https://<resource>.services.ai.azure.com/mai/v1/images/generations",
    "MAI_IMAGE_DEPLOYMENT": "MAI-Image-2.5-Pro",
    "MAI_IMAGE_API_KEY": "<key>",
    "MAI_IMAGE_OUTPUT_DIR": "C:/Users/<you>/Pictures/ai"
  }
}

또는 OS 사용자 환경 변수로 설정하세요(Windows는 setx, macOS/Linux는 셸 프로필에서 export). 어느 쪽이든 Claude Code를 다시 시작하세요.

그런 다음 모든 세션에서: "run check_config" 또는 /foundry-image:setup을 실행하면 안내가 진행됩니다.

변수

필수

의미

MAI_IMAGE_ENDPOINT

예

/mai/v1/images/generations로 끝나는 전체 URL

MAI_IMAGE_DEPLOYMENT

예

Foundry의 배포 이름

MAI_IMAGE_API_KEY

예

리소스 키

MAI_IMAGE_OUTPUT_DIR

아니요

기본 출력 폴더; OS 임시 디렉토리로 대체됨

사용법

그냥 요청하세요: "README용 히어로 이미지 만들어줘, 어둡게, 아이소메트릭, 텍스트 없이". Claude가 프롬프트를 확장하고, 크기를 선택하고, PNG를 작성하여(저장소에 속하는 경우 저장소에) 경로를 반환합니다.

참고용 도구 매개변수:

도구

매개변수

generate_image

prompt (필수), width, height (기본값 1024×1024), output_path (.png)

edit_image

image (필수, PNG/JPEG 경로), prompt (필수), output_path

check_config

—

MAI API의 크기 규칙: 각 변 ≥ 768 px, width × height ≤ 1 048 576 px. 따라서 1024x1024, 1024x768, 1280x800은 작동하지만 1024x1536과 1920x1080은 작동하지 않습니다.

왜 환경 변수이고 설정 파일이나 설정 대화상자가 아닌가요?

Claude Code 플러그인에는 플러그인별 비밀 저장소나 설정 UI가 없습니다. 공식 GitHub 플러그인이 PAT에 사용하는 것과 동일한 규칙인 ${VAR} 확장을 플러그인의 .mcp.json에서 사용하며, 사용자가 변수를 한 번 설정합니다. settings.json → env는 이를 위한 가장 마찰이 적은 장소입니다. Claude Code 프로필과 함께 이동하고, 모든 프로젝트에 적용되며, 플러그인 업데이트 후에도 유지됩니다.

키를 일반 텍스트 파일에서 빼내고 싶다면, 로그인 시 비밀 저장소(Key Vault, 1Password CLI, Windows Credential Manager)에서 환경으로 로드하세요. 서버는 변수가 어디서 왔는지 신경 쓰지 않습니다.

개발

npm test

오프라인 스모크 테스트를 실행합니다: MCP 핸드셰이크, 도구 목록, 크기 제한, 설정 누락 오류, 그리고 check_config가 키를 유출하지 않는지 확인합니다.

라이선스

MIT

Available Tools

3 tools
check_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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It states the tool reports config status without revealing the API key, which is a notable safety disclosure. However, it does not explicitly declare read-only behavior, potential delays, or what happens if the server is unreachable. The disclosure is adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two efficient sentences with zero wasted words. The first sentence front-loads the tool's purpose and scope, the second adds usage guidance. It is appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter diagnostic tool with no output schema, the description covers what it reports, what it excludes, and when to invoke it. It lacks details on output format, but given the context (image generation siblings), the provided information is sufficient for an agent to select and invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters (0 params), so per the rubric baseline is 4. The description adds no parameter info, but none is needed. Schema coverage is trivially 100%.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reports configuration status of the Foundry image server, listing specific elements (environment variables, endpoint, deployment, output directory) and explicitly excludes revealing the API key. It distinguishes from sibling tools (edit_image, generate_image) which are about image manipulation, not config checking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises 'Call this first when a generation fails with a configuration error,' providing clear when-to-use guidance. It also states what it does not reveal (API key), which implicitly guides against expecting that output. No explicit when-not or alternatives, but sibling differentiation is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
imageYesPath to the source PNG or JPEG.
promptYesWhat to change in the image.
output_pathNoWhere to write the result. Must end in .png.

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description says the result is written to disk as a PNG and the source file is never modified, which are useful behavioral details. However, with no annotations provided, the description carries full burden. It does not disclose if the operation is reversible, whether it requires any specific authentication or permissions, or any side effects (e.g., whether it overwrites existing output files silently). It mentions the output is a PNG even if the source is JPEG, which is valuable. Overall, it provides moderate transparency but lacks some important details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise: three sentences covering purpose, output format, and behavioral assurance. No superfluous words. It is front-loaded with the core action and a clear summary. Each sentence adds distinct value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has three parameters (all with schema descriptions), no output schema, no annotations, and no nested objects, the description provides the essential context for an editing operation with output to disk. It explains the return value (path to the result) despite there being no output schema. However, it does not specify if the prompt can be a plain text instruction or requires specific formatting, nor does it list supported edit capabilities (e.g., only simple changes? complex edits?). For a tool with no annotations, this leaves some gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (all three parameters have descriptions in the schema), so the baseline is 3. The tool description adds value beyond the schema by confirming that 'image' must be a path to a PNG or JPEG, 'prompt' is a text instruction for editing, and 'output_path' must end with '.png'. The description contextually reinforces the parameter meanings, helping the agent understand their roles beyond the schema's property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that this tool edits existing PNG or JPEG images using gpt-image-2 on Azure AI Foundry, following a text instruction. It also specifies that the result is saved to disk as a PNG and the source file is never modified. This provides a specific verb (edit), resource (PNG/JPEG image), and distinct operation (following a text prompt). It distinguishes edit from the sibling generate_image (which likely creates new images instead of editing existing ones).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions the supported image formats (PNG, JPEG) and that the source file remains unchanged, but it does not provide explicit guidance on when to use this tool versus the sibling tools check_config or generate_image. There is no 'when to use' or 'when not to use' advice, and no mention of prerequisites (e.g., image must exist, must be a supported format). The agent is left to infer usage context from the tool name and input schema.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
widthNoImage width in pixels. Default 1024.
heightNoImage height in pixels. Default 1024.
promptYesDescription of the image to generate.
output_pathNoWhere to write the PNG. Must end in .png. Relative paths resolve against the current working directory. Defaults to a timestamped file in the output directory.

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It clearly discloses that the image is written to disk and the path is returned (not inline), and it specifies dimension constraints. However, it does not disclose error behavior, permission requirements, rate limits, or what happens if constraints are violated, leaving room for improvement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose and output format, followed by prompt guidance and constraints. Every sentence is necessary and informative, with no redundancy or wasted words. It is highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, no output schema, and no annotations, the description covers the essential aspects: purpose, output format, constraints, and prompt advice. It is mostly complete but lacks details on error handling, performance, or any prerequisites, which would be nice to have for a generation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds value beyond the schema by explaining the dimension constraints (min 768px sides, max 1048576 total pixels) and examples of valid sizes. It also adds context about prompt quality. The fact that the tool returns the path is not in the schema but is in the description. This meaningfully supplements the parameter definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates a PNG image using gpt-image-2 on Azure AI Foundry, and distinguishes it from the sibling tools 'edit_image' (editing) and 'check_config' (configuration checking). The verb 'generate' and resource 'PNG image' are specific, and the output behavior (written to disk, returns path) is explicitly noted.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides actionable guidance: 'Use a detailed prompt covering subject, style, composition, lighting and colors.' It also gives explicit dimension constraints (minimum side 768px, max total pixels 1048576) with valid examples. However, it does not explicitly state when to use this tool versus alternatives (e.g., edit_image), nor does it mention any prerequisites or context for using the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv1.0.0
    • First observedcheck_config
    • First observededit_image
    • First observedgenerate_image

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

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.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern: check_config, edit_image, generate_image. No mixing of styles.

Tool Count5/5

Three tools is well-scoped for an image generation and editing server. Each tool serves a necessary function without bloat or deficiency.

Completeness4/5

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers