FluxMCP
FluxMCP
一个用于 AI 图像生成和编辑的 模型上下文协议 (MCP) 服务器,通过 AceDataCloud 平台使用 Flux。
直接从 Claude、Cursor 或任何兼容 MCP 的客户端,使用 Flux 模型(flux-dev, flux-pro, flux-kontext)生成和编辑精美的 AI 图像。
功能特性
图像生成 - 使用 6 种 Flux 模型根据文本提示生成图像
图像编辑 - 使用上下文感知的 Flux Kontext 模型编辑现有图像
任务管理 - 跟踪异步生成任务并进行批量状态查询
模型指南 - 内置模型选择和提示词编写指导
双重传输 - 支持 stdio(本地)和 HTTP(远程/云端)模式
Docker 就绪 - 已容器化并提供 K8s 部署清单
安全 - 在 HTTP 模式下支持 Bearer 令牌认证及每请求隔离
Related MCP server: DiffuGen
工具参考
工具 | 描述 |
| 使用 Flux 根据文本提示生成 AI 图像。 |
| 使用 Flux 和文本提示编辑现有图像。 |
| 列出所有可用的 Flux 模型及其功能。 |
| 列出所有可用的 Flux 工具及其使用场景。 |
| 查询 Flux 图像生成任务的状态和结果。 |
| 同时查询多个 Flux 图像生成任务。 |
快速入门
1. 获取您的 API 令牌
在 AceDataCloud 平台 注册
前往 API 文档页面
点击 “Acquire” 获取您的 API 令牌
复制该令牌以供下方使用
2. 使用托管服务器(推荐)
AceDataCloud 托管了一个受管理的 MCP 服务器 —— 无需本地安装。
端点: https://flux.mcp.acedata.cloud/mcp
所有请求都需要 Bearer 令牌。请使用第 1 步中的 API 令牌。
Claude.ai
通过 OAuth 直接在 Claude.ai 上连接 —— 无需 API 令牌:
前往 Claude.ai 设置 → 集成 → 添加更多
输入服务器 URL:
https://flux.mcp.acedata.cloud/mcp完成 OAuth 登录流程
开始在对话中使用这些工具
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 扩展,该扩展捆绑了所有 15 个 MCP 服务器,支持一键设置。
JetBrains IDEs
前往 设置 → 工具 → AI Assistant → 模型上下文协议 (MCP)
点击 添加 → HTTP
粘贴:
{
"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 8000Claude 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 模型和功能 |
| 显示所有工具和工作流示例 |
可用提示词
提示词 | 描述 |
| 选择正确工具和模型的指南 |
| 编写有效提示词的最佳实践 |
| 常见工作流模式和示例 |
支持的模型
模型 | 质量 | 速度 | 尺寸格式 | 最佳用途 |
| 良好 | 快 | 像素 (256-1440px) | 快速原型设计 |
| 高 | 中 | 像素 (256-1440px) | 生产环境使用 |
| 高 | 中 | 像素 (256-1440px) | 更好的提示词遵循能力 |
| 最高 | 较慢 | 长宽比 | 最高质量 |
| 高 | 中 | 长宽比 | 图像编辑 |
| 最高 | 较慢 | 长宽比 | 复杂编辑 |
使用示例
生成图像
"Generate a photorealistic mountain landscape at golden hour"
→ flux_generate_image(prompt="...", model="flux-pro-1.1-ultra", size="16:9")编辑图像
"Add sunglasses to the person in this photo"
→ flux_edit_image(prompt="Add sunglasses", image_url="https://...", model="flux-kontext-pro")检查任务状态
"What's the status of my generation?"
→ flux_get_task(task_id="...")环境变量
变量 | 必需 | 默认值 | 描述 |
| 是 (stdio) | — | 来自 AceDataCloud 的 API 令牌 |
| 否 |
| API 基础 URL |
| 否 | — | OAuth 客户端 ID (托管模式) |
| 否 |
| 平台基础 URL |
| 否 |
| 请求超时时间(秒) |
| 否 |
| MCP 服务器名称 |
| 否 |
| 日志级别 |
开发
设置
git clone https://github.com/AceDataCloud/FluxMCP.git
cd FluxMCP
pip install -e ".[all]"
cp .env.example .env
# Edit .env with your API tokenLint 与格式化
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=htmlGit Hooks
git config core.hooksPath .githooksAPI 参考
此 MCP 服务器使用 AceDataCloud Flux API:
POST /flux/images — 生成或编辑图像
POST /flux/tasks — 查询任务状态(单个或批量)
完整 API 文档:platform.acedata.cloud
许可证
MIT 许可证 —— 详情请参阅 LICENSE。
链接
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA server that integrates Flux's advanced image generation and manipulation features into AI coding assistants, enabling seamless text-to-image and image control workflows in IDEs like Cursor and Windsurf.41925MIT
- Alicense-qualityDmaintenancePowerful image generation system leveraging multiple Stable Diffusion models (flux-schnell, flux-dev, sdxl, sd3, sd15) for creating high-quality AI-generated images with precise customization.19MIT
- AlicenseBqualityFmaintenanceEnables seamless integration with Fal.ai's 600+ image generation models including Flux and Stable Diffusion. Supports real-time streaming, workflow execution, and unified access to AI image generation through natural language.529MIT
- AlicenseAqualityDmaintenanceEnables AI image generation using FLUX models through ComfyUI with GPU acceleration, supporting image generation, 4x upscaling, and background removal with optimized Docker deployment.64MIT
Related MCP Connectors
AI image, video & music generation. Flux, Veo 3.1, Suno V5. Free tier included.
Image, video, audio, face-swap, talking avatars and chat across 300+ AI models, one balance.
100+ AI models: FLUX, Sora, Veo, Kling, Runway, Suno. OAuth or Bearer. No VPN. RU billing.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/AceDataCloud/FluxMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server