JSPM

gemini-imagen4-mcp

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q21876F
  • License MIT

MCP server for Google Imagen 4.0 image generation

Package Exports

  • gemini-imagen4-mcp
  • gemini-imagen4-mcp/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gemini-imagen4-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Gemini Imagen 4.0 MCP Server

A Model Context Protocol (MCP) server that provides image generation capabilities using Google's Imagen 4.0 models.

Features

  • Generate high-quality images from text descriptions
  • Support for multiple Imagen 4.0 model variants:
    • imagen-4.0-generate-preview-06-06 (default)
    • imagen-4.0-fast-generate-preview-06-06
    • imagen-4.0-ultra-generate-preview-06-06
  • Configurable aspect ratios (1:1, 3:4, 4:3, 9:16, 16:9)
  • Multiple output formats (PNG, JPEG)
  • Content filtering with detailed feedback
  • Automatic file saving with timestamped filenames

Installation

npm install -g gemini-imagen4-mcp

Setup

  1. Get a Gemini API key from Google AI Studio
  2. Set the environment variable:
    export GEMINI_API_KEY="your-api-key-here"

Usage with Claude Desktop

Add this server to your Claude Desktop configuration:

{
  "mcpServers": {
    "gemini-imagen4": {
      "command": "gemini-imagen4-mcp",
      "env": {
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available Tools

generate_image_from_text

Generate an image from a text description.

Parameters:

  • prompt (required): Text description of the image to generate
  • model (optional): Imagen 4.0 model variant to use
    • imagen-4.0-generate-preview-06-06 (default)
    • imagen-4.0-fast-generate-preview-06-06
    • imagen-4.0-ultra-generate-preview-06-06
  • aspectRatio (optional): Aspect ratio of the generated image
    • 1:1, 3:4, 4:3, 9:16, 16:9
  • outputMimeType (optional): Output format (image/png or image/jpeg, default: image/png)

Example:

Generate an image of "a serene mountain lake at sunset with reflection"

Generated images are automatically saved to a generated-images/ directory with timestamped filenames.

Development

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

License

MIT