generate_imageLABSCO SUMMARY
Your own image model, addressed in words.
It puts a local Stable Diffusion instance behind plain requests — describe the picture, name the checkpoint, upscale the frame you keep — with the files landing in a directory you control.
What it is
A Node server in front of a Stable Diffusion WebUI instance (AUTOMATIC1111 or ForgeUI) that was started with its API enabled. Generation, model switching and upscaling all run on your own WebUI, and finished images are written to a directory you choose.
What you get
- generate_image runs text-to-image against your WebUI, with the controls you would use there: negative_prompt, sampler_name, scheduler_name, cfg_scale, batch_size and restore_faces
- get_sd_models lists the checkpoints that instance has, and set_sd_model switches to one by name
- get_sd_upscalers lists the upscalers available on it
- upscale_images enlarges finished images, either by multiplier or to fixed dimensions, depending on resize_mode
- Results are written to output_path as files rather than returned as chat attachments
Requirements
Node, and a reachable Stable Diffusion WebUI started with its API enabled. The server needs SD_WEBUI_URL and SD_OUTPUT_DIR; SD_AUTH_USER and SD_AUTH_PASS only if your WebUI has basic auth turned on. Defaults for resize mode, multiplier, target size and the two upscalers can be preset in the same config block.
Setup effort
Build from source — git clone https://github.com/Ichigo3766/image-gen-mcp.git
USE CASES
Generating an image without leaving the conversation
One call carries the prompt and the generation settings, and the file lands in your output directory.
Switching checkpoints by name
List what the WebUI has loaded and switch to the one you want, instead of tabbing over to its dropdown.
Enlarging the frame you decided to keep
Check which upscalers that instance has, then enlarge by multiplier or to a fixed size.
Trying one prompt several ways at once
Sampler, scheduler, CFG scale and batch size are parameters on the call, so variations come back in a single pass.
5 tools
Listed in project docs. Your client may show a different list.
get_sd_modelsset_sd_modelget_sd_upscalersupscale_imagesBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation.
Optional
- SD_AUTH_USER in your environment
- SD_AUTH_PASS in your environment
INSTALLATION
Connect your client
You clone and build this one yourself.
Server setup
git clone https://github.com/Ichigo3766/image-gen-mcp.git
cd image-gen-mcp
npm install
npm run buildMCP Clients
Any MCP client
{
"mcpServers": {
"image-gen": {
"command": "node",
"args": [
"<YOUR_PATH_TO_IMAGE_GEN_MCP>/build/index.js"
],
"env": {
"SD_WEBUI_URL": "http://<YOUR_SD_WEBUI_URL>:7860",
"SD_OUTPUT_DIR": "<YOUR_SD_OUTPUT_DIR>"
}
}
}
}The configuration on this page does not set SD_AUTH_USER, SD_AUTH_PASS.