MCP Flux Studio

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Windsurf/Codeium Cascade (Wave 3+), allowing users to access image generation tools through Cascade's MCP toolbar and AI capabilities

  • Integrates with Flux's image generation API, allowing for text-to-image generation, image-to-image transformation, inpainting, and advanced image controls like edge-based, depth-aware, and pose-guided generation

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+) 兼容
    • 通过人工智能助手无缝调用工具

快速入门

  1. 先决条件
    • Node.js 18+
    • Python 3.12+
    • Flux API 密钥
    • 兼容 IDE(Cursor 或 Windsurf)
  2. 安装

通过 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
  1. 基本配置
    BFL_API_KEY=your_flux_api_key FLUX_PATH=/path/to/flux/installation

有关详细的设置说明(包括特定于 IDE 的配置和故障排除),请参阅我们的安装指南

文档

IDE 集成

光标(v0.45.7+)

MCP Flux Studio 与 Cursor 的 AI 助手无缝集成:

  1. 配置
    • 通过“设置”>“功能”>“MCP”进行配置
    • 支持 stdio 和 SSE 连接
    • 可以通过包装脚本设置环境变量
  2. 用法
    • Cursor 的 AI 助手自动可用的工具
    • 工具调用需要用户批准
    • 实时反馈生成进度

风帆冲浪/Codeium(Wave 3+)

与 Windsurf 的 Cascade AI 集成:

  1. 配置
    • 编辑~/.codeium/windsurf/mcp_config.json
    • 支持基于流程的工具执行
    • JSON 格式配置的环境变量
  2. 用法
    • 通过 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文件。

致谢

-
security - not tested
A
license - permissive license
-
quality - not tested

将 Flux 的高级图像生成和处理功能集成到 AI 编码助手中的服务器,可在 Cursor 和 Windsurf 等 IDE 中实现无缝的文本到图像和图像控制工作流程。

  1. Overview
    1. Features
  2. Quick Start
    1. Installing via Smithery
    2. Manual Installation
  3. Documentation
    1. IDE Integration
      1. Cursor (v0.45.7+)
      2. Windsurf/Codeium (Wave 3+)
    2. Usage
      1. generate
      2. img2img
      3. inpaint
      4. control
    3. Development
      1. Project Structure
      2. Running Tests
      3. Building
    4. Contributing
      1. License
        1. Acknowledgments
          ID: aztg02jhr7