Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-flux-studio

MCP.Pizza Chef: jmanhype

MCP Flux Studio is a Model Context Protocol server that integrates Flux's advanced image generation and manipulation capabilities into AI coding assistants and IDEs like Cursor and Windsurf. It supports text-to-image generation, image-to-image transformations, inpainting, resolution upscaling, and multiple Flux models, enabling developers to seamlessly incorporate powerful image creation and editing features into their development workflows.

Use This MCP server To

Generate images from text prompts with customizable dimensions Transform existing images using image-to-image techniques Perform inpainting on images with user-defined masks Upscale image resolution for higher quality outputs Integrate Flux image generation into IDE coding assistants Customize image aspect ratios for specific project needs Switch between multiple Flux models for varied image styles

README

MCP Flux Studio

smithery badge

A powerful Model Context Protocol (MCP) server that brings Flux's advanced image generation capabilities to your AI coding assistants. This server enables direct integration of Flux's image generation, manipulation, and control features into Cursor and Windsurf (Codeium) IDEs.

Overview

MCP Flux Studio bridges the gap between AI coding assistants and Flux's powerful image generation API, allowing seamless integration of image generation capabilities directly into your development workflow.

Features

  • Image Generation

    • Text-to-image generation with precise control
    • Multiple model support (flux.1.1-pro, flux.1-pro, flux.1-dev, flux.1.1-ultra)
    • Customizable aspect ratios and dimensions
  • Image Manipulation

    • Image-to-image transformation
    • Inpainting with customizable masks
    • Resolution upscaling and enhancement
  • Advanced Controls

    • Edge-based generation (canny)
    • Depth-aware generation
    • Pose-guided generation
  • IDE Integration

    • Full support for Cursor (v0.45.7+)
    • Compatible with Windsurf/Codeium Cascade (Wave 3+)
    • Seamless tool invocation through AI assistants

Quick Start

  1. Prerequisites

    • Node.js 18+
    • Python 3.12+
    • Flux API key
    • Compatible IDE (Cursor or Windsurf)
  2. Installation

Installing via Smithery

To install Flux Studio for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @jmanhype/mcp-flux-studio --client claude

Manual Installation

git clone https://github.com/jmanhype/mcp-flux-studio.git
cd mcp-flux-studio
npm install
npm run build
  1. Basic Configuration
    BFL_API_KEY=your_flux_api_key
    FLUX_PATH=/path/to/flux/installation

For detailed setup instructions, including IDE-specific configuration and troubleshooting, see our Installation Guide.

Documentation

  • Installation Guide - Comprehensive setup instructions
  • API Documentation - Detailed tool documentation
  • Example Usage - Real-world usage examples
  • Contributing Guidelines - How to contribute

IDE Integration

Cursor (v0.45.7+)

MCP Flux Studio integrates seamlessly with Cursor's AI assistant:

  1. Configuration

    • Configure via Settings > Features > MCP
    • Supports both stdio and SSE connections
    • Environment variables can be set via wrapper scripts
  2. Usage

    • Tools automatically available to Cursor's AI assistant
    • Tool invocations require user approval
    • Real-time feedback on generation progress

Windsurf/Codeium (Wave 3+)

Integration with Windsurf's Cascade AI:

  1. Configuration

    • Edit ~/.codeium/windsurf/mcp_config.json
    • Supports process-based tool execution
    • Environment variables configured in JSON
  2. Usage

    • Access tools through Cascade's MCP toolbar
    • Automatic tool discovery and loading
    • Integrated with Cascade's AI capabilities

For detailed IDE-specific setup instructions, see the Installation Guide.

Usage

The server provides the following tools:

generate

Generate an image from a text prompt.

{
  "prompt": "A photorealistic cat",
  "model": "flux.1.1-pro",
  "aspect_ratio": "1:1",
  "output": "generated.jpg"
}

img2img

Generate an image using another image as reference.

{
  "image": "input.jpg",
  "prompt": "Convert to oil painting",
  "model": "flux.1.1-pro",
  "strength": 0.85,
  "output": "output.jpg",
  "name": "oil_painting"
}

inpaint

Inpaint an image using a mask.

{
  "image": "input.jpg",
  "prompt": "Add flowers",
  "mask_shape": "circle",
  "position": "center",
  "output": "inpainted.jpg"
}

control

Generate an image using structural control.

{
  "type": "canny",
  "image": "control.jpg",
  "prompt": "A realistic photo",
  "output": "controlled.jpg"
}

Development

Project Structure

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

Running Tests

npm test

Building

npm run build

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

mcp-flux-studio FAQ

How do I integrate MCP Flux Studio with my IDE?
MCP Flux Studio integrates directly with IDEs like Cursor and Windsurf via the MCP protocol, enabling image generation features within your coding environment.
Can I control the aspect ratio and dimensions of generated images?
Yes, MCP Flux Studio allows customizable aspect ratios and image dimensions to fit your project requirements.
What image manipulation features does MCP Flux Studio support?
It supports image-to-image transformations, inpainting with customizable masks, and resolution upscaling.
Are multiple Flux models supported?
Yes, MCP Flux Studio supports multiple Flux models including flux.1.1-pro, flux.1-pro, flux.1-dev, and flux.1.1-ultra.
Is MCP Flux Studio compatible with LLM providers like OpenAI, Claude, and Gemini?
Yes, it is designed to work seamlessly with various LLM providers including OpenAI, Anthropic's Claude, and Google Gemini.
How does MCP Flux Studio enhance AI coding assistants?
By embedding advanced image generation and manipulation tools directly into coding assistants, it streamlines creative workflows without leaving the IDE.
Can I use MCP Flux Studio for real-time image editing?
Yes, its image manipulation features support interactive workflows such as inpainting and upscaling in real time.
What are the prerequisites for using MCP Flux Studio?
You need an MCP-compatible IDE and access to Flux's image generation API through the MCP server.