image-gen-mcp
Image Gen MCP
OpenAI 이미지 모델을 통해 이미지를 생성하고 편집하는 TypeScript MCP 서버입니다.
이 서버는 generate_image 및 edit_image 도구를 등록한 다음 반환된 이미지 바이트를 디스크에 기록합니다. Stdio 모드는 요청한 절대 파일 경로에 기록하며, SSE 및 streamable HTTP 모드는 파일을 자동 저장하고 이미지 URL을 반환합니다.
환경 변수
이름 | 필수 | 기본값 | 설명 |
| 아니요 | AI SDK OpenAI 기본값 | OpenAI API URL 접두사입니다. 예: |
| 예 | - | OpenAI API 키입니다. |
| 아니요 |
| OpenAI 이미지 모델입니다. |
| 아니요 |
| SSE/HTTP 모드에서 자동 저장되는 파일의 디렉터리입니다. Docker에서는 기본값이 |
Related MCP server: OpenAI GPT-Image MCP Server
도구
generate_image
인수:
이름 | 필수 | 기본값 | 설명 |
| 예 | - | 이미지 프롬프트입니다. |
| Stdio | - | Stdio 전용. 절대 출력 경로입니다. 상위 디렉터리는 자동으로 생성됩니다. |
| 아니요 |
| 이미지 수입니다. |
| 아니요 |
|
|
| 아니요 |
|
|
| 아니요 | - |
|
| 아니요 |
|
|
| 아니요 | - |
|
| 아니요 | - |
|
| Stdio |
| Stdio 전용. 기존 출력 파일을 덮어쓸 수 있도록 허용합니다. |
알려진 모델 크기 제한은 업스트림 API를 호출하기 전에 검증됩니다. 예를 들어 gpt-image-* 모델은 1024x1024, 1536x1024, 1024x1536을 지원하고 dall-e-2는 256x256, 512x512, 1024x1024를 지원합니다.
n > 1인 경우 /tmp/image.png 같은 파일 경로는 /tmp/image-1.png, /tmp/image-2.png 등이 됩니다.
SSE 및 streamable HTTP 모드에서는 filepath와 overwrite가 노출되지 않습니다. 생성된 파일은 ${FILE_DIR}/YYYY-MM-DD/<uuid>.<ext> 형식으로 저장되며 http://localhost:3000/file/YYYY-MM-DD/<uuid>.png 같은 URL로 반환됩니다.
edit_image
인수:
이름 | 필수 | 기본값 | 설명 |
| 예 | - | 편집 지시문입니다. |
| 예 | - | 편집할 원본 이미지의 절대 경로입니다. |
| 아니요 | - | 선택 사항인 편집 마스크 이미지의 절대 경로입니다. |
| Stdio | - | Stdio 전용. 절대 출력 경로입니다. 상위 디렉터리는 자동으로 생성됩니다. |
| 아니요 |
| 편집된 이미지 수입니다. |
| 아니요 |
|
|
| 아니요 |
|
|
| 아니요 | - | 편집된 이미지의 배경 동작입니다. |
| 아니요 |
|
|
| 아니요 | - |
|
| 아니요 | - |
|
| Stdio |
| Stdio 전용. 기존 출력 파일을 덮어쓸 수 있도록 허용합니다. |
이 도구는 multipart 폼 데이터로 OpenAI 호환 /images/edits 엔드포인트를 호출합니다. 출력 파일은 generate_image와 동일한 파일 경로 및 자동 저장 동작을 따릅니다.
개발
pnpm install
pnpm dev유용한 확인 명령:
pnpm check
pnpm buildStdio MCP 구성
{
"mcpServers": {
"image-gen-mcp": {
"type": "stdio",
"command": "npx",
"args": ["image-gen-mcp"],
"env": {
"BASE_URL": "https://api.openai.com/v1",
"API_KEY": "sk-...",
"MODEL": "gpt-image-2"
}
}
}
}Streamable HTTP
{
"mcpServers": {
"image-gen-mcp": {
"type": "http",
"url": "http://localhost:3000/mcp",
"headers": {
"openai-base-url": "https://api.openai.com/v1",
"openai-api-key": "sk-...",
"openai-model": "gpt-image-2"
}
}
}
}헤더는 서버 측 env 구성을 재정의합니다. 헤더를 생략하면 env 값으로 대체됩니다. Docker 이미지는 포트 3000에서 streamable HTTP를 실행합니다.
SSE
SSE 전송은 src/sse.ts에 있으며 /mcp에서 PORT(기본값 4000)를 수신하고, 메시지는 /message에 게시됩니다. pnpm start:sse로 직접 실행할 수 있습니다. Docker 이미지에서는 시작되지 않습니다.
{
"mcpServers": {
"image-gen-mcp": {
"type": "sse",
"url": "http://localhost:4000/mcp",
"headers": {
"openai-api-key": "sk-..."
}
}
}
}Docker
docker build -t image-gen-mcp .
docker run --rm -p 3000:3000 \
# 也可忽略apiKey,让使用方 headers 中传递
-e BASE_URL=https://api.openai.com/v1 \
-e API_KEY=sk-... \
-e MODEL=gpt-image-2 \
-v image-gen-data:/data \
image-gen-mcpMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables image generation using OpenAI's DALL-E and GPT-Image models directly through the Model Context Protocol. It allows users to create and save images with fine-grained control over parameters like size, quality, and background transparency.46MIT
- AlicenseAqualityCmaintenanceEnables image generation and editing using OpenAI's GPT Image API (gpt-image-1, 1.5, 2) with support for multi-image generation, history management, and batch processing.121,7841MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI agents and coding assistants with image generation and editing capabilities using OpenAI's GPT-image-1 model, with support for local or Supabase storage.3
- FlicenseNot gradedqualityDmaintenanceEnables image generation and editing via OpenAI's gpt-image-1 model, with options for saving, format control, and transparency.
Related MCP Connectors
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
LLM chat, text summarization and AI image generation
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/seepine/image-gen-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server