Visualizes a ComfyUI workflow JSON from file path or inline as a mermaid flowchart diagram grouping nodes by category with values and data type labels.
From comfynpx claudepluginhub artokun/comfyui-mcp --plugin comfyPath to workflow JSON file, or paste JSON inlineThe user wants to visualize a ComfyUI workflow as a mermaid flowchart diagram.
Get the workflow JSON. The argument may be: $ARGUMENTS
Validate the input. The workflow must be in ComfyUI's API format: an object where keys are node IDs and values have class_type and inputs. If it looks like the web UI format (has nodes and links arrays), tell the user it needs to be in API format and suggest they export it via "Save (API Format)" in ComfyUI.
Visualize. Use the visualize_workflow tool with:
workflow: the parsed workflow JSONshow_values: true (to include parameter values in node labels)direction: "LR" (left-to-right, easiest to read)Present the diagram. Show the mermaid output to the user. The mermaid code block will render as a flowchart showing nodes grouped by category with labeled connections.
User: /comfy-viz ~/workflows/my-workflow.json
Steps:
~/workflows/my-workflow.jsonvisualize_workflowdirection: "TB" (top-to-bottom) for better readability