MCP Flux Studio is a powerful server that integrates Flux's advanced image generation capabilities directly into AI coding assistants like Cursor and Windsurf (Codeium). This integration allows you to generate, manipulate, and control images right from your development environment without switching contexts.
The easiest way to install MCP Flux Studio for Claude Desktop is through Smithery:
npx -y @smithery/cli install @jmanhype/mcp-flux-studio --client claude
For a manual installation, follow these steps:
git clone https://github.com/jmanhype/mcp-flux-studio.git
cd mcp-flux-studio
npm install
npm run build
Before installation, ensure you have:
Basic configuration requires setting environment variables:
BFL_API_KEY=your_flux_api_key
FLUX_PATH=/path/to/flux/installation
Once configured, Flux Studio's tools will be available to Cursor's AI assistant.
~/.codeium/windsurf/mcp_config.json
After configuration, you can access Flux Studio tools through Cascade's MCP toolbar.
MCP Flux Studio provides four main tools for image operations:
Create images from text descriptions:
{
"prompt": "A photorealistic cat",
"model": "flux.1.1-pro",
"aspect_ratio": "1:1",
"output": "generated.jpg"
}
Modify existing images based on prompts:
{
"image": "input.jpg",
"prompt": "Convert to oil painting",
"model": "flux.1.1-pro",
"strength": 0.85,
"output": "output.jpg",
"name": "oil_painting"
}
Modify specific parts of an image:
{
"image": "input.jpg",
"prompt": "Add flowers",
"mask_shape": "circle",
"position": "center",
"output": "inpainted.jpg"
}
Generate images with structural control:
{
"type": "canny",
"image": "control.jpg",
"prompt": "A realistic photo",
"output": "controlled.jpg"
}
MCP Flux Studio supports several powerful capabilities:
Each tool invocation in your IDE will require your approval, and you'll receive real-time feedback on the generation progress.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "flux-studio" '{"command":"npx","args":["-y","@jmanhype/mcp-flux-studio"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"flux-studio": {
"command": "npx",
"args": [
"-y",
"@jmanhype/mcp-flux-studio"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"flux-studio": {
"command": "npx",
"args": [
"-y",
"@jmanhype/mcp-flux-studio"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect