Flux MCP Integration Guide

MCP (Model Context Protocol) is a model context protocol introduced by Anthropic that allows AI models (such as Claude and GPT) to call external tools through standardized interfaces. Through the Flux MCP Server provided by AceData Cloud, you can generate and edit AI images directly in AI clients such as Claude Desktop, VS Code, and Cursor.

Feature Overview

Flux MCP Server provides the following core features:

  • Text-to-image generation — Generate high-quality images from text prompts
  • Image editing — Edit existing images based on text instructions
  • Multi-model support — Supports multiple models, including Flux Pro, Flux Dev, Flux 2, and Flux Kontext
  • Model lookup — View all available models and their capabilities
  • Task lookup — Monitor generation progress and retrieve results

Prerequisites

Log in to the application list, open General Application, and click the copy button to the right of API KEY.

Get an Ace Data Cloud API Key

Replace the Token placeholder in the configuration below with the copied Key. When running locally, you can provide the raw Key through ACEDATACLOUD_API_TOKEN.

Method 1: Use the Hosted MCP Server (Recommended, No Installation)

AceData Cloud already hosts the Flux MCP Server in the cloud. No local dependencies need to be installed; simply enter the following URL in your AI client to use it:

https://flux.mcp.acedata.cloud/mcp

Authentication: Add Authorization: Bearer Your API Token to the request headers (Claude.ai handles this automatically through OAuth, so there is no need to enter a Token manually).

Claude.ai (Web Version, OAuth Login, Easiest)

  1. Open Claude.ai → Customize in the bottom-left corner → Connectors → Add More
  2. Enter the URL: https://flux.mcp.acedata.cloud/mcp
  3. Complete the OAuth authorization login (you will be automatically redirected to the AceData Cloud login page)
  4. Return to the conversation interface, and the tools will be ready to use

Claude Desktop

Edit the configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "flux": {
      "type": "http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer 你的API Token"
      }
    }
  }
}

Save the file and restart Claude Desktop for the changes to take effect.

Claude Code (Terminal Command Line)

claude mcp add flux --transport http https://flux.mcp.acedata.cloud/mcp \
  -H "Authorization: Bearer 你的API Token"

VS Code (GitHub Copilot)

Create .vscode/mcp.json in the project root directory:

{
  "servers": {
    "flux": {
      "type": "http",
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer 你的API Token"
      }
    }
  }
}

Cursor

Create .cursor/mcp.json in the project root directory:

{
  "mcpServers": {
    "flux": {
      "url": "https://flux.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer 你的API Token"
      }
    }
  }
}

Other MCP-Compatible Clients

Any client that supports the MCP Streamable HTTP protocol (Windsurf, Cline, ChatGPT Connectors, Gemini CLI, JetBrains AI Assistant, etc.) can connect by entering the following two items:

  • URL: https://flux.mcp.acedata.cloud/mcp
  • Header: Authorization: Bearer Your API Token

Method 2: Run Locally (pip / uvx Installation)

If you need to run offline, customize the code, or deploy on an internal network, you can install the MCP Server locally and start it via stdio.

Installation

Install with pip (recommended):

pip install mcp-flux-pro

Or install from source:

git clone https://github.com/AceDataCloud/FluxMCP.git
cd FluxMCP
pip install -e .

Once installation is complete, you can start the service using the mcp-flux-pro command.

Use in Claude Desktop (Local)

Edit the Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the following configuration:

{
  "mcpServers": {
    "flux": {
      "command": "mcp-flux-pro",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}

If using uvx (no need to install the package in advance):

{
  "mcpServers": {
    "flux": {
      "command": "uvx",
      "args": ["mcp-flux-pro"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}

Save the configuration and restart Claude Desktop for the changes to take effect.

Use in VS Code / Cursor (Local)

Create .vscode/mcp.json in the project root directory:

{
  "servers": {
    "flux": {
      "command": "mcp-flux-pro",
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}

Or use uvx:

{
  "servers": {
    "flux": {
      "command": "uvx",
      "args": ["mcp-flux-pro"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "你的API Token"
      }
    }
  }
}

Available Tools

Tool Name Description
flux_generate_image Generate images from text prompts
flux_edit_image Edit existing images based on text instructions
flux_generate_video FLUX 3 text-to-video, image-to-video, video generation, and existing draft enhancement
flux_get_task Query the status of a single task
flux_get_tasks_batch Query the status of multiple tasks in a batch
flux_list_models List all available models and their capabilities
flux_list_actions List all available tools and workflow examples

Usage Examples

Once configured, you can call these features directly in your AI client using natural language, for example:

  • “Help me generate a cyberpunk-style city nightscape using Flux”
  • “Change the background of this photo to a beach”
  • “Use the Flux Kontext Pro model to edit this image and change the clothing color to red”
  • “List all available Flux models”

More Information

Model and Size Constraints

The size for flux-2-flex, flux-2-pro, flux-2-max, and Kontext models must use an aspect ratio, such as 1:1 or 16:9, not pixel dimensions such as 1024x1024. flux-2-klein supports generation only and is not among the available models for flux_edit_image.

flux_generate_video uses request.mode to distinguish between t2v, i2v, v2v, and draft_enhance, with inputs displayed according to the mode. Draft enhancement must reference its own temporary draft_task_id. Submissions are asynchronous by default; retain the returned task ID and use flux_get_task to retrieve the result.