FLUX Image Generator MCP Server

Integrations

  • Uses .ENV files for configuration, allowing users to securely store their Black Forest Lab API key.

  • Provides tools for generating images using Black Forest Lab's FLUX model with features including text-to-image generation, customizable dimensions, prompt upsampling, and batch image generation.

  • Runs as a Node.js application, requiring v18.0.0 or higher for operation as a prerequisite for the server.

FLUX 이미지 생성기 MCP 서버

Black Forest Lab의 FLUX 모델을 사용하여 이미지를 생성하는 MCP(Model Context Protocol) 서버입니다. 최신 MCP SDK(v1.7.0)를 사용합니다.

특징

  • 텍스트 프롬프트를 기반으로 이미지 생성
  • 이미지 크기 사용자 지정, 신속한 업샘플링 및 안전 설정
  • 생성된 이미지를 로컬에 저장
  • 여러 프롬프트에서 일괄 이미지 생성

필수 조건

설치

출처에서

  1. 이 저장소를 복제하세요
  2. 종속성 설치:

지엑스피1

  1. .env.example 기반으로 .env 파일을 만들고 Black Forest Lab API 키를 추가하세요.
BFL_API_KEY=your_api_key_here
  1. 프로젝트를 빌드하세요:
npm run build

npm 사용하기

npm install -g @modelcontextprotocol/server-flux-image-generator

용법

MCP 서버 시작

다음을 사용하여 서버를 시작합니다.

npm start

자동 재컴파일을 통한 개발의 경우:

npm run watch

MCP 클라이언트와 통합

이 서버를 MCP 클라이언트(예: Claude)와 함께 사용하려면 클라이언트 구성에 다음을 추가하세요.

{ "mcpServers": { "flux-image-generator": { "command": "mcp-server-flux-image-generator", "env": { "BFL_API_KEY": "your_api_key_here" } } } }

사용 가능한 도구

이미지 생성

사용자 정의 가능한 설정을 통해 텍스트 프롬프트를 기반으로 이미지를 생성합니다.

매개변수:

  • prompt (문자열, 필수): 생성할 이미지에 대한 텍스트 설명
  • width (숫자, 선택 사항, 기본값: 1024): 픽셀 단위의 이미지 너비
  • height (숫자, 선택 사항, 기본값: 1024): 픽셀 단위의 이미지 높이
  • promptUpsampling (부울, 선택 사항, 기본값: false): 프롬프트를 업샘플링하여 세부 정보를 향상시킵니다.
  • seed (숫자, 선택 사항): 재현 가능한 결과를 위한 무작위 시드
  • safetyTolerance (숫자, 선택 사항, 기본값: 3): 콘텐츠 조정 허용 범위(1-5)

예:

{ "prompt": "A serene lake at sunset with mountains in the background", "width": 1024, "height": 768, "promptUpsampling": true, "seed": 12345, "safetyTolerance": 3 }

퀵이미지

기본 설정으로 이미지를 빠르게 생성할 수 있는 간소화된 도구입니다.

매개변수:

  • prompt (문자열, 필수): 생성할 이미지에 대한 텍스트 설명

예:

{ "prompt": "A futuristic cityscape with flying cars" }

배치 생성 이미지

프롬프트 목록에서 여러 개의 이미지를 생성합니다.

매개변수:

  • prompts (문자열 배열, 필수): 텍스트 프롬프트 목록(최대 10개)
  • width (숫자, 선택 사항, 기본값: 1024): 이미지의 너비
  • height (숫자, 선택 사항, 기본값: 1024): 이미지의 높이

예:

{ "prompts": [ "A serene lake at sunset", "A futuristic cityscape", "A magical forest with glowing plants" ], "width": 1024, "height": 768 }

출력 형식

모든 도구는 다음 형식으로 응답을 반환합니다.

{ "image_url": "https://storage.example.com/generated_image.jpg", "local_path": "/path/to/output/flux_1234567890.png" }

오류의 경우:

{ "error": true, "message": "Error description" }

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

{ "total": 3, "successful": 2, "failed": 1, "results": [ { "prompt": "A serene lake at sunset", "success": true, "image_url": "https://storage.example.com/image1.jpg", "local_path": "/path/to/output/flux_batch_1234567890_0.png" }, { "prompt": "A futuristic cityscape", "success": true, "image_url": "https://storage.example.com/image2.jpg", "local_path": "/path/to/output/flux_batch_1234567890_1.png" }, { "prompt": "Prohibited content", "success": false, "error": "Content policy violation" } ] }

특허

MIT

You must be authenticated.

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

Black Forest Lab의 FLUX 모델을 사용하여 텍스트 프롬프트를 기반으로 이미지를 생성하는 MCP 서버로, 사용자 정의 이미지 크기, 프롬프트 업샘플링, 안전 설정 및 일괄 생성이 가능합니다.

  1. Features
    1. Prerequisites
      1. Installation
        1. From Source
        2. Using npm
      2. Usage
        1. Starting the MCP Server
        2. Integrating with MCP Clients
      3. Available Tools
        1. generateImage
        2. quickImage
        3. batchGenerateImages
      4. Output Format
        1. License
          ID: pvczsau570