gemini-imagegen4

chug2k/gemini-imagegen4

3.2

If you are the rightful owner of gemini-imagegen4 and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Gemini-Imagegen4 is an AI Image Generation MCP Server utilizing Google's Imagen 4.0 models to create high-quality images from text descriptions.

Tools
1
Resources
0
Prompts
0

🎨 Gemini-Imagegen4

AI Image Generation MCP Server powered by Google's Imagen 4.0 models

Generate stunning images from text descriptions using Google's cutting-edge Imagen 4.0 models through the Model Context Protocol (MCP).

✨ Features

  • 🖼️ High-quality image generation using Google's latest Imagen 4.0 models
  • Multiple model variants for different speed/quality needs
  • 🎯 Flexible aspect ratios (1:1, 3:4, 4:3, 9:16, 16:9)
  • 📸 Multiple output formats (PNG, JPEG)
  • 🔒 Built-in safety filtering with reason reporting
  • 🚀 Easy MCP integration - works with Claude and other MCP clients

🚀 Quick Start

Prerequisites

Installation

  1. Clone this repository:
git clone https://github.com/YOUR_USERNAME/gemini-imagegen4.git
cd gemini-imagegen4
  1. Install dependencies:
npm install
  1. Configure your API key in your MCP client or when prompted

Usage

The server provides one powerful tool:

generate_image_from_text

Generate images from text descriptions with optional customization.

Parameters:

  • prompt (required): Text description of the image to generate
  • model (optional): Choose from:
    • imagen-4.0-generate-preview-06-06 (default - balanced)
    • imagen-4.0-fast-generate-preview-06-06 (faster generation)
    • imagen-4.0-ultra-generate-preview-06-06 (highest quality)
  • aspectRatio (optional): 1:1, 3:4, 4:3, 9:16, or 16:9
  • outputMimeType (optional): image/png (default) or image/jpeg

Example:

{
  "prompt": "A majestic dragon soaring through a sunset sky",
  "model": "imagen-4.0-ultra-generate-preview-06-06",
  "aspectRatio": "16:9",
  "outputMimeType": "image/png"
}

🔧 Configuration

The server requires a Gemini API key and supports the following configuration:

# smithery.yaml
runtime: typescript
startCommand:
  type: http
  configSchema:
    type: object
    required: ["geminiApiKey"]
    properties:
      geminiApiKey:
        type: string
        title: "Gemini API Key"
        description: "Your Google Gemini API key"
      modelName:
        type: string
        title: "Model Name"
        description: "Default Imagen model to use"
        default: "imagen-4.0-generate-preview-06-06"
        enum: 
          - "imagen-4.0-generate-preview-06-06"
          - "imagen-4.0-fast-generate-preview-06-06"
          - "imagen-4.0-ultra-generate-preview-06-06"

🏃‍♂️ Development

Run the development server:

npm run dev

📦 Model Variants

  • Standard (imagen-4.0-generate-preview-06-06): Best balance of quality and speed
  • Fast (imagen-4.0-fast-generate-preview-06-06): Optimized for quick generation
  • Ultra (imagen-4.0-ultra-generate-preview-06-06): Maximum quality output

🛡️ Safety & Content Filtering

All images are processed through Google's built-in safety filters. If content is filtered, the tool will return the reason for filtering instead of an image.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License - see LICENSE file for details.

🔗 Links


Built with ❤️ using Google's Imagen 4.0 and the Model Context Protocol