Skip to main content
Glama

🚀 빠른 시작

지엑스피1

📋 필수 조건

🔑 환경 변수

💻 NPX를 사용한 예시 사용

# Set your OpenAI API key
export OPENAI_API_KEY=sk-your-openai-api-key

# Optional: Set custom output directory
export GPT_IMAGE_OUTPUT_DIR=/home/username/Pictures/ai-generated-images

# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp
# Set your OpenAI API key
$env:OPENAI_API_KEY = "sk-your-openai-api-key"

# Optional: Set custom output directory
$env:GPT_IMAGE_OUTPUT_DIR = "C:\Users\username\Pictures\ai-generated-images"

# Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp
:: Set your OpenAI API key
set OPENAI_API_KEY=sk-your-openai-api-key

:: Optional: Set custom output directory
set GPT_IMAGE_OUTPUT_DIR=C:\Users\username\Pictures\ai-generated-images

:: Run the server with NPX
npx -y @cloudwerxlab/gpt-image-1-mcp

Related MCP server: OpenAI MCP

🔌 MCP 클라이언트와의 통합

🛠️ MCP 클라이언트 설정

{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": [
        "-y",
        "@cloudwerxlab/gpt-image-1-mcp"
      ],
      "env": {
        "OPENAI_API_KEY": "PASTE YOUR OPEN-AI KEY HERE",
        "GPT_IMAGE_OUTPUT_DIR": "OPTIONAL: PATH TO SAVE GENERATED IMAGES"
      }
    }
  }
}

다양한 운영 체제에 대한 구성 예

{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-api-key",
        "GPT_IMAGE_OUTPUT_DIR": "C:\\Users\\username\\Pictures\\ai-generated-images"
      }
    }
  }
}
{
  "mcpServers": {
    "gpt-image-1": {
      "command": "npx",
      "args": ["-y", "@cloudwerxlab/gpt-image-1-mcp"],
      "env": {
        "OPENAI_API_KEY": "sk-your-openai-api-key",
        "GPT_IMAGE_OUTPUT_DIR": "/home/username/Pictures/ai-generated-images"
      }
    }
  }
}

참고 : Windows 경로의 경우 JSON에서 백슬래시 문자를 이스케이프하려면 이중 백슬래시( \\ )를 사용하세요. Linux/macOS의 경우 슬래시( / )를 사용하세요.

✨ 특징

💡 향상된 기능

🔄 작동 원리

📁 출력 디렉토리 동작

설치 및 사용

NPM 패키지

이 패키지는 npm에서 사용할 수 있습니다: @cloudwerxlab/gpt-image-1-mcp

전역적으로 설치할 수 있습니다:

npm install -g @cloudwerxlab/gpt-image-1-mcp

또는 빠른 시작 섹션에 표시된 대로 npx로 직접 실행합니다.

도구: create_image

텍스트 프롬프트를 기반으로 새로운 이미지를 생성합니다.

매개변수

매개변수

유형

필수의

설명

prompt

끈

예

생성할 이미지의 텍스트 설명(최대 32,000자)

size

끈

아니요

이미지 크기: "1024x1024"(기본값), "1536x1024" 또는 "1024x1536"

quality

끈

아니요

이미지 품질: "높음"(기본값), "중간" 또는 "낮음"

n

정수

아니요

생성할 이미지 수(1-10, 기본값: 1)

background

끈

아니요

배경 스타일: "투명", "불투명" 또는 "자동"(기본값)

output_format

끈

아니요

출력 형식: "png"(기본값), "jpeg" 또는 "webp"

output_compression

정수

아니요

압축 수준(0-100, 기본값: 0)

user

끈

아니요

OpenAI 사용 추적을 위한 사용자 식별자

moderation

끈

아니요

조정 수준: "낮음" 또는 "자동"(기본값)

예

<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image</tool_name>
<arguments>
{
  "prompt": "A futuristic city skyline at sunset, digital art",
  "size": "1024x1024",
  "quality": "high",
  "n": 1,
  "background": "auto"
}
</arguments>
</use_mcp_tool>

응답

도구는 다음을 반환합니다.

  • 생성된 이미지에 대한 세부 정보가 포함된 서식이 지정된 텍스트 메시지

  • 이미지는 base64로 인코딩된 데이터입니다.

  • 토큰 사용 및 파일 경로를 포함한 메타데이터

도구: create_image_edit

텍스트 프롬프트와 선택적 마스크를 기반으로 기존 이미지를 편집합니다.

매개변수

매개변수

유형

필수의

설명

image

문자열, 객체 또는 배열

예

편집할 이미지(base64 문자열 또는 파일 경로 객체)

prompt

끈

예

원하는 편집 내용에 대한 텍스트 설명(최대 32,000자)

mask

문자열 또는 객체

아니요

편집할 영역을 정의하는 마스크(base64 문자열 또는 파일 경로 객체)

size

끈

아니요

이미지 크기: "1024x1024"(기본값), "1536x1024" 또는 "1024x1536"

quality

끈

아니요

이미지 품질: "높음"(기본값), "중간" 또는 "낮음"

n

정수

아니요

생성할 이미지 수(1-10, 기본값: 1)

background

끈

아니요

배경 스타일: "투명", "불투명" 또는 "자동"(기본값)

user

끈

아니요

OpenAI 사용 추적을 위한 사용자 식별자

Base64로 인코딩된 이미지의 예

<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image_edit</tool_name>
<arguments>
{
  "image": "BASE64_ENCODED_IMAGE_STRING",
  "prompt": "Add a small robot in the corner",
  "mask": "BASE64_ENCODED_MASK_STRING",
  "quality": "high"
}
</arguments>
</use_mcp_tool>

파일 경로가 있는 예

<use_mcp_tool>
<server_name>gpt-image-1</server_name>
<tool_name>create_image_edit</tool_name>
<arguments>
{
  "image": {
    "filePath": "C:/path/to/your/image.png"
  },
  "prompt": "Add a small robot in the corner",
  "mask": {
    "filePath": "C:/path/to/your/mask.png"
  },
  "quality": "high"
}
</arguments>
</use_mcp_tool>

응답

도구는 다음을 반환합니다.

  • 편집된 이미지에 대한 세부 정보가 포함된 서식이 지정된 텍스트 메시지

  • 편집된 이미지는 base64로 인코딩된 데이터입니다.

  • 토큰 사용 및 파일 경로를 포함한 메타데이터

🔧 문제 해결

🚨 일반적인 문제

🔍 오류 처리 및 보고

MCP 서버에는 오류 발생 시 자세한 정보를 제공하는 포괄적인 오류 처리 기능이 포함되어 있습니다. 오류 발생 시:

  1. 오류 형식 : 모든 오류는 다음과 같이 반환됩니다.

    • 무엇이 잘못되었는지 설명하는 명확한 오류 메시지

    • 특정 오류 코드 또는 유형

    • 오류에 대한 추가 컨텍스트가 있는 경우

  2. AI 어시스턴트 동작 : 이 MCP 서버를 AI 어시스턴트와 함께 사용할 때:

    • AI는 항상 문제 해결에 도움이 되도록 전체 오류 메시지를 보고합니다.

    • AI는 오류의 원인을 일반 언어로 설명합니다.

    • AI는 문제를 해결하기 위한 구체적인 단계를 제안합니다.

📄 라이센스

🙏 감사의 말

Available Tools

2 tools
create_imageD
ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
backgroundNo
nNo
output_compressionNo
output_formatNo
qualityNo
sizeNo
userNo
moderationNo

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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

create_image_editD
ParametersJSON Schema
NameRequiredDescriptionDefault
imageYes
promptYes
backgroundNo
maskNo
nNo
qualityNo
sizeNo
userNo

TDQS

D1/5.0
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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. 2 tool updates
    • First observedcreate_image
    • First observedcreate_image_edit

TDQS

D1.5/5.0

Scored across 2 tools

Disambiguation2/5

The two tools have overlapping purposes—both involve creating images—and without descriptions, it's unclear how they differ. 'create_image_edit' suggests editing an existing image, but this could easily be confused with the base 'create_image' tool, leading to potential misselection.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern with 'create_image' as the base, and 'create_image_edit' extends this logically. The naming is predictable and clear, with no deviations in style or convention.

Tool Count2/5

With only 2 tools, the server feels thin for an image-related domain, which typically requires operations like listing, retrieving, updating, or deleting images. This limited set may not support common workflows, making it under-scoped.

Completeness1/5

The tool surface is severely incomplete for an image server; there are no tools for reading, updating, deleting, or managing images beyond creation and editing. This will cause significant agent failures in handling image lifecycles or varied tasks.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers