Skip to main content
Glama

Image Generation MCP Server

by manascb1344

画像生成MCPサーバー

Together AIを介してFlux.1 Schnellモデルを用いた高品質な画像をシームレスに生成できるモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、画像生成パラメータを指定するための標準化されたインターフェースを提供します。

特徴

  • Flux.1 Schnellモデルを活用した高品質画像生成
  • カスタマイズ可能な寸法(幅と高さ)のサポート
  • プロンプト検証と API の問題に対する明確なエラー処理
  • MCP対応クライアントとの簡単な統合
  • オプションでPNG形式でディスクに画像を保存

インストール

npm install together-mcp

または直接実行します:

npx together-mcp@latest

構成

MCP サーバー構成に追加します:

{ "mcpServers": { "together-image-gen": { "command": "npx", "args": ["together-mcp@latest -y"], "env": { "TOGETHER_API_KEY": "<API KEY>" } } } }

使用法

サーバーは1つのツールを提供します: generate_image

generate_image の使用

このツールには必須パラメータが1つだけあります(プロンプト)。その他のパラメータはオプションであり、指定されていない場合は適切なデフォルト値が使用されます。

パラメータ
{ // Required prompt: string; // Text description of the image to generate // Optional with defaults model?: string; // Default: "black-forest-labs/FLUX.1-schnell-Free" width?: number; // Default: 1024 (min: 128, max: 2048) height?: number; // Default: 768 (min: 128, max: 2048) steps?: number; // Default: 1 (min: 1, max: 100) n?: number; // Default: 1 (max: 4) response_format?: string; // Default: "b64_json" (options: ["b64_json", "url"]) image_path?: string; // Optional: Path to save the generated image as PNG }
最小限のリクエストの例

プロンプトのみが必要です:

{ "name": "generate_image", "arguments": { "prompt": "A serene mountain landscape at sunset" } }
画像保存を含む完全なリクエスト例

デフォルトを上書きし、画像を保存するパスを指定します。

{ "name": "generate_image", "arguments": { "prompt": "A serene mountain landscape at sunset", "width": 1024, "height": 768, "steps": 20, "n": 1, "response_format": "b64_json", "model": "black-forest-labs/FLUX.1-schnell-Free", "image_path": "/path/to/save/image.png" } }
応答フォーマット

応答は、次の内容を含む JSON オブジェクトになります。

{ "id": string, // Generation ID "model": string, // Model used "object": "list", "data": [ { "timings": { "inference": number // Time taken for inference }, "index": number, // Image index "b64_json": string // Base64 encoded image data (if response_format is "b64_json") // OR "url": string // URL to generated image (if response_format is "url") } ] }

image_path が指定され、保存が成功した場合、応答には保存場所の確認が含まれます。

デフォルト値

リクエストで指定されていない場合は、次のデフォルトが使用されます。

  • モデル: "black-forest-labs/FLUX.1-schnell-Free"
  • 幅: 1024
  • 高さ: 768
  • 手順: 1
  • n: 1
  • レスポンスフォーマット: "b64_json"

重要な注意事項

  1. promptパラメータのみ必須です
  2. すべてのオプションパラメータは、指定されていない場合はデフォルトを使用します。
  3. パラメータを指定する場合、その制約(幅/高さの範囲など)を満たす必要があります。
  4. Base64 応答はサイズが大きくなる可能性があります。大きな画像には URL 形式を使用してください。
  5. 画像を保存するときは、指定されたディレクトリが存在し、書き込み可能であることを確認してください。

前提条件

  • Node.js >= 16
  • Together AI APIキー
    1. api.together.xyzにサインイン
    2. APIキー設定に移動する
    3. 「作成」をクリックして新しいAPIキーを生成します
    4. 生成されたキーをコピーして、MCP 構成で使用します。

依存関係

{ "@modelcontextprotocol/sdk": "0.6.0", "axios": "^1.6.7" }

発達

プロジェクトをクローンしてビルドします。

git clone https://github.com/manascb1344/together-mcp-server cd together-mcp-server npm install npm run build

利用可能なスクリプト

  • npm run build - TypeScriptプロジェクトをビルドする
  • npm run watch - 変更を監視して再構築する
  • npm run inspector - MCPインスペクターを実行する

貢献

貢献を歓迎します!以下の手順に従ってください。

  1. リポジトリをフォークする
  2. 新しいブランチを作成する ( feature/my-new-feature )
  3. 変更をコミットする
  4. ブランチをフォークにプッシュする
  5. プルリクエストを開く

機能リクエストやバグレポートはGitHub Issuesからご提出いただけます。新しいIssueを作成する前に、既存のIssueをご確認ください。

大幅な変更については、まず問題を開いて、提案する変更について話し合ってください。

ライセンス

このプロジェクトはMITライセンスの下で提供されています。詳細はLICENSEファイルをご覧ください。

You must be authenticated.

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

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

カスタマイズ可能なパラメータを使用して、Together AI 経由で Flux.1 Schnell モデルを使用した高品質の画像生成を可能にするモデル コンテキスト プロトコル サーバー。

  1. 特徴
    1. インストール
      1. 構成
    2. 使用法
      1. generate\_image の使用
      2. デフォルト値
      3. 重要な注意事項
    3. 前提条件
      1. 依存関係
        1. 発達
          1. 利用可能なスクリプト
        2. 貢献
          1. ライセンス

            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/manascb1344/together-mcp-server'

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