Skip to main content
Glama

gemini-image-mcp

Gemini API를 활용한 이미지 생성/편집 도구. MCP 서버와 JS 모듈 두 가지 방식으로 사용 가능.

설치

cd gemini-image-mcp
npm install

Related MCP server: mcp-image

API 키 설정

cp .env.example .env
# .env 파일에 실제 API 키 입력

사용법 1: MCP 서버 (Claude Code)

claude mcp add --transport stdio gemini-image -- node server.js

등록 후 Claude Code에서 자연어로 사용:

  • "고양이 이미지 하나 생성해서 cat.png로 저장해줘"

  • "cat.png에서 배경을 우주로 바꿔서 cat-space.png로 저장해줘"

  • "이미지 편집 세션 시작해서 산 풍경 그려줘" → "호수 추가해줘"

MCP 도구 목록

도구

설명

generate_image

텍스트 → 이미지 생성

edit_image

기존 이미지 + 프롬프트 → 편집

start_image_session

멀티턴 편집 세션 시작

continue_image_session

세션 이어서 편집

get_image_config_info

설정 옵션 정보 확인

사용법 2: JS 모듈

import { generateImage, editImage, createSession } from './gemini-image.js';

// 이미지 생성
await generateImage('고양이', { output: './cat.png' });

// 이미지 편집
await editImage('./cat.png', '배경을 우주로', { output: './cat-space.png' });

// 멀티턴 세션
const session = createSession();
await session.send('산 풍경', { output: './v1.png' });
await session.send('호수 추가', { output: './v2.png' });
await session.sendWithImage('./photo.png', '스타일 변경', { output: './v3.png' });

설정 옵션

Available Tools

5 tools
continue_image_sessionB

기존 멀티턴 세션을 이어서 이미지를 편집합니다. 이전 대화 맥락이 유지됩니다.

Inputs: sessionId (required), prompt (required), outputPath (required), imagePath.

edit_imageC

기존 이미지를 프롬프트에 따라 편집합니다

Inputs: imagePath (required), prompt (required), outputPath (required), aspectRatio, +2 more.

generate_imageC

텍스트 프롬프트로 이미지를 생성합니다

Inputs: prompt (required), outputPath (required), aspectRatio, imageSize, +1 more.

get_image_config_infoB

이미지 생성/편집에 사용 가능한 설정 옵션 정보를 반환합니다

Inputs: no named parameters.

start_image_sessionC

멀티턴 이미지 편집 세션을 시작합니다. 이전 맥락을 유지하며 반복 수정이 가능합니다.

Inputs: prompt (required), outputPath (required), imagePath, aspectRatio, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation4/5

    The tools are mostly distinct in purpose, with clear separation between image generation, editing, and configuration. However, 'edit_image' and the session tools ('start_image_session', 'continue_image_session') could cause some confusion, as both involve editing images, though the session tools explicitly handle multi-turn contexts.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., generate_image, edit_image, get_image_config_info). The naming is predictable and readable throughout, with no deviations in style or convention.

    Tool Count5/5

    With 5 tools, the server is well-scoped for image generation and editing tasks. Each tool has a clear role, and the count is appropriate for covering core operations without being overly sparse or bloated.

    Completeness4/5

    The tool set covers key operations like generation, editing, and configuration, with added support for multi-turn sessions. A minor gap is the lack of a tool for deleting or managing images, but this is not critical for the core functionality, and agents can likely work around it.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants in any MCP client to generate new images or edit existing ones by turning short requests into detailed prompts with configurable quality presets. Supports Gemini, OpenAI GPT Image, and BytePlus Seedream providers, saving results to disk and returning them as MCP resources.
      1,781 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables generating and editing images from any MCP client by rewriting requests into detailed prompts and routing them to Gemini, OpenAI, or BytePlus Seedream, with configurable quality presets, aspect ratios, and image sizes. Results are saved to disk and returned to the assistant as MCP resources.
      1,781 npm
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables assistants in any MCP client to generate new images and edit existing ones by automatically enriching short requests with composition, lighting, and camera detail before routing them to Gemini, OpenAI, or BytePlus Seedream. Supports selectable quality presets, aspect ratios, image sizes, and saved output files returned as resources.
      1,781 npm
      MIT