Flux Image MCP Server
Flux Image MCP サーバー
この MCP サーバーは、Replicate 上の Flux Schnell モデルを使用してイメージ生成機能を提供します。
インストール
MCP SDK をグローバルにインストールします。
npm install -g @modelcontextprotocol/sdk@latestこのリポジトリを MCP サーバー ディレクトリにクローンします。
cd ~/Documents/Cline/MCP
git clone https://github.com/yourusername/flux-img-mcp.git
cd flux-img-mcp
npm installサーバーを構築します。
npm run buildサーバー構成を MCP 設定ファイル (グローバルまたはワークスペース) に追加します。
{
"mcpServers": {
"flux-img": {
"command": "node",
"args": ["/path/to/flux-img-mcp/build/index.js"],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-api-token"
},
"disabled": false,
"alwaysAllow": []
}
}
}Related MCP server: Flux Schnell MCP Server
構成
サーバーには次の環境変数が必要です。
REPLICATE_API_TOKEN: Replicate APIトークン。Replicateアカウント設定から取得できます。
使用法
インストールおよび構成が完了すると、サーバーは次のツールを提供します。
画像を生成する
テキストプロンプトに基づいて Flux Schnell モデルを使用して画像を生成します。
パラメータ:
prompt(文字列、必須): 希望する画像のテキスト説明
使用例:
<use_mcp_tool>
<server_name>flux-img</server_name>
<tool_name>generate_image</tool_name>
<arguments>
{
"prompt": "A beautiful sunset over mountains"
}
</arguments>
</use_mcp_tool>ツールは次の内容を含む JSON 応答を返します。
status: 生成要求のステータスoutput: 生成された画像のURL(成功した場合)error: エラーメッセージ(失敗した場合)
発達
サーバーに変更を加えるには:
src/index.tsのソースコードを変更するサーバーを再構築します:
npm run build変更を有効にするには、MCP サーバーを再起動してください。
エラー処理
サーバーには、次の包括的なエラー処理が含まれています。
APIトークンがありません
無効なパラメータ
APIリクエストの失敗
ネットワークの問題
安全
Replicate APIトークンをバージョン管理にコミットしないでください
常に環境変数を通じてトークンを提供する
サーバーはAPIリクエストを行う前にすべての入力パラメータを検証します
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Generate images, videos, music & lip sync with 200+ AI models (Flux, Veo 3, Kling, Suno)
Create images and videos from prompts, with options for image mixing, reference images, and start/…
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
AI image, video & music generation. Flux, Veo 3.1, Suno V5. Free tier included.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP for Replicate Flux Model. Generating images by prompts71,808 npm106MIT
- AlicenseNot gradedqualityDmaintenanceA server that enables generating images through the Replicate API by calling the Flux Schnell model via the Model Context Protocol (MCP).2MIT
- AlicenseBqualityFmaintenanceProvides image generation capabilities for Claude using the Replicate Flux model, allowing users to create images from text prompts with customizable parameters like aspect ratio and output format.169 npm51MIT
- AlicenseBqualityDmaintenanceExposes Replicate's FLUX image generation models to Claude, enabling text-to-image generation, image variations, inpainting, and edge-guided creation with 6 different FLUX models.21MIT