QM

qhdrl12/mcp-server-gemini-image-generator

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

34 stars 25 forks 品質 74 トレンド 0MIT

qhdrl12/mcp-server-gemini-image-generatorは[https://github.com/qhdrl12/mcp-server-gemini-image-generator.からインポートされたMCPサーバー候補です

概要

qhdrl12/mcp-server-gemini-image-generatorは[https://github.com/qhdrl12/mcp-server-gemini-image-generator.からインポートされたMCPサーバー候補です

概要(AI 翻訳)

MCPプロトコルを介してGoogleのGeminiモデルを使用してテキストプロンプトから高品質の画像を生成します。

概要

このMCPサーバーでは、AIアシスタントがGoogleのGemini AIモデルを使用して画像を生成することができます。 サーバは、プロンプトエンジニアリング、テキスト・ツー・イメージ変換、ファイル名生成、およびローカル画像ストレージを処理します。これにより、あらゆるMCPクライアントを通じてAI生成された画像を簡単に作成および管理できます。

##特徴

  • ジェミニ2.0フラッシュを用いた画像生成
  • テキストプロンプトに基づく画像の変換
  • ファイルベースとベース64エンコードされた画像の両方のサポート
  • プロンプトに基づく自動インテリジェントなファイル名生成
  • 英語以外のプロンプトの自動翻訳
  • 構成可能な出力パスが付いているローカル イメージの貯蔵
  • 生成された画像からの厳密なテキスト除外
  • 高解像度画像出力
  • 画像データとファイルパスの両方に直接アクセス

利用可能なMCPツール

サーバは、AIアシスタント用の次のMCPツールを提供しています。

##1. generate_image_from_text

テキストプロンプトの説明から新しいイメージを作成します。

パラメーター:

返品:

  • 含まれているタプル:
  • 生画像データ(バイト)

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

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

Available MCP Tools

The server provides the following MCP tools for AI assistants:

1. generate_image_from_text

Creates a new image from a text prompt description.

generate_image_from_text(prompt: str) -> Tuple[bytes, str]

Parameters:

  • prompt: Text description of the image you want to generate

Returns:

  • A tuple containing:
    • Raw image data (bytes)
    • Path to the saved image file (str)

This dual return format allows AI assistants to either work with the image data directly or reference the saved file path.

Examples:

  • “Generate an image of a sunset over mountains”
  • “Create a photorealistic flying pig in a sci-fi city”

Example Output

This image was generated using the prompt:

"Hi, can you create a 3d rendered image of a pig with wings and a top hat flying over a happy futuristic scifi city with lots of greenery?"

A 3D rendered pig with wings and a top hat flying over a futuristic sci-fi city filled with greenery

Known Issues

When using this MCP server with Claude Desktop Host:

  1. Performance Issues: Using transform_image_from_encoded may take significantly longer to process compared to other methods. This is due to the overhead of transferring large base64-encoded image data through the MCP protocol.
GitHub で README 全文を見る

インストール

npx -y @smithery/cli install @qhdrl12/mcp-server-gemini-image-gen --client claude
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "gemini-image-generator": { "command": "uv", "args": [ "--directory", "/absolute/path/to/mcp-server-gemini-image-generator", "run", "mcp-server-gemini-image-generator" ], "env": { "GEMINI_API_KEY": "your-actual-gemini-api-key-here", "OUTPUT_IMAGE_PATH": "/absolute/path/to/your/images/directory" } } } }