Gemini Image MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
cd gemini-image-mcp
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GEMINI_API_KEY=${GEMINI_API_KEY}" gemini-image-0c58 -- node "<FULL_PATH_TO_GEMINI_IMAGE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_GEMINI_IMAGE_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GEMINI_API_KEY
README.md

Image generation and editing tool using the Gemini API.

gemini-image-mcp

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

설치

cd gemini-image-mcp
npm install

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' });

설정 옵션

Tools (5)

generate_imageGenerates an image from a text prompt.
edit_imageEdits an existing image based on a prompt.
start_image_sessionStarts a multi-turn image editing session.
continue_image_sessionContinues an existing image editing session.
get_image_config_infoRetrieves information about available configuration options.

Environment Variables

GEMINI_API_KEYrequiredAPI key for accessing the Gemini service

Configuration

claude_desktop_config.json
{"mcpServers": {"gemini-image": {"command": "node", "args": ["/path/to/server.js"]}}}

Try it

Generate an image of a futuristic city and save it as city.png.
Take city.png and add flying cars to the scene, saving it as city-v2.png.
Start an image editing session to create a mountain landscape.
In the current image session, add a lake to the mountain landscape.

Frequently Asked Questions

What are the key features of Gemini Image?

Text-to-image generation using Gemini API. Multi-turn image editing sessions. Support for various aspect ratios and image sizes. Configurable image generation models.

What can I use Gemini Image for?

Rapid prototyping of visual concepts for design projects. Iterative image editing through natural language conversation. Automating image asset creation within development workflows.

How do I install Gemini Image?

Install Gemini Image by running: cd gemini-image-mcp && npm install

What MCP clients work with Gemini Image?

Gemini Image works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Gemini Image docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare