Flux Image MCP サーバー
この MCP サーバーは、Replicate 上の Flux Schnell モデルを使用してイメージ生成機能を提供します。
インストール
MCP SDK をグローバルにインストールします。
このリポジトリを MCP サーバー ディレクトリにクローンします。
サーバーを構築します。
サーバー構成を MCP 設定ファイル (グローバルまたはワークスペース) に追加します。
構成
サーバーには次の環境変数が必要です。
REPLICATE_API_TOKEN
: Replicate APIトークン。Replicateアカウント設定から取得できます。
使用法
インストールおよび構成が完了すると、サーバーは次のツールを提供します。
画像を生成する
テキストプロンプトに基づいて Flux Schnell モデルを使用して画像を生成します。
パラメータ:
prompt
(文字列、必須): 希望する画像のテキスト説明
使用例:
ツールは次の内容を含む JSON 応答を返します。
status
: 生成要求のステータスoutput
: 生成された画像のURL(成功した場合)error
: エラーメッセージ(失敗した場合)
発達
サーバーに変更を加えるには:
src/index.ts
のソースコードを変更するサーバーを再構築します:
npm run build
変更を有効にするには、MCP サーバーを再起動してください。
エラー処理
サーバーには、次の包括的なエラー処理が含まれています。
APIトークンがありません
無効なパラメータ
APIリクエストの失敗
ネットワークの問題
安全
Replicate APIトークンをバージョン管理にコミットしないでください
常に環境変数を通じてトークンを提供する
サーバーはAPIリクエストを行う前にすべての入力パラメータを検証します
This server cannot be installed
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.
Replicate 上の Flux Schnell モデルを使用して画像生成機能を提供し、ユーザーがテキスト プロンプトから画像を作成できるようにします。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityEnables users to generate images from text prompts using Replicate's model, with configurable parameters and full MCP protocol compliance.Last updated -1126
- AsecurityAlicenseAqualityA 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 -115MIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that generates images using Replicate's FLUX model and stores them in Cloudflare R2, allowing users to create images through simple prompts and retrieve accessible URLs.Last updated -110
- -securityAlicense-qualityA server that enables generating images through the Replicate API by calling the Flux Schnell model via the Model Context Protocol (MCP).Last updated -3MIT License