comfy_cli
Drive ComfyUI operations: manage server lifecycle, validate/run workflows, track jobs, search nodes, transfer files, and handle models/skills via CLI actions.
Instructions
Drive the official comfy-cli (envelope/1 JSON contract) for the selected ComfyUI environment. The MCP resolves comfy from COMFY_CLI_PATH, PATH, or the selected workspace's .venv/venv. Driven by the action parameter:
action:"status" — Inspect the comfy-cli integration and selected environment (
comfy which/comfy env);detailselects version/which/env/discover (default env). Call this before local CLI operations when workspace or server routing is uncertain.action:"server_start" / "server_stop" / "server_restart" — Manage a local ComfyUI through comfy-cli background process management. Restart performs
comfy stopfollowed bycomfy launch --background; extra launch arguments go inlaunchArgs.action:"jobs_list" — List local or Comfy Cloud jobs (
limitoptional). Local jobs include CLI-tracked async submissions plus the ComfyUI queue/history.action:"jobs_status" / "jobs_watch" / "jobs_cancel" — Inspect, watch, or cancel one job;
promptIdrequired.action:"jobs_wait" — Wait for jobs: one of
promptId,promptIds, or all=true is required;timeoutSecondsoptional.action:"search_nodes" — Fuzzy-search actual ComfyUI node classes by name, display name, or description using
comfy nodes search;queryrequired. Complements search_custom_nodes, which searches installable node packs. Works locally, in Comfy Cloud, or offline withobjectInfoPath. When comfy-cli is not installed/on PATH and the target is the connected (local) server, falls back to fuzzy-searching that server's live /object_info — so installed-node discovery works without the CLI.action:"workflow_validate" — Validate an API/UI workflow file (class types, inputs, enums, edge wiring) without submission;
workflowPathrequired.action:"workflow_run" — Submit an API/UI workflow file (
workflowPathrequired). Asynchronous by default; set wait=true to await outputs (timeoutSeconds).action:"transfer_upload" — Upload input files (
filesrequired) for local ComfyUI or Comfy Cloud; overwrite=false passes --no-overwrite.action:"transfer_download" — Download completed outputs for
promptId(required);outDirandurlOnlyoptional.action:"models_list_folders" / "models_list_folder" / "models_search" / "models_show" — Discover model folders/files locally or in Comfy Cloud (
folderrequired for list_folder,namefor show). When comfy-cli is not installed/on PATH and the target is the connected (local) server, these read-only listings fall back to that server's own local models (via /models) — so model discovery works without the CLI.action:"models_download" — Download a model
url(required) into the workspace (relativePath, default models/checkpoints). A download can run for many minutes and is gated on an idle-liveness timeout, so a progressing download is never killed.action:"models_remove" — Remove workspace model files (
modelNamesrequired;relativePathoptional).action:"skills_list" / "skills_show" / "skills_validate" / "skills_install" / "skills_status" / "skills_uninstall" — Manage the official comfy-cli bundled agent skills (comfy, fragments, debug, relay, director). validate requires
path; install/uninstall default to dry-run unless apply=true; scope="project" requiresprojectDir.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | action:"jobs_wait" — wait on every known job. | |
| url | No | action:"models_download" — model URL to download. REQUIRED. | |
| name | No | actions "models_show"/"skills_show" — the model or skill name. | |
| path | No | action:"skills_validate" — path to the skill to validate. REQUIRED. | |
| text | No | action:"models_search" — search text. | |
| type | No | action:"models_search" — model type filter (checkpoint, lora, vae, …). | |
| wait | No | action:"workflow_run" — await outputs instead of returning after submission. | |
| apply | No | actions "skills_install"/"skills_uninstall" — actually mutate; default false = dry-run. | |
| files | No | action:"transfer_upload" — input files to upload. REQUIRED. | |
| limit | No | Result cap for "jobs_list", "search_nodes" and the "models_*" listing/search actions. | |
| query | No | action:"search_nodes" — fuzzy search text. REQUIRED. | |
| scope | No | actions "skills_install"/"skills_uninstall"/"skills_status" — install scope. | |
| where | No | Target for the jobs/search_nodes/workflow/transfer/models actions: "local" (default) or "cloud" (Comfy Cloud). | |
| action | Yes | Which comfy-cli operation to perform. Families: status; server_* (lifecycle); jobs_* (list/status/wait/watch/cancel); search_nodes; workflow_* (validate/run); transfer_* (upload/download); models_* (list_folders/list_folder/search/show/download/remove); skills_* (list/show/validate/install/status/uninstall). | |
| detail | No | action:"status" — which inspection to run. | env |
| folder | No | action:"models_list_folder" — the model folder to list. REQUIRED. | |
| outDir | No | action:"transfer_download" — output directory. | |
| skills | No | actions "skills_install"/"skills_uninstall" — skill names. | |
| targets | No | actions "skills_install"/"skills_uninstall" — agent targets. | |
| urlOnly | No | action:"transfer_download" — print URLs instead of downloading files. | |
| promptId | No | Single prompt id. Required for "jobs_status"/"jobs_watch"/"jobs_cancel" and "transfer_download"; accepted for "jobs_wait" (normalized into a one-element promptIds list). | |
| overwrite | No | action:"transfer_upload" — set false to pass --no-overwrite. | |
| promptIds | No | action:"jobs_wait" — prompt ids to wait on. Use this or promptId or all=true. | |
| workspace | No | Optional ComfyUI workspace override. Otherwise COMFYUI_PATH/auto-detection is used. | |
| launchArgs | No | actions "server_start"/"server_restart" — extra ComfyUI launch arguments, e.g. ['--listen','0.0.0.0','--port','8188']. | |
| modelNames | No | action:"models_remove" — model filenames to remove. REQUIRED. | |
| projectDir | No | Working directory for project-scoped skill operations. Required when scope='project'. | |
| relativePath | No | actions "models_download"/"models_remove" — workspace-relative model directory (default models/checkpoints). | |
| workflowPath | No | actions "workflow_validate"/"workflow_run" — path to an API/UI workflow JSON file. REQUIRED. | |
| objectInfoPath | No | action:"search_nodes" — offline object_info JSON file to search instead of a live target. | |
| timeoutSeconds | No | actions "jobs_wait"/"jobs_watch"/"workflow_run" — max seconds to wait. |