mcp-server-gemini-image-generator

mcp-server-gemini-image-generator

9

The Gemini Image Generator MCP Server is a tool for generating high-quality images using Google's Gemini AI model via the MCP protocol. It facilitates text-to-image conversion, image transformation, and local storage, making it easy to handle AI-generated images.

Gemini Image Generator MCP Server

Generate high-quality images from text prompts using Google's Gemini model through the MCP protocol.

Overview

This MCP server allows any AI assistant to generate images using Google's Gemini AI model. The server handles prompt engineering, text-to-image conversion, filename generation, and local image storage, making it easy to create and manage AI-generated images through any MCP client.

Features

  • Text-to-image generation using Gemini 2.0 Flash
  • Image-to-image transformation based on text prompts
  • Support for both file-based and base64-encoded images
  • Automatic intelligent filename generation based on prompts
  • Automatic translation of non-English prompts
  • Local image storage with configurable output path
  • Strict text exclusion from generated images
  • High-resolution image output
  • Direct access to both image data and file path

Setup

Prerequisites

  • Python 3.11+
  • Google AI API key (Gemini)
  • MCP host application (Claude Desktop App, Cursor, or other MCP-compatible clients)

Installation

To install, clone the repository, create a virtual environment, and install dependencies. Configure with an API key and output path. Use Smithery for automatic installation or manual setup for custom configurations.

Usage

Once installed and configured, you can generate or transform images using prompts like: "Generate an image of a sunset over mountains" or "Transform this image by adding snow to the scene." Images are saved and displayed in Claude.

Testing

Run a local development server with fastmcp dev server.py for testing and debugging.