MCP Flux Studio
MCP Flux 工作室
强大的模型上下文协议 (MCP) 服务器,将 Flux 的高级图像生成功能带入您的 AI 编码助手。该服务器支持将 Flux 的图像生成、操作和控制功能直接集成到 Cursor 和 Windsurf (Codeium) IDE 中。
概述
MCP Flux Studio 弥合了 AI 编码助手和 Flux 强大的图像生成 API 之间的差距,允许将图像生成功能无缝集成到您的开发工作流程中。
特征
图像生成
精确控制的文本到图像生成
多模型支持(flux.1.1-pro、flux.1-pro、flux.1-dev、flux.1.1-ultra)
可定制的宽高比和尺寸
图像处理
图像到图像的转换
使用可自定义的蒙版进行修复
分辨率提升和增强
高级控制
基于边缘的生成(精明)
深度感知生成
姿势引导生成
IDE 集成
完全支持 Cursor (v0.45.7+)
与 Windsurf/Codeium Cascade (Wave 3+) 兼容
通过人工智能助手无缝调用工具
Related MCP server: Flux Schnell MCP Server
快速入门
先决条件
Node.js 18+
Python 3.12+
Flux API 密钥
兼容 IDE(Cursor 或 Windsurf)
安装
通过 Smithery 安装
要通过Smithery自动安装 Flux Studio for Claude Desktop:
npx -y @smithery/cli install @jmanhype/mcp-flux-studio --client claude手动安装
git clone https://github.com/jmanhype/mcp-flux-studio.git
cd mcp-flux-studio
npm install
npm run build基本配置
BFL_API_KEY=your_flux_api_key FLUX_PATH=/path/to/flux/installation
有关详细的设置说明(包括特定于 IDE 的配置和故障排除),请参阅我们的安装指南。
文档
IDE 集成
光标(v0.45.7+)
MCP Flux Studio 与 Cursor 的 AI 助手无缝集成:
配置
通过“设置”>“功能”>“MCP”进行配置
支持 stdio 和 SSE 连接
可以通过包装脚本设置环境变量
用法
Cursor 的 AI 助手自动可用的工具
工具调用需要用户批准
实时反馈生成进度
风帆冲浪/Codeium(Wave 3+)
与 Windsurf 的 Cascade AI 集成:
配置
编辑
~/.codeium/windsurf/mcp_config.json支持基于流程的工具执行
JSON 格式配置的环境变量
用法
通过 Cascade 的 MCP 工具栏访问工具
自动工具发现和加载
与 Cascade 的 AI 功能集成
有关 IDE 特定设置的详细信息,请参阅安装指南。
用法
该服务器提供以下工具:
产生
根据文本提示生成图像。
{
"prompt": "A photorealistic cat",
"model": "flux.1.1-pro",
"aspect_ratio": "1:1",
"output": "generated.jpg"
}img2img
使用另一幅图像作为参考来生成一幅图像。
{
"image": "input.jpg",
"prompt": "Convert to oil painting",
"model": "flux.1.1-pro",
"strength": 0.85,
"output": "output.jpg",
"name": "oil_painting"
}修复
使用蒙版修复图像。
{
"image": "input.jpg",
"prompt": "Add flowers",
"mask_shape": "circle",
"position": "center",
"output": "inpainted.jpg"
}控制
使用结构控制生成图像。
{
"type": "canny",
"image": "control.jpg",
"prompt": "A realistic photo",
"output": "controlled.jpg"
}发展
项目结构
flux-mcp-server/
├── src/
│ ├── index.ts # Main server implementation
│ └── types.ts # TypeScript type definitions
├── tests/
│ └── server.test.ts # Server tests
├── docs/
│ ├── API.md # API documentation
│ └── CONTRIBUTING.md # Contribution guidelines
├── examples/
│ ├── generate.json # Example tool usage
│ └── config.json # Example configuration
├── package.json
├── tsconfig.json
└── README.md运行测试
npm test建筑
npm run build贡献
请阅读CONTRIBUTING.md了解我们的行为准则和提交拉取请求的流程的详细信息。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
致谢
模型上下文协议- 协议规范
Flux API——底层图像生成 API
Available Tools
4 toolscontrolC
Generate an image using structural control
Inputs: type (required), image (required), prompt (required), steps, +2 more.
generateC
Generate an image from a text prompt
Inputs: prompt (required), model, aspect_ratio, width, +2 more.
img2imgC
Generate an image using another image as reference
Inputs: image (required), prompt (required), name (required), model, +4 more.
inpaintC
Inpaint an image using a mask
Inputs: image (required), prompt (required), mask_shape, position, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: 'control' uses structural guidance, 'generate' creates from text, 'img2img' references an image, and 'inpaint' modifies with a mask. The descriptions make it easy to differentiate between structural generation, text-to-image, image-to-image, and inpainting workflows.
The naming is mixed: 'control' and 'generate' are verbs only, while 'img2img' and 'inpaint' are compound terms. There's no consistent pattern like verb_noun, but the names are still readable and descriptive of their functions, avoiding chaotic conventions.
With 4 tools, this is well-scoped for an image generation server. Each tool earns its place by covering distinct aspects of image creation and manipulation, providing a focused set without being too thin or overwhelming for the domain.
The toolset covers core image generation workflows: text-to-image, image-to-image, inpainting, and controlled generation. A minor gap might be the lack of tools for post-processing or batch operations, but the essential CRUD-like operations for image creation are well-represented.
Maintenance
Related MCP Connectors
MCP server for Flux AI image generation
Official FLUX MCP server. Generate, edit, vary, and browse images from Black Forest Labs.
Image and video AI tools and your own pipelines, run from any AI assistant.
Generate images from Claude, ChatGPT, Cursor and Codex with 12 top AI image models. Up to 4 images per call, SVG vectorization, background removal, upscaling and image-to-video. Remote MCP with OAuth, no API keys.
Related MCP Servers
- AlicenseBqualityBmaintenanceA Model Context Protocol server that enables high-quality image generation using the Flux.1 Schnell model via Together AI with customizable parameters.171 npm10MIT
- AlicenseNot gradedqualityDmaintenanceA server that enables generating images through the Replicate API by calling the Flux Schnell model via the Model Context Protocol (MCP).2MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to generate images using Black Forest Labs' Flux model via Cloudflare Workers.1MIT
- AlicenseAqualityBmaintenanceAI image generation with 6 Flux models (flux-dev, flux-pro, flux-kontext) including context-aware image editing, async task management, and built-in model guide.7264 PyPI4MIT