一个强大的模型上下文协议(MCP)服务器,将Flux的高级图像生成能力引入到您的AI编码助手中。此服务器能够直接集成Flux的图像生成、操作和控制功能到Cursor和Windsurf(Codeium)IDE中。
MCP Flux Studio弥合了AI编码助手与Flux强大图像生成API之间的差距,使图像生成能力无缝地融入到您的开发流程中。
图像生成
图像操作
高级控制
IDE集成
前提条件
安装
要通过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特定配置和故障排除,请参阅我们的安装指南。
MCP Flux Studio与Cursor的AI助手无缝集成:
配置
使用
与Windsurf的Cascade AI集成:
配置
~/.codeium/windsurf/mcp_config.json使用
详细的IDE特定设置说明,请参阅安装指南。
服务器提供以下工具:
从文本提示生成图像。
{
"prompt": "一只超现实的猫",
"model": "flux.1.1-pro",
"aspect_ratio": "1:1",
"output": "generated.jpg"
}
使用另一张图像作为参考生成图像。
{
"image": "input.jpg",
"prompt": "转换为油画",
"model": "flux.1.1-pro",
"strength": 0.85,
6"output": "output.jpg",
"name": "oil_painting"
}
使用遮罩修复图像。
{
"image": "input.jpg",
"prompt": "添加花朵",
"mask_shape": "circle",
"position": "center",
"output": "inpainted.jpg"
}
使用结构控制生成图像。
{
"type": "canny",
"image": "control.jpg",
"prompt": "一张真实的照片",
"output": "controlled.jpg"
}
flux-mcp-server/
├── src/
│ ├── index.ts # 主服务器实现
│ └── types.ts # TypeScript类型定义
├── tests/
│ └── server.test.ts # 服务器测试
├── docs/
│ ├── API.md # API文档
│ └── CONTRIBUTING.md # 贡献指南
├── examples/
│ ├── generate.json # 示例工具使用
│ └── config.json # 示例配置
├── package.json
├── tsconfig.json
└── README.md
npm test
npm run build
请阅读CONTRIBUTING.md,了解我们的行为准则以及提交拉取请求的过程。
本项目采用MIT许可证 - 详情见LICENSE文件。