Skip to main content
Glama

Gemini MCP Image Generation Server

by sanxfxteam

Gemini 画像生成 MCP サーバー

これは、Google の Gemini 2 API を使用して画像生成機能を提供するモデル コンテキスト プロトコル (MCP) サーバーです。

クイックスタート

  1. Gemini APIキーを取得する
  2. Claudeデスクトップの設定
    • 設定ファイルを見つけます:
      Mac: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json
    • Gemini 設定を追加します:
      { "mcpServers": { "gemini-imagen": { "command": "npx", "args": ["-y", "github:sanxfxteam/gemini-mcp-server"], "env": { "GEMINI_API_KEY": "your_api_key_here" } } } }
  3. Claudeデスクトップを再起動します

設定

  1. 依存関係をインストールします:
npm install
  1. 環境変数を設定します。ルート ディレクトリに.envファイルを作成し、Google API キーを追加します。
GEMINI_API_KEY=your_api_key_here

使用法

サーバーを実行します。

npm start

テストするには

npx @modelcontextprotocol/inspector npm run start

利用可能なツール

画像を生成する

Gemini 2 の実験的な画像生成 API を使用して画像を生成します。

パラメータ:

  • prompt (文字列、必須):生成したい画像の説明
  • numSamples (数値、オプション、デフォルト:4):生成する画像の数
  • aspectRatio (文字列、オプション、デフォルト:'1:1'):生成される画像のアスペクト比
  • personGeneration (文字列、オプション、デフォルト: 'ALLOW_ADULT'): 人物生成設定

MCP リクエストの例:

{ "tool": "generateImage", "params": { "prompt": "A serene mountain landscape at sunset", "numSamples": 2, "aspectRatio": "16:9" } }

注記

  • このサーバーは、Gemini 2の実験的な画像生成機能を使用しています。
  • Googleからの適切なアクセスとAPIキーがあることを確認してください
  • サーバーはstdio経由でモデルコンテキストプロトコルを使用して通信します。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Google の Gemini 2 API を使用して画像生成機能を提供するモデル コンテキスト プロトコル サーバー。ユーザーは、プロンプト、アスペクト比、人物生成設定などのカスタマイズ可能なパラメータを使用して複数の画像を生成できます。

  1. クイックスタート
    1. 設定
      1. 使用法
        1. 利用可能なツール
      2. 注記

        Related MCP Servers

        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol server that provides image generation capabilities using the Ideogram API, allowing users to create images from text prompts with customizable parameters.
          Last updated -
          1
          97
          3
          TypeScript
        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol server that provides an image generation tool using Templated.io, allowing users to create customized images based on templates with text and image layers.
          Last updated -
          TypeScript
          • Apple
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that enables generation of high-quality images using the Flux.1 Schnell model via Together AI, allowing users to create images from text prompts with customizable dimensions.
          Last updated -
          1
          8
          Python
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A server that provides AI-powered image generation, modification, and processing capabilities through the Model Context Protocol, leveraging Google Gemini models and other image services.
          Last updated -
          6
          Python
          MIT License
          • Linux
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/sanxfxteam/gemini-mcp-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server