About Generate Image Mcp
Generate Image Mcp is an MCP server that generates images from text prompts using the SANA SPRINT API. It is for MCP clients that need a prompt-based image generation tool.
Key features
- 01Generate images from text prompts
- 02Use the SANA SPRINT API
- 03Communicate over STDIO
Use cases
- 01Generate an image from a text description
- 02Call image generation from an MCP client
MCP support
Exposes a `generate_image` tool to MCP clients, accepting a required text prompt and using the SANA SPRINT API to generate an image.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README이미지 생성 MCP 서버
Model Context Protocol (MCP)을 사용하여 SANA SPRINT 이미지 생성 기능을 제공하는 서버입니다.
기능
- 텍스트 프롬프트를 기반으로 이미지 생성 (SANA SPRINT API 활용)
- STDIO 통신 프로토콜 지원
- FastMCP 라이브러리 사용
설치 및 실행
환경 설정
# uv를 사용하여 가상환경 생성
uv venv
# 가상환경 활성화
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
# 의존성 파일(requirements.txt 또는 pyproject.toml)로부터 패키지 동기화
uv sync
# 또는 개발 모드로 현재 패키지 설치
uv pip install -e .
서버 실행
# 직접 실행
python server.py
# 또는 fastmcp CLI 사용
fastmcp run server.py
Docker로 실행
# Docker 이미지 빌드
docker build -t generate-image-mcp .
# Docker 컨테이너 실행
docker run -it --rm generate-image-mcp
도구 목록
generate_image- 텍스트 프롬프트를 기반으로 이미지를 생성합니다.- 매개변수:
prompt: 이미지 생성에 사용할 텍스트 설명 (필수)
- 매개변수:
테스트 방법
-
서버 시작
python server.py -
클라이언트 실행 (다른 터미널에서)
python client_example.py
사용된 기술
- FastMCP: Model Context Protocol 구현을 위한 Python SDK
- Gradio Client: SANA SPRINT API 호출을 위한 클라이언트 라이브러리
목업 이미지 추가
서버가 테스트 목적으로 사용할 목업 이미지를 추가하려면 mock_images 디렉토리에 이미지 파일(JPG, PNG)을 저장하세요.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.