ComfyUI MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COMFYUI_URL | No | Base URL of your ComfyUI instance. | http://127.0.0.1:8188 |
| COMFYUI_WORKFLOW_DIR | No | Directory containing workflow.json. | <repo_root>/workflow_files (relative to dist/index.js) |
| COMFYUI_DEFAULT_LORAS | No | Comma-separated name:strength pairs applied when a request omits loras (e.g. pixel-art-flux.safetensors:0.8). Pass loras: [] in a request to override. | |
| COMFYUI_MCP_HTTP_PORT | No | Port for the built-in HTTP image proxy server. | 8190 |
| COMFYUI_IMAGE_CACHE_DIR | No | Directory for caching downloaded images. | ~/.cache/comfyui-mcp |
| COMFYUI_RANDOMIZE_SEEDS | No | Enable/disable automatic seed randomization for varied results. Set to 'false' to disable. | true |
| COMFYUI_POLL_INTERVAL_MS | No | Interval (ms) between ComfyUI completion checks while blocking in wait: true mode. | 2000 |
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": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| comfyui_generate_imageA | Generate, modify, or post-process images using ComfyUI. Three modes (auto-detected):
By default, returns immediately with a prompt_id and status 'queued'. Use comfyui_get_image to poll for completion and retrieve image URLs. Set wait: true to block until the image is ready (or fails/times out) and get image URLs directly in the response. Parameters:
Must provide at least prompt or image_path. |
| comfyui_get_imageA | Retrieve image URLs for a previously queued job by prompt_id. Use this to poll for completion after calling comfyui_generate_image (default non-blocking mode). Returns status (pending/executing/completed/failed/not_found) and image URLs when ready. |
| comfyui_list_lorasA | List available LoRA files on the ComfyUI server (reads the LoraLoader node enum from /object_info). Returns { loras: string[] } of filenames you can pass to comfyui_generate_image via the |
| comfyui_get_request_historyC | List past image generation requests with current status. |
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 4 tools
The submit/poll split between comfyui_generate_image and comfyui_get_image is clear, and list_loras is unmistakably distinct. The only mild overlap is between comfyui_get_image (status+URLs by prompt_id) and comfyui_get_request_history (list of past requests with status), which could be confused when an agent just wants to check on a job.
All four tools share the comfyui_ prefix and a clean verb_noun pattern (generate_image, get_image, list_loras, get_request_history). Naming is predictable and readable, with no mixed casing or verb styles.
Four tools is a reasonable, well-scoped surface for an image-generation server, with each tool earning its place. It is on the lean side, and the fact that three distinct modes (txt2img, img2img, post-process) are collapsed into a single generate tool suggests some functionality is packed rather than expanded.
The core lifecycle (submit → poll → retrieve URLs) plus LoRA discovery and history is covered. However, there is no cancellation/interrupt tool for queued jobs, no way to list checkpoints/models/samplers, and no explicit seed or batch parameters documented, which will cause dead ends for common workflows.