Skip to main content
Glama

Flux Image MCP Server

by ckz

Flux Image MCP サーバー

この MCP サーバーは、Replicate 上の Flux Schnell モデルを使用してイメージ生成機能を提供します。

インストール

  1. MCP SDK をグローバルにインストールします。
npm install -g @modelcontextprotocol/sdk@latest
  1. このリポジトリを MCP サーバー ディレクトリにクローンします。
cd ~/Documents/Cline/MCP git clone https://github.com/yourusername/flux-img-mcp.git cd flux-img-mcp npm install
  1. サーバーを構築します。
npm run build
  1. サーバー構成を 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": [] } } }

構成

サーバーには次の環境変数が必要です。

  • 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 : エラーメッセージ(失敗した場合)

発達

サーバーに変更を加えるには:

  1. src/index.tsのソースコードを変更する
  2. サーバーを再構築します: npm run build
  3. 変更を有効にするには、MCP サーバーを再起動してください。

エラー処理

サーバーには、次の包括的なエラー処理が含まれています。

  • APIトークンがありません
  • 無効なパラメータ
  • APIリクエストの失敗
  • ネットワークの問題

安全

  • Replicate APIトークンをバージョン管理にコミットしないでください
  • 常に環境変数を通じてトークンを提供する
  • サーバーはAPIリクエストを行う前にすべての入力パラメータを検証します
-
security - not tested
A
license - permissive license
-
quality - not tested

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 モデルを使用して画像生成機能を提供し、ユーザーがテキスト プロンプトから画像を作成できるようにします。

  1. インストール
    1. 構成
      1. 使用法
        1. 画像を生成する
      2. 発達
        1. エラー処理
          1. 安全

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              Enables users to generate images from text prompts using Replicate's model, with configurable parameters and full MCP protocol compliance.
              Last updated -
              1
              63
              TypeScript
            • 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 TypeScript-based MCP server that enables text-to-image generation using Cloudflare's Flux Schnell model API.
              Last updated -
              3
              JavaScript
              MIT License
            • -
              security
              -
              license
              -
              quality
              A server that enables generating images through the Replicate API by calling the Flux Schnell model via the Model Context Protocol (MCP).
              Last updated -
              3
              JavaScript
              MIT License

            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/ckz/flux-img-mcp'

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