comfyui_modify_workflow
Apply batch operations (addnode, removenode, setinput, connect, disconnect) to a workflow.
How to use it
Project documentation lists comfyui_modify_workflow for the Comfyui MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
Install Comfyui MCP
uv --directory /path/to/comfyui_mcp run comfyui-mcp-secureOther tools in Comfyui MCP (39)
Return a structured analysis of a workflow as a dict (nodecount, classtypes, flow, models, parameters, pipeline, promptnodes, negativenodes). Use this when you want to read fields like pipeline programmatically; use comfyuisummarizeworkflow for a human-readable text or Mermaid rendering.
Scan all installed nodes to identify potentially dangerous ones.
Cancel a running or queued job. Uses the native /api/jobs/{id}/cancel endpoint and falls back to the legacy /queue delete on 404 (older ComfyUI builds).
Batch-cancel one or more jobs by promptid via /api/jobs/cancel.
Clear pending and/or running items from the queue.
Create a workflow from templates including txt2img/img2img/upscale/inpaint, txt2vidanimatediff/txt2vidwan, controlnetcanny/controlnetdepth/controlnetopenpose, ipadapter, lorastack, facerestore, fluxtxt2img, and sdxltxt2img.
Text-to-image using a built-in workflow. Params: prompt, negativeprompt, width, height, steps, cfg, model. Set wait=True to block until complete and return outputs.
Look up a single job (queued/running/finished) by promptid.
Get metadata for a specific model file.
Fetch a model's preview image via /experiment/models/preview/{folder}/{pathindex}/{filename}. Returns base64-encoded image data + mime type, or {"available": false} on 404.
Get detailed info about a specific node type.
Get execution progress for a workflow by promptid. Returns status, queue position, and outputs.
Get current execution queue state.
Get detailed queue status including running and pending prompts.
Get ComfyUI server features and capabilities.
Read ComfyUI server settings (sampler defaults, UI prefs, feature flags) from GET /settings.
Fetch a single subgraph's JSON for inspection or insertion (/globalsubgraphs/{id}).
Sanitized GPU VRAM, queue depth, and ComfyUI version (whitelist-filtered from /systemstats).
Inpaint masked regions of an image. Params: image, mask (filenames), prompt, negativeprompt, strength, steps, cfg, model. Both files must be uploaded first.
Queue install for a custom node pack by nodeid; optional restart and post-install security audit.
Interrupt the running workflow (global, or targeted via optional promptid).
List available ComfyUI extensions.
List jobs across queue + history with status filter, sorting, and pagination.
List available model folder types.
List available models by folder (checkpoints, loras, vae, etc.).
List models in a folder with file metadata (name, pathIndex, modified, created, size) from /experiment/models/{folder}. Use this when you need the pathIndex for preview lookups.
List all available node types.
List available reusable subgraph templates from ComfyUI (/globalsubgraphs).
List saved workflow templates.
Submit arbitrary ComfyUI workflow JSON. Inspected for dangerous nodes before execution. Set wait=True to block until complete and return outputs.
Submit workflow JSON and capture ComfyUI websocket stream events (progress, executing, executed, etc.) until terminal status, returning events plus final outputs/status.
Search ComfyUI Manager registry custom node packs by name/description/author.
Summarize a workflow's structure, data flow, models, and parameters. Supports outputformat="text" (default) or outputformat="mermaid" for diagram markup.
Image-to-image transformation. Params: image (filename), prompt, negativeprompt, strength (0.0-1.0), steps, cfg, model. Input must be uploaded via comfyuiuploadimage first.
Queue uninstall for a custom node pack by nodeid; optional restart.
Queue update for a custom node pack by nodeid; optional restart and post-update security audit.
Merge new settings into the ComfyUI server config via POST /settings (audit-logged; mutating).
Upscale an image using a model-based upscaler. Params: image (filename), upscalemodel (default: RealESRGANx4plus.pth).
Validate workflow structure, server compatibility, and security.