comfyui-mcp-secure
v2.3.0Secure MCP server for ComfyUI with workflow inspection and audit logging
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
comfyui_list_models Comfyui List Models
List available models in a folder (checkpoints, loras, vae, etc.).
| Parameter | Type | Description |
|---|---|---|
folder | string | Model folder type (checkpoints, loras, vae, etc.) |
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_list_models_detailed Comfyui List Models Detailed
List models in a folder with file metadata (name, pathIndex, modified, created, size). Uses the /experiment/models/{folder} endpoint (#143). Use this when you need the pathIndex (for preview lookups) or file sizes; use comfyui_list_models for a bare-name listing.
| Parameter | Type | Description |
|---|---|---|
folder | string | Model folder type (checkpoints, loras, vae, etc.) |
comfyui_get_model_preview Comfyui Get Model Preview
Fetch a model's preview image via /experiment/models/preview (\#143). Returns the preview as base64-encoded image data with a mime_type, or {"available": false} when the model has no preview (404).
| Parameter | Type | Description |
|---|---|---|
filename * | string | Model filename |
folder * | string | Model folder (checkpoints, loras, etc.) |
path_index * | integer | pathIndex from comfyui_list_models_detailed |
comfyui_list_nodes Comfyui List Nodes
List all available ComfyUI node types.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_get_node_info Comfyui Get Node Info
Get the input/output schema and metadata for a single ComfyUI node type. Returns a dict with keys: input, input_order, is_input_list, output, output_is_list, output_name, name, display_name, description, python_module, category, output_node, search_aliases, plus optional flags like deprecated, experimental, and api_node when set on the node.
| Parameter | Type | Description |
|---|---|---|
node_class * | string | Node class name (e.g. 'KSampler', 'CLIPTextEncode'). Use comfyui_list_nodes to discover available class names. |
comfyui_list_workflows Comfyui List Workflows
List workflow templates registered on the ComfyUI server (the ``/workflow_templates`` endpoint, populated by installed front-end packages). This is distinct from ``comfyui_create_workflow``'s built-in template names (txt2img, img2img, etc.) which are hard-coded in the MCP for graph generation. Returns a paginated envelope: ``{items, total, offset, limit, has_more}``. Each item is ``{"package": str, "templates": [...]}`` from the server.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_list_extensions Comfyui List Extensions
List installed ComfyUI extensions (front-end / back-end JavaScript modules registered with the ComfyUI server). Returns a paginated envelope: ``{items, total, offset, limit, has_more}``. Each item is the extension's URL/path string.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_get_server_features Comfyui Get Server Features
Get the feature flags advertised by the ComfyUI server. Returns the raw ``/features`` response. Useful for capability-based branching, e.g. checking ``supports_preview_metadata`` before requesting preview-format images via ``comfyui_get_image``. Keys on recent ComfyUI (v0.38+): - ``supports_preview_metadata``: preview-format thumbnails via ``comfyui_get_image(preview_format=...)`` are available - ``supports_model_type_tags``: model entries carry type tags - ``max_upload_size``: upload byte budget enforced by ``comfyui_upload_image`` (bytes) - ``node_replacements``: server shi…
comfyui_list_model_folders Comfyui List Model Folders
List the model-folder types ComfyUI recognizes (checkpoints, loras, vae, controlnet, etc.). Pass any returned name as the ``folder`` argument to ``comfyui_list_models`` or ``comfyui_get_model_metadata``. Returns a paginated envelope: ``{items, total, offset, limit, has_more}``.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_get_model_metadata Comfyui Get Model Metadata
Get metadata for a model file.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Name of the model file |
folder * | string | Model folder type (checkpoints, loras, vae, etc.) |
comfyui_audit_dangerous_nodes Comfyui Audit Dangerous Nodes
Audit all installed nodes to identify potentially dangerous ones. Scans for nodes that could execute arbitrary code, run shell commands, or access the file system. Useful for building a dangerous node blacklist.
comfyui_get_system_info Comfyui Get System Info
Return sanitized ComfyUI system information. Returns a whitelist-filtered subset of system stats useful for making generation decisions: GPU VRAM, queue depth, and ComfyUI version. Sensitive fields (hostname, OS, CPU details, file paths, Python version, network interfaces) are deliberately excluded.
comfyui_get_model_presets Comfyui Get Model Presets
Get recommended generation presets for a model family. The presets are static data baked into this MCP — they reflect community best-practice defaults, not anything the connected ComfyUI server reports. At least one of ``model_name`` or ``model_family`` must be supplied; if both are given, ``model_family`` takes precedence and ``model_name`` is ignored.
| Parameter | Type | Description |
|---|---|---|
model_family | Explicit family identifier. Valid values: ``sd15``, ``sdxl``, ``flux``, ``sd3``, ``cascade`` (aliases like ``sd1.5``, ``stable-diffusion-xl``, ``flux.1``, ``sd3.5``, ``stable-cascade`` are also accept… | |
model_name | Model filename to auto-detect the family from (e.g. ``sd_xl_base_1.0.safetensors`` → ``sdxl``). Used as a fallback when ``model_family`` is empty. |
comfyui_get_prompting_guide Comfyui Get Prompting Guide
Get the prompting guide for a model family. The guide is static data baked into this MCP — it gives stylistic and structural advice tuned to each family (prompt structure, weighting syntax conventions, recommended quality tags, negative prompt tips). It does not reflect the connected ComfyUI server's installed models or state.
| Parameter | Type | Description |
|---|---|---|
model_family * | string | Family identifier. Valid values: ``sd15``, ``sdxl``, ``flux``, ``sd3``, ``cascade`` (aliases like ``sd1.5``, ``stable-diffusion-xl``, ``flux.1``, ``sd3.5``, ``stable-cascade`` are also accepted). |
comfyui_list_subgraphs Comfyui List Subgraphs
List available reusable subgraph templates from ComfyUI (#144). Subgraphs are packaged node groups that can be inserted into a workflow as a single unit. Use ``comfyui_get_subgraph`` to fetch the actual graph JSON for a specific subgraph.
comfyui_get_subgraph Comfyui Get Subgraph
Fetch a single subgraph's JSON for inspection or insertion (#144). The ``data`` field in the response contains the subgraph's node map as a JSON string. The workflow inspector recurses into this node map when a subgraph node is submitted in a workflow (#110).
| Parameter | Type | Description |
|---|---|---|
subgraph_id * | string | Subgraph entry ID from comfyui_list_subgraphs |
comfyui_get_history Comfyui Get History
Browse ComfyUI execution history (read-only). Uses server-side ``/history?offset=N&max_items=M`` so callers can page arbitrarily far back. The tool requests one extra entry per page so it can set ``has_more`` without an additional round-trip.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_get_queue Comfyui Get Queue
Get the current ComfyUI execution queue state.
comfyui_get_job Comfyui Get Job
Look up a single job by prompt_id across queue + history. Returns a flat unified job object with top-level keys: prompt_id, status (pending/in_progress/completed/failed/cancelled), timing fields (created_at, started_at, completed_at, execution_duration), outputs (when completed), and error (when failed). Use this to check on a job that may be queued, running, or already finished. Note: this replaces the previous /history/{prompt_id} envelope shape (`{prompt_id: {...}}`); callers should index fields directly on the returned object.
| Parameter | Type | Description |
|---|---|---|
prompt_id * | string |
comfyui_list_jobs Comfyui List Jobs
List jobs across queue and history with filtering, sorting, and pagination. Returns {"jobs": [...], "pagination": {"offset", "limit", "total", "has_more"}}. Each job includes prompt_id, status (pending/in_progress/completed/failed/cancelled), timing, and outputs (when completed).
| Parameter | Type | Description |
|---|---|---|
limit | Max jobs to return. | |
offset | integer | Jobs to skip for pagination. |
sort_by | string | Sort field. |
sort_order | string | Sort direction. |
status | Filter by job status (any combination). | |
workflow_id | Filter by workflow ID set in extra_data. |
comfyui_cancel_job Comfyui Cancel Job
Cancel a running or queued job by its prompt_id. Uses the native /api/jobs/{id}/cancel endpoint (server classifies running/pending/terminal) and falls back to the legacy /queue delete on 404 (older ComfyUI builds).
| Parameter | Type | Description |
|---|---|---|
prompt_id * | string |
comfyui_cancel_jobs Comfyui Cancel Jobs
Batch-cancel one or more jobs by their prompt_ids via /api/jobs/cancel. Useful for "cancel all my queued jobs" without N round-trips.
| Parameter | Type | Description |
|---|---|---|
job_ids * | array |
comfyui_interrupt Comfyui Interrupt
Interrupt the currently executing workflow. Without prompt_id: global interrupt — stops whatever is running now. With prompt_id: targeted — only interrupts if that prompt is the running one. ComfyUI silently no-ops if prompt_id is queued but not yet running.
| Parameter | Type | Description |
|---|---|---|
prompt_id |
comfyui_get_queue_status Comfyui Get Queue Status
Get detailed queue status including currently running and pending prompts.
comfyui_clear_queue Comfyui Clear Queue
Clear items from the execution queue.
| Parameter | Type | Description |
|---|---|---|
clear_pending | boolean | Remove pending workflows from the queue |
clear_running | boolean | Stop the currently running workflow |
comfyui_get_progress Comfyui Get Progress
Get the current execution progress for a workflow via HTTP. Returns status (queued/running/completed/error/unknown), queue position, and output files when available. Step progress and current node are only available when using wait=True on run_workflow/generate_image (WebSocket).
| Parameter | Type | Description |
|---|---|---|
prompt_id * | string | The prompt_id returned by run_workflow or generate_image. |
comfyui_upload_image Comfyui Upload Image
Upload an image to ComfyUI. Defaults to ComfyUI's input directory (the destination workflows read from). Set destination='output' or 'temp' only if you have a specific reason. Payload size is checked against ComfyUI's reported ``max_upload_size`` (from ``/features``) before the request is sent, so oversized uploads get a precise local error instead of an opaque HTTP 413. When the server doesn't report the feature, only the configured limit applies.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Name for the uploaded file (e.g. 'reference.png') |
image_data * | string | Base64-encoded image data |
destination | string | Destination directory. 'input' (default) is where workflows read user-supplied images from; 'output' and 'temp' are usually only useful for testing or scripted setups. |
overwrite | boolean | If True, replace any existing file with the same name. If False (default), ComfyUI auto-renames by suffixing ' (N)'. |
subfolder | string | Optional subfolder within the destination directory |
comfyui_get_image Comfyui Get Image
Download a generated image from ComfyUI or return a direct view URL.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Name of the image file to retrieve |
base_url_override | Optional override for URL responses; falls back to configured base URL | |
preview_format | If set with response_format='data_uri', request a server-rendered thumbnail in this format instead of the original (smaller payload, lossy). | |
preview_quality | Encoder quality (1-100) for preview_format. Default: 90 when preview_format is set. | |
response_format | string | 'data_uri' to inline the image, or 'url' to return a /view URL |
subfolder | string | Subfolder within ComfyUI's output directory. Use the subfolder value from comfyui_list_outputs or generation results. |
comfyui_list_outputs Comfyui List Outputs
List output files from ComfyUI's execution history.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum number of results to return (1-100, default varies by tool). |
offset | integer | Zero-based starting index for pagination. |
comfyui_upload_mask Comfyui Upload Mask
Upload a mask image to ComfyUI. The mask's alpha channel is merged into the original image's alpha channel by the ComfyUI server. The original image must already exist in ComfyUI. Defaults to ComfyUI's input directory.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Name for the uploaded mask file (e.g. 'mask.png') |
mask_data * | string | Base64-encoded mask image data |
original_image * | string | Filename of the original image the mask applies to (must already exist in ComfyUI's input directory) |
destination | string | Destination directory. 'input' (default) is where workflows read user-supplied masks from; 'output' and 'temp' are usually only useful for testing or scripted setups. |
original_subfolder | string | Optional subfolder of the original image |
overwrite | boolean | If True, replace any existing file with the same name. If False (default), ComfyUI auto-renames by suffixing ' (N)'. |
subfolder | string | Optional subfolder for the mask file |
comfyui_get_workflow_from_image Comfyui Get Workflow From Image
Extract embedded workflow and prompt metadata from a ComfyUI-generated PNG. ComfyUI embeds the full workflow JSON and prompt data in PNG text chunks. This enables extracting the exact settings used to generate an image for inspection or re-execution.
| Parameter | Type | Description |
|---|---|---|
filename * | string | Name of the PNG file to extract metadata from |
subfolder | string | Subfolder within ComfyUI's output directory (default: empty) |
comfyui_run_workflow Comfyui Run Workflow
Submit an arbitrary ComfyUI workflow for execution. See also: comfyui_run_workflow_stream for a streaming variant that emits per-node progress events while the workflow executes.
| Parameter | Type | Description |
|---|---|---|
workflow * | string | JSON string of a ComfyUI workflow (API format). Each key is a node ID, each value has 'class_type' and 'inputs'. |
partial_execution_targets | Optional node IDs to (re)execute; everything not listed is served from ComfyUI's execution cache — use for cheap iterative re-runs after tweaking a subset of nodes. Node IDs come from the workflow J… | |
wait | boolean | If True, block until execution completes and return structured result with status, outputs, and elapsed time. If False (default), return immediately with just the prompt_id. |
comfyui_run_workflow_stream Comfyui Run Workflow Stream
Submit a ComfyUI workflow and return websocket stream events plus final status. Uses ComfyUI's websocket stream endpoint internally to capture per-event execution updates (for example, `progress`, `executing`, `executed`). Events are filtered by `prompt_id` when that field is present in the websocket payload. See also: comfyui_run_workflow for a non-streaming variant. Use this streaming version when you need real-time per-node progress events (intended for tooling that surfaces progress to a user); use the non-streaming variant for fire-and-forget submission or when you only need the final r…
| Parameter | Type | Description |
|---|---|---|
workflow * | string | JSON string of a ComfyUI workflow (API format). |
partial_execution_targets | Optional node IDs to (re)execute; the rest is served from ComfyUI's execution cache (partial execution). Omit for full runs. |
comfyui_generate_image Comfyui Generate Image
Generate an image from a text prompt using a default txt2img workflow.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Text description of the image |
cfg | number | Classifier-free guidance scale |
height | integer | Image height in pixels |
model | string | Checkpoint model name (leave empty for default) |
negative_prompt | string | What to avoid in the output |
steps | integer | Number of sampling steps |
wait | boolean | If True, block until complete and return result |
width | integer | Image width in pixels |
comfyui_summarize_workflow Comfyui Summarize Workflow
Summarize a ComfyUI workflow's structure, data flow, and key parameters. Parses the workflow graph, extracts models, parameters, and execution flow. Enriches with display names from the ComfyUI server when available.
| Parameter | Type | Description |
|---|---|---|
workflow * | string | JSON string of a ComfyUI workflow (API format). Each top-level key is a node ID, each value has 'class_type' and 'inputs'. |
output_format | string | Output format: 'text' (human-readable summary) or 'mermaid' (Mermaid flowchart markup). |
comfyui_transform_image Comfyui Transform Image
Transform an existing image using a text prompt (img2img). The input image must already be uploaded to ComfyUI via comfyui_upload_image.
| Parameter | Type | Description |
|---|---|---|
image * | string | Filename of the image in ComfyUI's input directory |
prompt * | string | Text description guiding the transformation |
cfg | number | Classifier-free guidance scale |
model | string | Checkpoint model name (leave empty for default) |
negative_prompt | string | What to avoid in the output |
steps | integer | Number of sampling steps |
strength | number | How much to deviate from the input image |
wait | boolean | If True, block until complete and return result |
comfyui_inpaint_image Comfyui Inpaint Image
Inpaint regions of an image using a mask and text prompt. Both the input image and mask must already be uploaded via comfyui_upload_image/comfyui_upload_mask. White regions in the mask indicate areas to regenerate.
| Parameter | Type | Description |
|---|---|---|
image * | string | Filename of the image in ComfyUI's input directory |
mask * | string | Mask image filename (white=inpaint, black=keep) |
prompt * | string | Text description for the inpainted region |
cfg | number | Classifier-free guidance scale |
model | string | Checkpoint model name (leave empty for default) |
negative_prompt | string | What to avoid in the output |
steps | integer | Number of sampling steps |
strength | number | How much to deviate from the input image |
wait | boolean | If True, block until complete and return result |
comfyui_upscale_image Comfyui Upscale Image
Upscale an image using a model-based upscaler. The input image must already be uploaded to ComfyUI via comfyui_upload_image. The scale factor is determined by the upscale model (e.g. RealESRGAN_x4plus = 4x).
| Parameter | Type | Description |
|---|---|---|
image * | string | Filename of the image in ComfyUI's input directory |
upscale_model | string | Name of the upscale model file. Use comfyui_list_models with folder='upscale_models' to see available models. |
wait | boolean | If True, block until complete and return result |
comfyui_create_workflow Comfyui Create Workflow
Create a ComfyUI workflow from a template with optional parameter overrides. Available templates: ``txt2img``, ``img2img``, ``upscale``, ``inpaint``, ``txt2vid_animatediff``, ``txt2vid_wan``, ``controlnet_canny``, ``controlnet_depth``, ``controlnet_openpose``, ``ip_adapter``, ``lora_stack``, ``face_restore``, ``flux_txt2img``, ``sdxl_txt2img``.
| Parameter | Type | Description |
|---|---|---|
template * | string | Template name from the list above. |
params | string | JSON string of parameter overrides. Defaults to an empty string, meaning "use template defaults". Pass either ``""`` or ``"{}"`` for no overrides. Common keys: ``prompt``, ``negative_prompt``, ``width… |
comfyui_modify_workflow Comfyui Modify Workflow
Apply batch operations to a ComfyUI workflow. Operations execute sequentially in array order. If any operation fails, the call raises ``ValueError`` and the input workflow is left unmodified (atomic — operations are applied to a deep copy).
| Parameter | Type | Description |
|---|---|---|
operations * | string | JSON string of an array of operation objects. |
workflow * | string | JSON string of the workflow to modify. |
comfyui_analyze_workflow Comfyui Analyze Workflow
Analyze a ComfyUI workflow and return its structured shape. Unlike ``comfyui_summarize_workflow`` (which formats a human-readable text or Mermaid summary), this tool returns the raw analysis as a dict so callers can read individual fields directly without parsing prose.
| Parameter | Type | Description |
|---|---|---|
workflow * | string | JSON string of the workflow to analyze. The workflow JSON is a dict keyed by node ID; each value has ``class_type`` and ``inputs``. |
comfyui_validate_workflow Comfyui Validate Workflow
Validate a ComfyUI workflow for structural correctness and security. Checks: node structure, connection references, installed node types, available models, dangerous nodes, and suspicious inputs.
| Parameter | Type | Description |
|---|---|---|
workflow * | string | JSON string of the workflow to validate. |
comfyui_search_models Comfyui Search Models
Search for models on HuggingFace or CivitAI.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query (model name, style, etc.) |
limit | integer | Maximum results to return (0 for default page size; values above server max are capped) |
model_type | string | Filter by type. CivitAI: Checkpoint, LORA, TextualInversion, etc. HuggingFace: text-to-image, etc. |
offset | integer | Starting index for pagination |
source | string | Where to search — "civitai" or "huggingface" |
comfyui_download_model Comfyui Download Model
Download a model from HuggingFace or CivitAI via ComfyUI-Model-Manager.
| Parameter | Type | Description |
|---|---|---|
folder * | string | Target model folder (e.g. "checkpoints", "loras", "vae") |
url * | string | Direct download URL (must be from an allowed domain) |
filename | string | Filename to save as (optional — inferred from URL if empty) |
comfyui_get_download_tasks Comfyui Get Download Tasks
Check the status of active model downloads.
comfyui_cancel_download Comfyui Cancel Download
Cancel and remove a model download task.
| Parameter | Type | Description |
|---|---|---|
task_id * | string | ID of the download task to cancel |
comfyui_search_custom_nodes Comfyui Search Custom Nodes
Search installed custom node packs by name, description, or author.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search term matched against installed node-pack name, ID, description, and author. |
limit | integer | Maximum number of matches to return (1-25). |
offset | integer | Zero-based starting index for pagination. |
comfyui_install_custom_node Comfyui Install Custom Node
Install a custom node pack from the ComfyUI Manager registry.
| Parameter | Type | Description |
|---|---|---|
node_id * | string | Custom-node pack ID from the ComfyUI Manager registry. Use comfyui_search_custom_nodes to discover IDs. |
restart | boolean | If True, restart ComfyUI after install and run a security audit. |
version | string | Specific version to install. Empty string = latest. |
comfyui_uninstall_custom_node Comfyui Uninstall Custom Node
Uninstall a custom node pack.
| Parameter | Type | Description |
|---|---|---|
node_id * | string | Custom-node pack ID to uninstall. |
restart | boolean | If True, restart ComfyUI after uninstall. |
comfyui_update_custom_node Comfyui Update Custom Node
Update a custom node pack to the latest version.
| Parameter | Type | Description |
|---|---|---|
node_id * | string | Custom-node pack ID to update to the latest version. |
restart | boolean | If True, restart ComfyUI after update and run a security audit. |
comfyui_get_custom_node_status Comfyui Get Custom Node Status
Check the custom node operation queue status.
comfyui_get_settings Comfyui Get Settings
Read ComfyUI server settings (sampler defaults, UI prefs, feature flags). Returns the full settings dict as reported by GET /settings.
comfyui_update_settings Comfyui Update Settings
Merge new settings into the ComfyUI server config via POST /settings. Mutating: the change is audit-logged with the full settings payload. Use comfyui_get_settings first to see what's currently set.
| Parameter | Type | Description |
|---|---|---|
settings * | object | A non-empty dict of settings to merge. Keys are setting ids (e.g. "default_sampler"); values are the new values. |