Skip to main content
Glama

Image Generation MCP Server

by mikeyny

이미지 생성 MCP 서버

Replicate의 black-forest-labs/flux-schnell 모델을 사용하여 이미지를 생성하기 위한 MCP(Model Context Protocol) 서버 구현입니다.

이상적으로는 Cursor의 MCP 기능과 함께 사용하는 것이 좋지만, 모든 MCP 클라이언트와 함께 사용할 수 있습니다.

특징

  • 텍스트 프롬프트에서 이미지 생성
  • 구성 가능한 이미지 매개변수(해상도, 종횡비, 품질)
  • 생성된 이미지를 지정된 디렉토리에 저장합니다.
  • 전체 MCP 프로토콜 준수
  • 오류 처리 및 검증

필수 조건

  • 노드.js 16+
  • API 토큰 복제
  • MCP용 TypeScript SDK

설정

  1. 저장소를 복제합니다
  2. 종속성 설치:지엑스피1
  3. apiToken 상수를 업데이트하여 src/imageService.ts 의 코드에 Replicate API 토큰을 직접 추가합니다.
    // No environment variables are used since they can't be easily set in cursor const apiToken = "your-replicate-api-token-here";

    참고: Claude와 함께 사용하는 경우 루트 디렉토리에 .env 파일을 만들고 거기에 API 토큰을 설정할 수 있습니다.

    REPLICATE_API_TOKEN=your-replicate-api-token-here
    그런 다음 프로젝트를 빌드합니다.
    npm run build

용법

커서와 함께 사용하려면:

  1. 설정으로 이동
  2. 기능 선택
  3. "MCP 서버"까지 아래로 스크롤하세요.
  4. "새 MCP 서버 추가"를 클릭하세요.
  5. 유형을 "명령"으로 설정하세요
  6. 명령을 다음으로 설정하세요: node ./path/to/dist/server.js

API 매개변수

매개변수유형필수의기본설명
prompt-이미지 생성을 위한 텍스트 프롬프트
output_dir-생성된 이미지를 저장할 서버 디렉토리 경로
go_fast부울아니요거짓더 빠른 생성 모드 활성화
megapixels아니요"1"해상도 품질("1", "2", "4")
num_outputs숫자아니요1생성할 이미지 수(1-4)
aspect_ratio아니요"1:1"종횡비("1:1", "4:3", "16:9")
output_format아니요"웹피"이미지 형식("webp", "png", "jpeg")
output_quality숫자아니요80압축 품질(1-100)
num_inference_steps숫자아니요4노이즈 제거 단계 수(4-20)

예제 요청

{ "prompt": "black forest gateau cake spelling out 'FLUX SCHNELL'", "output_dir": "/var/output/images", "filename": "black_forest_cake", "output_format": "webp" "go_fast": true, "megapixels": "1", "num_outputs": 2, "aspect_ratio": "1:1" }

예시 응답

{ "image_paths": [ "/var/output/images/output_0.webp", "/var/output/images/output_1.webp" ], "metadata": { "model": "black-forest-labs/flux-schnell", "inference_time_ms": 2847 } }

오류 처리

서버는 다음과 같은 오류 유형을 처리합니다.

  • 검증 오류(잘못된 매개변수)
  • API 오류(API 문제 복제)
  • 서버 오류(파일 시스템, 권한)
  • 알 수 없는 오류(예상치 못한 문제)

각 오류 응답에는 다음이 포함됩니다.

  • 오류 코드
  • 사람이 읽을 수 있는 메시지
  • 자세한 오류 정보

특허

아이에스씨

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

구성 가능한 매개변수와 완전한 MCP 프로토콜 준수를 통해 사용자가 Replicate 모델을 사용하여 텍스트 프롬프트에서 이미지를 생성할 수 있습니다.

  1. 특징
    1. 필수 조건
      1. 설정
        1. 용법
          1. API 매개변수
            1. 예제 요청
              1. 예시 응답
                1. 오류 처리
                  1. 특허

                    Related MCP Servers

                    • A
                      security
                      A
                      license
                      A
                      quality
                      A MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.
                      Last updated -
                      1
                      2
                      TypeScript
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      A
                      license
                      -
                      quality
                      Provides image generation capabilities using the Flux Schnell model on Replicate, allowing users to create images from text prompts.
                      Last updated -
                      1
                      JavaScript
                      MIT License
                    • -
                      security
                      A
                      license
                      -
                      quality
                      A MCP server that integrates with Cursor IDE to generate images based on text descriptions using JiMeng AI, allowing users to create and save custom images directly within their development environment.
                      Last updated -
                      160
                      Python
                      MIT License
                      • Apple
                      • Linux
                    • -
                      security
                      -
                      license
                      -
                      quality
                      A TypeScript-based MCP server that lets users generate images using OpenAI's dall-e-3 model by providing a prompt and image name.
                      Last updated -
                      1

                    View all related MCP servers

                    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/mikeyny/ai-image-gen-mcp'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server