comfyui-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COMFYUI_HOST | No | ComfyUI host | 127.0.0.1 |
| COMFYUI_PATH | No | ComfyUI install root (the dir with main.py) | ~/ComfyUI |
| COMFYUI_PORT | No | ComfyUI port | 8188 |
| COMFYUI_MODELS_PATH | No | Models root | $COMFYUI_PATH/models |
| COMFYUI_OUTPUT_PATH | No | Where renders land | $COMFYUI_PATH/output |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| system_checkA | Verify system readiness: GPU, driver, VRAM. Reads the driver, not torch. This process never allocates CUDA tensors, so torch.cuda would report 0 whether or not ComfyUI is holding every byte. |
| start_comfyuiC | Launch ComfyUI with VRAM-optimized flags |
| stop_comfyuiC | Graceful shutdown of ComfyUI server |
| get_comfyui_statusA | Check if ComfyUI is running |
| generate_imageA | Submit an async text-to-image generation job. Runs the packaged SDXL workflow: loads the diffusion model, encodes the
prompt pair, samples, and decodes. Returns immediately with a job id --
poll Args:
prompt: What to generate.
negative_embedding: Textual-inversion embedding appended to the negative prompt.
negative_prompt: What to avoid.
width: Output width in pixels.
height: Output height in pixels.
steps: Sampling steps. More is slower and usually better.
cfg_scale: Classifier-free guidance. Higher follows the prompt harder.
sampler: Sampler name, as ComfyUI exposes it.
scheduler: Scheduler name, as ComfyUI exposes it.
lora: Single LoRA filename from comfyui/models/loras/.
lora_weight: Weight for Returns:
A job record with |
| get_job_statusC | Poll for job completion |
| generate_ipadapterB | Generate image with IP-Adapter multi-reference style blending. Feeds 1--4 reference images into the diffusion model to influence style, composition, and content of the generated output. Args: prompt: Text prompt describing desired output reference_images: List of 1-4 image filenames from comfyui/input/ negative_prompt: What to avoid in the output negative_embedding: Textual inversion embedding name (e.g., "DeepNegative_xl_v1") to append to negative prompt width: Output width (512 recommended for 6GB VRAM) height: Output height steps: Sampling steps (10-20 for speed, 30+ for quality) cfg_scale: Classifier-free guidance scale sampler: Sampling algorithm scheduler: Noise schedule seed: Fixed seed for reproducibility (None = random) reference_weight: How strongly reference images influence output (0.0-1.0+) weight_type: "style transfer", "composition", "linear", etc. denoise: Denoising strength (1.0 = full generation) start_at: When to start applying IP-Adapter (0.0 = beginning) end_at: When to stop applying IP-Adapter (1.0 = end) embeds_scaling: Embedding scaling strategy loras: Optional list of LoRA configs [{"name": str, "weight": float}] output_format: Always "png" for now output_prefix: Filename prefix for saved images Returns: Dict with job_id, status, queue_position |
| batch_generate_ipadapterB | Submit batch IP-Adapter jobs with optional per-generation randomization. All jobs in the batch use the SAME reference images, but each prompt creates a distinct output. Supports parameter randomization per job. Args: prompts: List of positive prompt strings (one per job) reference_images: Shared reference images for all jobs in batch shared_params: Static parameters applied to all generations randomize: Per-generation randomization specs (overrides shared_params) deduplicate_seeds: Ensure unique seeds across batch priority: Queue priority hint Returns: Batch metadata with batch_id, total_jobs, queued_jobs, job_ids |
| list_modelsB | Discover available models: unet, clip, vae, lora |
| download_modelA | Download a model file into the right ComfyUI models subdirectory. The contract is deliberately tight, because this writes into the user's model tree:
|
| batch_generateB | Submit batch jobs with optional per-generation randomization. Args: prompts: List of positive prompt strings (one per job) shared_params: Static parameters applied to all generations randomize: Per-generation randomization specs (override shared_params) Supports: scalar, [min, max] range, choice pool, "random"/"random_unsafe" deduplicate_seeds: Ensure unique seeds across all jobs in this batch priority: Queue priority hint ("high" | "normal") Returns: Batch metadata with batch_id, total_jobs, queued_jobs, job_ids |
| get_vram_usageA | Monitor live GPU memory and utilisation. Reads the driver, not torch: this process holds no CUDA tensors, so torch would report 0 no matter what ComfyUI is actually holding. |
| emergency_cleanupB | Recover GPU memory by unloading ComfyUI's models. ComfyUI is a separate process and holds the models, so torch.cuda in THIS process can never free them. POST /free on ComfyUI is the only real lever; nvidia-smi measures the result. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 13 tools
The core generation matrix is reasonably separable (generate_image vs generate_ipadapter vs batch_generate vs batch_generate_ipadapter), but system_check and get_vram_usage both read driver-level GPU/VRAM data and are easy to swap, and get_comfyui_status vs get_job_status are only distinguished by careful reading. Four near-parallel generation tools plus two overlapping health tools make misselection plausible without studying descriptions.
All names are snake_case and mostly verb-first (get_vram_usage, get_job_status, start_comfyui, list_models). Minor deviations: system_check is noun-first, the comfyui_ prefix is applied inconsistently (start_comfyui/stop_comfyui but not generate_image), and batch variants use a prefix while single variants use a suffix.
Thirteen tools is well within a healthy range and each maps to a distinct operational need: lifecycle control, monitoring, model management, and four generation paths. Nothing feels padded or missing at the count level.
Lifecycle (start/stop/status), GPU monitoring/cleanup, model discovery and download, async generation with polling, plus batch and IP-Adapter variants give broad coverage. Gaps remain: no cancel/abort job, no queue management or job listing, and no way to run custom or list stored workflows.