Flux MCP Integration Guide
MCP (Model Context Protocol) is a model context protocol launched by Anthropic that allows AI models (such as Claude, GPT, etc.) to call external tools through a standardized interface. With the Flux MCP Server provided by AceData Cloud, you can directly generate and edit AI images within AI clients like Claude Desktop, VS Code, Cursor, and more.
¶ Feature Overview
Flux MCP Server offers 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 various models including Flux Pro, Flux Dev, Flux Schnell, Flux Kontext, etc.
- Model Query — View all available models and their capabilities
- Task Query — Monitor generation progress and retrieve results
¶ Prerequisites
Before use, you need to obtain an AceData Cloud API Token:
- Register or log in to the AceData Cloud Platform
- Go to the Flux Images API page
- Click "Acquire" to get the API Token (free quota granted on first application)
¶ Installation and Configuration
¶ Method 1: pip Installation (Recommended)
pip install mcp-flux-pro
¶ Method 2: Source Installation
git clone https://github.com/AceDataCloud/FluxMCP.git
cd FluxMCP
pip install -e .
After installation, you can start the service using the mcp-flux-pro command.
¶ Using in Claude Desktop
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": "your API Token"
}
}
}
}
If using uvx (no need to pre-install packages):
{
"mcpServers": {
"flux": {
"command": "uvx",
"args": ["mcp-flux-pro"],
"env": {
"ACEDATACLOUD_API_TOKEN": "your API Token"
}
}
}
}
Save the configuration and restart Claude Desktop to use Flux-related tools in conversations.
¶ Using in VS Code / Cursor
Create .vscode/mcp.json in the project root directory:
{
"servers": {
"flux": {
"command": "mcp-flux-pro",
"env": {
"ACEDATACLOUD_API_TOKEN": "your API Token"
}
}
}
}
Or use uvx:
{
"servers": {
"flux": {
"command": "uvx",
"args": ["mcp-flux-pro"],
"env": {
"ACEDATACLOUD_API_TOKEN": "your 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_get_task |
Query the status of a single task |
flux_get_tasks_batch |
Batch query task statuses |
flux_list_models |
List all available models and their capabilities |
flux_list_actions |
List all available tools and workflow examples |
¶ Usage Examples
After configuration, you can directly invoke these features in AI clients using natural language, for example:
- "Help me generate a cyberpunk-style city nightscape with 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
- GitHub Repository: AceDataCloud/FluxMCP
- PyPI Package: mcp-flux-pro
- API Documentation: Flux Image Generation API
