Image Generator MCP Server
이미지 생성기 MCP 서버
Replicate를 사용하여 이미지를 생성하고 사용자가 이를 저장할 수 있는 MCP 서버입니다.
구성 요소
자원
서버는 다음을 사용하여 이미지 저장 시스템을 구현합니다.
개별적으로 생성된 이미지에 액세스하기 위한 사용자 정의 image:// URI 체계
각 이미지 리소스에는 프롬프트, 생성 날짜가 포함된 설명, 이미지/png mimetype을 기반으로 하는 이름이 있습니다.
프롬프트
서버는 단일 프롬프트를 제공합니다.
generate-image: Stable Diffusion을 사용하여 이미지를 생성하기 위한 프롬프트를 생성합니다.
이미지 스타일(사실적/예술적/추상적)을 제어하기 위한 선택적 "스타일" 인수
스타일별 지침이 포함된 프롬프트 템플릿을 생성합니다.
도구
서버는 세 가지 도구를 구현합니다.
generate-image: Replicate의 Stable Diffusion 모델을 사용하여 이미지를 생성합니다.
"prompt"를 필수 문자열 인수로 사용합니다.
선택 매개변수에는 "negative_prompt", "width", "height", "num_inference_steps" 및 "guidance_scale"이 포함됩니다.
생성된 이미지와 해당 URL을 반환합니다.
save-image: 생성된 이미지를 로컬 파일 시스템에 저장합니다.
필수 문자열 인수로 "image_url" 및 "prompt"를 사용합니다.
이미지에 대한 고유 ID를 생성하고 "generated_images" 디렉토리에 저장합니다.
list-saved-images: 저장된 모든 이미지를 나열합니다.
메타데이터와 썸네일이 포함된 모든 저장된 이미지 목록을 반환합니다.
Related MCP server: gemini-image-mcp
구성
API 토큰 복제
이 이미지 생성기를 사용하려면 Replicate API 토큰이 필요합니다.
Replicate 에서 계정을 만드세요
https://replicate.com/account 에서 API 토큰을 받으세요.
제공된
.env.example템플릿을 기반으로.env파일을 만듭니다.
지엑스피1
중요: API 토큰이 실수로 노출되는 것을 방지하기 위해
.env파일은.gitignore를 통해 버전 관리에서 제외됩니다. 민감한 정보는 저장소에 커밋하지 마세요.
환경 설정
저장소를 복제합니다.
git clone https://github.com/yourusername/image-generator.git
cd image-generator가상 환경을 만들고 활성화하세요.
# Using venv
python -m venv .venv
# On Windows
.venv\Scripts\activate
# On macOS/Linux
source .venv/bin/activate종속성 설치:
pip install -r requirements.txt위에 설명한 대로
.env파일을 설정하세요.
빠른 시작
설치하다
클로드 데스크탑
MacOS의 경우: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json
용법
서버가 실행되면 다음을 수행할 수 있습니다.
설명적 프롬프트와 함께 "generate-image" 도구를 사용하여 이미지를 생성합니다.
이미지 URL과 프롬프트를 사용하여 "save-image" 도구를 사용하여 생성된 이미지를 저장합니다.
"list-saved-images" 도구를 사용하여 저장된 모든 이미지를 확인하세요.
리소스 목록을 통해 저장된 이미지에 접근
개발
건축 및 출판
배포를 위해 패키지를 준비하려면:
종속성 동기화 및 잠금 파일 업데이트:
uv sync패키지 배포 빌드:
uv build이렇게 하면 dist/ 디렉토리에 소스와 휠 배포판이 생성됩니다.
PyPI에 게시:
uv publish참고: 환경 변수나 명령 플래그를 통해 PyPI 자격 증명을 설정해야 합니다.
토큰:
--token또는UV_PUBLISH_TOKEN또는 사용자 이름/비밀번호:
--username/UV_PUBLISH_USERNAME및--password/UV_PUBLISH_PASSWORD
디버깅
MCP 서버는 stdio를 통해 실행되므로 디버깅이 어려울 수 있습니다. 최상의 디버깅 환경을 위해서는 MCP Inspector 사용을 강력히 권장합니다.
다음 명령을 사용하여 npm 통해 MCP Inspector를 시작할 수 있습니다.
npx @modelcontextprotocol/inspector uv --directory B:\NEWTEST\image-generator run image-generatorInspector를 실행하면 브라우저에서 접근하여 디버깅을 시작할 수 있는 URL이 표시됩니다.
Available Tools
3 toolsgenerate-imageC
Generate an image using Replicate's Stable Diffusion model
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| prompt | Yes | ||
| guidance_scale | No | ||
| negative_prompt | No | ||
| num_inference_steps | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description alone must disclose behavior. It only states image generation, but omits whether the image is returned directly, saved, or streamed. No mention of rate limits, authentication, or potential side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, concise and front-loaded. However, it might be too terse, sacrificing critical details. Every word earns its place, but more information would improve usability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters, no output schema, and no annotations, the description is incomplete. It fails to clarify whether output is a URL, base64, or file path. Critical for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description provides no explanation of parameters beyond their existence. Values like 'guidance_scale', 'num_inference_steps', and 'negative_prompt' are left undefined. The agent must infer their purpose from names or defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Generate an image using Replicate's Stable Diffusion model', which identifies the verb (generate), resource (image), and model. It distinguishes from siblings 'list-saved-images' and 'save-image'. However, it could be more precise by specifying 'from a text prompt'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. No mention of prerequisites, output handling, or when not to use it. The description assumes the agent already knows to use this for generation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-saved-imagesA
List all saved images
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It only states 'List all saved images' but lacks details on pagination, ordering, or behavior when no images exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with one short sentence, front-loaded with the key action and resource. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and a simple output (likely an array of saved images), the description fully explains the tool's purpose without needing further elaboration.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, and schema coverage is 100%. The description implicitly means no arguments are needed, which is sufficient and adds no extra confusion.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'all saved images'. It distinguishes this tool from its siblings 'generate-image' and 'save-image' by specifying a different action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus the sibling tools. It does not state any prerequisites or context for using this list operation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
save-imageC
Save a generated image
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| image_url | Yes | ||
| custom_filename | No | Custom filename for the saved image (without extension). If not provided, a UUID will be used. | |
| target_directory | No | Directory path where the image should be saved. If not provided, defaults to the MCP server's images directory. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It only states 'Save a generated image' without detailing side effects (e.g., whether it overwrites existing files, required permissions, or error handling). This is insufficient for an agent to understand the tool's behavior beyond a basic save operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise, but it sacrifices informativeness. It could be restructured to include key details without being verbose. Every sentence should add value, and this one is too vague.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (4 parameters, no output schema, no annotations), the description is extremely incomplete. It does not explain return values, error conditions, or the result of saving. The agent cannot reliably invoke this tool based solely on this description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50% (custom_filename and target_directory have descriptions in schema, but required params prompt and image_url do not). The description adds no information about any parameter, failing to compensate for the missing schema descriptions. It does not explain what image_url or prompt mean for this tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Save a generated image' clearly identifies the verb (save) and resource (generated image), and it distinguishes from sibling tools 'generate-image' (which creates but does not persist) and 'list-saved-images' (which lists existing saves). However, it could be more specific about the storage location or context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool vs alternatives. It does not state that this should be used after an image is generated, nor does it mention scenarios where this tool might be inappropriate. With siblings like generate-image and list-saved-images, explicit usage context is missing.
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.
3 tool updates
v1.0.1- First observed
generate-image - First observed
list-saved-images - First observed
save-image
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: generating images, listing saved images, and saving images. No overlap or ambiguity.
All tools follow a consistent verb_noun snake_case pattern (generate-image, list-saved-images, save-image), making them predictable.
3 tools is appropriate for a focused image generator server, covering the core workflow. Slightly minimal but not overly sparse.
Covers generation, listing, and saving. Missing a delete or update tool, but the core lifecycle is intact and agents can work without major gaps.
Maintenance
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for Qwen Image 3 AI image generation
MCP server for Grok Imagine AI video generation
MCP server for Producer/Riffusion AI music generation
Related MCP Servers
- AlicenseAqualityFmaintenanceA MCP server that integrates with Stable Diffusion WebUI to provide text-to-image generation and image upscaling capabilities through simple API calls.544MIT
- AlicenseBqualityCmaintenanceAn MCP server for image generation using the Gemini API.122 npm2MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables image generation using Replicate's Flux 1.1 Pro model. It provides a tool for creating visuals from text prompts with customizable settings for aspect ratio, output format, and quality.1MIT
- AlicenseBqualityDmaintenanceAn MCP server that generates pixel-art PNGs from text prompts, using a free image backend, and saves them directly to your project directory.2MIT