Skip to main content
Glama

FluxMCP

PyPI version PyPI downloads CI License: MIT MCP Python 3.10+

AceDataCloud プラットフォームを通じて Flux を使用した AI 画像生成・編集のための Model Context Protocol (MCP) サーバーです。

Claude、Cursor、または MCP 互換クライアントから、Flux モデル(flux-dev、flux-pro、flux-kontext)を使って素晴らしい AI 画像を生成・編集できます。

特徴

  • 画像生成 - 6 つの Flux モデルでテキストプロンプトから画像を生成

  • 画像編集 - コンテキストを考慮した Flux Kontext モデルで既存画像を編集

  • タスク管理 - 非同期生成タスクの追跡とバッチステータス照会

  • モデルガイド - モデル選択とプロンプト作成のガイダンスを内蔵

  • デュアルトランスポート - stdio(ローカル)と HTTP(リモート/クラウド)モード

  • Docker 対応 - コンテナ化され、K8s デプロイマニフェスト付き

  • セキュア - Bearer トークン認証、HTTP モードではリクエストごとに分離

Related MCP server: DiffuGen

ツールリファレンス

ツール

説明

flux_generate_image

Flux を使用してテキストプロンプトから AI 画像を生成します。

flux_edit_image

Flux を使用してテキストプロンプトで既存画像を編集します。

flux_list_models

利用可能なすべての Flux モデルとその機能を一覧表示します。

flux_list_actions

利用可能なすべての Flux ツールとそのユースケースを一覧表示します。

flux_get_task

Flux 画像生成タスクのステータスと結果を照会します。

flux_get_tasks_batch

複数の Flux 画像生成タスクを一度に照会します。

クイックスタート

1. API トークンを取得

  1. AceDataCloud プラットフォーム にサインアップ

  2. API ドキュメントページ に移動

  3. 「取得」 をクリックして API トークンを取得

  4. 以下の手順で使用するためトークンをコピー

2. ホスト型サーバーを使用(推奨)

AceDataCloud は管理された MCP サーバーをホストしています — ローカルインストールは不要です。

エンドポイント: https://flux.mcp.acedata.cloud/mcp

すべてのリクエストには Bearer トークンが必要です。手順 1 の API トークンを使用してください。

Claude.ai

Claude.ai で OAuth を使用して直接接続 — API トークンは不要です:

  1. Claude.ai の 設定 → 統合 → さらに追加 に移動

  2. サーバー URL を入力: https://flux.mcp.acedata.cloud/mcp

  3. OAuth ログインフローを完了

  4. 会話内でツールを使用開始

Claude Desktop

設定ファイル(macOS では ~/Library/Application Support/Claude/claude_desktop_config.json)に追加:

{
  "mcpServers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Cursor / Windsurf

MCP 設定ファイル(.cursor/mcp.json または .windsurf/mcp.json)に追加:

{
  "mcpServers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

VS Code (Copilot)

VS Code の MCP 設定ファイル(.vscode/mcp.json)に追加:

{
  "servers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

または、VS Code 用の Ace Data Cloud MCP 拡張機能 をインストールすると、ワンクリックセットアップでホスト型 MCP サーバーが登録されます。

JetBrains IDEs

  1. 設定 → ツール → AI Assistant → Model Context Protocol (MCP) に移動

  2. 追加 → HTTP をクリック

  3. 以下を貼り付け:

{
  "mcpServers": {
    "flux": {
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Claude Code

Claude Code は MCP サーバーをネイティブにサポートしています:

claude mcp add flux --transport http https://flux.mcp.acedata.cloud/mcp \
  -h "Authorization: Bearer YOUR_API_TOKEN"

または、プロジェクトの .mcp.json に追加:

{
  "mcpServers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Cline

Cline の MCP 設定(.cline/mcp_settings.json)に追加:

{
  "mcpServers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Amazon Q Developer

MCP 設定に追加:

{
  "mcpServers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Roo Code

Roo Code の MCP 設定に追加:

{
  "mcpServers": {
    "flux": {
      "type": "streamable-http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Continue.dev

.continue/config.yaml に追加:

mcpServers:
  - name: flux
    type: streamable-http
    url: https://flux.mcp.acedata.cloud/mcp
    headers:
      Authorization: "Bearer YOUR_API_TOKEN"

Zed

Zed の設定(~/.config/zed/settings.json)に追加:

{
  "language_models": {
    "mcp_servers": {
      "flux": {
        "url": "https://flux.mcp.acedata.cloud/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_TOKEN"
        }
      }
    }
  }
}

cURL テスト

# Health check (no auth required)
curl https://flux.mcp.acedata.cloud/health

# MCP initialize
curl -X POST https://flux.mcp.acedata.cloud/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'

3. またはローカルで実行(代替)

自分のマシンでサーバーを実行したい場合:

# Install from PyPI
pip install mcp-flux-pro
# or
uvx mcp-flux-pro

# Set your API token
export ACEDATACLOUD_API_TOKEN="your_token_here"

# Run (stdio mode for Claude Desktop / local clients)
mcp-flux-pro

# Run (HTTP mode for remote access)
mcp-flux-pro --transport http --port 8000

Claude Desktop(ローカル)

{
  "mcpServers": {
    "flux": {
      "command": "uvx",
      "args": ["mcp-flux-pro"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_token_here"
      }
    }
  }
}

Docker(セルフホスティング)

docker pull ghcr.io/acedatacloud/mcp-flux-pro:latest
docker run -p 8000:8000 ghcr.io/acedatacloud/mcp-flux-pro:latest

クライアントは独自の Bearer トークンで接続します — サーバーは各リクエストの Authorization ヘッダーからトークンを抽出します。

利用可能なツール

ツール

説明

flux_generate_image

モデル選択付きでテキストプロンプトから画像を生成

flux_edit_image

テキスト指示で既存画像を編集

flux_get_task

単一の生成タスクのステータスを照会

flux_get_tasks_batch

複数のタスクステータスを一度に照会

flux_list_models

利用可能なすべての Flux モデルと機能を一覧表示

flux_list_actions

すべてのツールとワークフロー例を表示

利用可能なプロンプト

プロンプト

説明

flux_image_generation_guide

適切なツールとモデルの選択ガイド

flux_prompt_writing_guide

効果的なプロンプト作成のベストプラクティス

flux_workflow_examples

一般的なワークフローパターンと例

サポートされているモデル

モデル

品質

速度

サイズ形式

最適な用途

flux-dev

良好

高速

ピクセル (256-1440px)

クイックプロトタイピング

flux-pro

高

中速

ピクセル (256-1440px)

本番利用

flux-kontext-pro

高

中速

アスペクト比

画像編集

flux-kontext-max

最高

低速

アスペクト比

複雑な編集

flux-2-flex

高

高速

アスペクト比

Flux 2 バランス品質

flux-2-pro

より高

中速

アスペクト比

Flux 2 本番利用

flux-2-max

最高

低速

アスペクト比

Flux 2 最高品質

flux-2-klein

良好

高速

アスペクト比

Flux 2 効率的な出力

使用例

画像を生成

"Generate a photorealistic mountain landscape at golden hour"
→ flux_generate_image(prompt="...", model="flux-2-max", size="16:9")

画像を編集

"Add sunglasses to the person in this photo"
→ flux_edit_image(prompt="Add sunglasses", image_url="https://...", size="1:1", model="flux-kontext-pro")

タスクステータスを確認

"What's the status of my generation?"
→ flux_get_task(task_id="...")

環境変数

変数

必須

デフォルト

説明

ACEDATACLOUD_API_TOKEN

はい (stdio)

—

AceDataCloud の API トークン

ACEDATACLOUD_API_BASE_URL

いいえ

https://api.acedata.cloud

API ベース URL

ACEDATACLOUD_OAUTH_CLIENT_ID

いいえ

—

OAuth クライアント ID(ホスト型モード)

ACEDATACLOUD_PLATFORM_BASE_URL

いいえ

https://platform.acedata.cloud

プラットフォームのベース URL

FLUX_REQUEST_TIMEOUT

いいえ

1800

リクエストタイムアウト(秒)

MCP_SERVER_NAME

いいえ

flux

MCP サーバー名

LOG_LEVEL

いいえ

INFO

ログレベル

開発

セットアップ

git clone https://github.com/AceDataCloud/FluxMCP.git
cd FluxMCP
pip install -e ".[all]"
cp .env.example .env
# Edit .env with your API token

リントとフォーマット

ruff check .
ruff format .
mypy core tools main.py

テスト

# Unit tests
pytest --cov=core --cov=tools

# Skip integration tests
pytest -m "not integration"

# With coverage report
pytest --cov=core --cov=tools --cov-report=html

Git フック

git config core.hooksPath .githooks

API リファレンス

この MCP サーバーは AceDataCloud Flux API を使用します:

  • POST /flux/images — 画像の生成または編集

  • POST /flux/tasks — タスクステータスの照会(単一またはバッチ)

完全な API ドキュメント: platform.acedata.cloud

ドキュメント

ドキュメント

ライセンス

MIT ライセンス — 詳細は LICENSE を参照してください。

リンク

Available Tools

7 tools
flux_edit_imageAInspect

Edit an existing image using Flux with a text prompt.

This allows you to modify an existing image based on a text description.
The kontext models (flux-kontext-pro, flux-kontext-max) are specifically
designed for high-quality image editing and style transfer.

Use this when:
- You want to modify or transform an existing image
- You want to change specific elements in an image
- You want to apply style changes or artistic effects
- You want to add, remove, or replace objects in an image

For generating new images from scratch, use flux_generate_image instead.

Returns:
    Task ID and edited image information including URLs.

Inputs: size (required), prompt (required), image_url (required), model, +1 more. Returns: result

flux_generate_imageAInspect

Generate AI images from a text prompt using Flux.

Flux is a family of fast, high-quality image generation models by Black Forest Labs.
Different models offer different tradeoffs between speed, quality, and capabilities.

Use this when:
- You want to create new images from a text description
- You need high-quality AI-generated artwork or photos
- You want fast image generation with good prompt following

For editing existing images, use flux_edit_image instead.

Returns:
    Task ID and generated image information including URLs.

Inputs: size (required), prompt (required), count, model, +1 more. Returns: result

flux_generate_videoBInspect

Generate text/image/video-to-video or enhance an owned temporary draft. Poll flux_get_task.

Inputs: request (required). Returns: result

flux_get_taskAInspect

Query the status and result of a Flux image or video generation task.

Use this to check if a generation is complete and retrieve the resulting
image/video URLs and metadata.

Use this when:
- You want to check if an image generation has completed
- You need to retrieve image URLs from a previous generation
- You used async callback and want to check results later
- The initial generation returned a task_id without immediate results

Returns:
    Task status and generation result including image URLs.

Inputs: task_id (required). Returns: result

flux_get_tasks_batchAInspect

Query multiple Flux image or video generation tasks at once.

Efficiently check the status of multiple tasks in a single request.
More efficient than calling flux_get_task multiple times.

Use this when:
- You have multiple pending generations to check
- You want to get status of several images at once
- You're tracking a batch of generations

Returns:
    Status and result information for all queried tasks.

Inputs: task_ids (required). Returns: result

flux_list_actionsAInspect

List all available Flux tools and their use cases.

Reference guide for what each tool does and when to use it.

Returns:
    Categorized list of all tools with descriptions.

Inputs: no named parameters. Returns: result

flux_list_modelsAInspect

List all available Flux models and their capabilities.

Reference guide for choosing the right Flux model for your use case.

Returns:
    Detailed list of all Flux models with descriptions and recommendations.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 7 tools

    Disambiguation4/5

    The core tools are clearly separated: generate vs edit vs video generation, and single-task vs batch task queries are explicitly distinguished. Minor overlap exists because flux_generate_video bundles several video workflows and flux_get_tasks_batch could be seen as an optimization of flux_get_task, but descriptions make the intended boundaries clear.

    Naming Consistency5/5

    All tools follow a consistent flux_verb_noun snake_case pattern, such as flux_generate_image, flux_edit_image, flux_get_task, and flux_list_models. The convention is predictable throughout.

    Tool Count5/5

    Seven tools is well-scoped for an image/video generation service. The set covers generation, editing, task polling, batch polling, and reference discovery without obvious padding.

    Completeness4/5

    The surface covers the main lifecycle: generate/edit media, generate video, poll tasks, batch poll, and discover models/actions. Minor gaps remain around cancellation or listing existing tasks, but core workflows appear supported.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers