- Home
- MCP servers
- DiffuGen
DiffuGen
- shell
17
GitHub Stars
shell
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You will run an MCP server that exposes image generation from Flux and Stable Diffusion models to your IDEs and chat interfaces. This server speaks the MCP protocol, allowing compatible clients to request generated images and receive results programmatically. It is designed to be integrated into your development workflow so you can generate visuals without leaving your coding environment.
How to use
You connect your MCP-enabled IDE or chat tool to the DiffuGen MCP server. Once connected, you can ask for image generation using simple prompts and optional parameters such as model, size, steps, and sampling method. The server supports both Flux models (flux-schnell, flux-dev) and Stable Diffusion variants (sdxl, sd3, sd15). You can issue standard prompts like “generate an image of a futuristic city” or “create a flux image of a sunset over mountains,” and tailor results with width, height, steps, cfg_scale, seed, and more.
How to install
Prerequisites you need before installation: a Unix-like shell (Linux/macOS) or PowerShell on Windows, Git, Python 3.8+ (for runtime tooling), and a compatible GPU driver if you plan to use CUDA acceleration.
git clone https://github.com/CLOUDWERX-DEV/diffugen.git
cd DiffuGen
chmod +x diffugen.sh
chmod +x setup_diffugen.sh
./setup_diffugen.sh
If you prefer manual setup, clone the repositories and build the core components as described in the inline installation steps. After obtaining the code, you will configure the MCP integration by editing the generated diffugen.json and wiring it into your IDEs.
Configuration and runtime details
DiffuGen uses a single configuration file named diffugen.json as its source of truth. You place this file in the DiffuGen root and use it to set paths, default parameters, VRAM usage, and IDE integration metadata. The example configuration shows how to point to your stable-diffusion.cpp binary and model directory, assign a default model, and specify the output location.
{
"mcpServers": {
"diffugen": {
"command": "/home/cloudwerxlab/Desktop/Servers/MCP/Tools/DiffuGen/diffugen.sh",
"args": [],
"env": {
"CUDA_VISIBLE_DEVICES": "0",
"SD_CPP_PATH": "path/to/stable-diffusion.cpp",
"default_model": "flux-schnell"
},
"resources": {
"models_dir": "path/to/stable-diffusion.cpp/models",
"output_dir": "path/to/outputs",
"vram_usage": "adaptive"
},
"metadata": {
"name": "DiffuGen",
"version": "1.0",
"description": "Your AI art studio embedded directly in code. Generate, iterate, and perfect visual concepts through this powerful MCP server for Cursor, Windsurf, and other compatible IDEs, utilizing cutting-edge Flux and Stable Diffusion models without disrupting your development process.",
"author": "CLOUDWERX LAB",
"homepage": "https://github.com/CLOUDWERX-DEV/diffugen",
"usage": "Generate images using two primary methods..."
},
"cursorOptions": {"autoApprove": true, "category": "Image Generation", "icon": "🖼️", "displayName": "DiffuGen"},
"windsurfOptions": {"displayName": "DiffuGen", "icon": "🖼️", "category": "Creative Tools"},
"default_params": {
"steps": {
"flux-schnell": 8,
"flux-dev": 20,
"sdxl": 20,
"sd3": 20,
"sd15": 20
},
"cfg_scale": {
"flux-schnell": 1.0,
"flux-dev": 1.0,
"sdxl": 7.0,
"sd3": 7.0,
"sd15": 7.0
},
"sampling_method": {
"flux-schnell": "euler",
"flux-dev": "euler",
"sdxl": "euler",
"sd3": "euler",
"sd15": "euler"
}
}
}
}
}
Security and access notes
Only trusted MCP clients should connect to your local DiffuGen server. Keep your IDE configurations secure and restrict access to the machine hosting the server. When exposing an HTTP API via the OpenAPI server, implement appropriate authentication and network controls to prevent unauthorized usage.
Troubleshooting and tips
If you run into missing models or path errors, verify that your diffugen.json paths point to existing model directories and that the output directory is writable. CUDA/GPU issues are resolved by ensuring correct CUDA_VISIBLE_DEVICES, up-to-date NVIDIA drivers, and adequate VRAM for the selected model.
Available tools
generate_stable_diffusion_image
Generate an image using Stable Diffusion models with configurable width, height, steps, cfg_scale, seed, and sampling method.
generate_flux_image
Generate an image using Flux models with configurable parameters similar to Stable Diffusion.