comfyui-mcp-secure

v2.3.0
comfyui-mcp-secure Checked 14 hours ago Published 1 month ago

Secure 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.).

ParameterTypeDescription
folderstringModel folder type (checkpoints, loras, vae, etc.)
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-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.

ParameterTypeDescription
folderstringModel 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).

ParameterTypeDescription
filename *stringModel filename
folder *stringModel folder (checkpoints, loras, etc.)
path_index *integerpathIndex from comfyui_list_models_detailed

comfyui_list_nodes Comfyui List Nodes

List all available ComfyUI node types.

ParameterTypeDescription
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-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.

ParameterTypeDescription
node_class *stringNode 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.

ParameterTypeDescription
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-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.

ParameterTypeDescription
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-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}``.

ParameterTypeDescription
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-based starting index for pagination.

comfyui_get_model_metadata Comfyui Get Model Metadata

Get metadata for a model file.

ParameterTypeDescription
filename *stringName of the model file
folder *stringModel 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.

ParameterTypeDescription
model_familyExplicit 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_nameModel 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.

ParameterTypeDescription
model_family *stringFamily 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).

ParameterTypeDescription
subgraph_id *stringSubgraph 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.

ParameterTypeDescription
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-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.

ParameterTypeDescription
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).

ParameterTypeDescription
limitMax jobs to return.
offsetintegerJobs to skip for pagination.
sort_bystringSort field.
sort_orderstringSort direction.
statusFilter by job status (any combination).
workflow_idFilter 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).

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
clear_pendingbooleanRemove pending workflows from the queue
clear_runningbooleanStop 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).

ParameterTypeDescription
prompt_id *stringThe 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.

ParameterTypeDescription
filename *stringName for the uploaded file (e.g. 'reference.png')
image_data *stringBase64-encoded image data
destinationstringDestination directory. 'input' (default) is where workflows read user-supplied images from; 'output' and 'temp' are usually only useful for testing or scripted setups.
overwritebooleanIf True, replace any existing file with the same name. If False (default), ComfyUI auto-renames by suffixing ' (N)'.
subfolderstringOptional subfolder within the destination directory

comfyui_get_image Comfyui Get Image

Download a generated image from ComfyUI or return a direct view URL.

ParameterTypeDescription
filename *stringName of the image file to retrieve
base_url_overrideOptional override for URL responses; falls back to configured base URL
preview_formatIf set with response_format='data_uri', request a server-rendered thumbnail in this format instead of the original (smaller payload, lossy).
preview_qualityEncoder quality (1-100) for preview_format. Default: 90 when preview_format is set.
response_formatstring'data_uri' to inline the image, or 'url' to return a /view URL
subfolderstringSubfolder 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.

ParameterTypeDescription
limitintegerMaximum number of results to return (1-100, default varies by tool).
offsetintegerZero-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.

ParameterTypeDescription
filename *stringName for the uploaded mask file (e.g. 'mask.png')
mask_data *stringBase64-encoded mask image data
original_image *stringFilename of the original image the mask applies to (must already exist in ComfyUI's input directory)
destinationstringDestination directory. 'input' (default) is where workflows read user-supplied masks from; 'output' and 'temp' are usually only useful for testing or scripted setups.
original_subfolderstringOptional subfolder of the original image
overwritebooleanIf True, replace any existing file with the same name. If False (default), ComfyUI auto-renames by suffixing ' (N)'.
subfolderstringOptional 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.

ParameterTypeDescription
filename *stringName of the PNG file to extract metadata from
subfolderstringSubfolder 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.

ParameterTypeDescription
workflow *stringJSON string of a ComfyUI workflow (API format). Each key is a node ID, each value has 'class_type' and 'inputs'.
partial_execution_targetsOptional 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…
waitbooleanIf 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…

ParameterTypeDescription
workflow *stringJSON string of a ComfyUI workflow (API format).
partial_execution_targetsOptional 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.

ParameterTypeDescription
prompt *stringText description of the image
cfgnumberClassifier-free guidance scale
heightintegerImage height in pixels
modelstringCheckpoint model name (leave empty for default)
negative_promptstringWhat to avoid in the output
stepsintegerNumber of sampling steps
waitbooleanIf True, block until complete and return result
widthintegerImage 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.

ParameterTypeDescription
workflow *stringJSON string of a ComfyUI workflow (API format). Each top-level key is a node ID, each value has 'class_type' and 'inputs'.
output_formatstringOutput 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.

ParameterTypeDescription
image *stringFilename of the image in ComfyUI's input directory
prompt *stringText description guiding the transformation
cfgnumberClassifier-free guidance scale
modelstringCheckpoint model name (leave empty for default)
negative_promptstringWhat to avoid in the output
stepsintegerNumber of sampling steps
strengthnumberHow much to deviate from the input image
waitbooleanIf 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.

ParameterTypeDescription
image *stringFilename of the image in ComfyUI's input directory
mask *stringMask image filename (white=inpaint, black=keep)
prompt *stringText description for the inpainted region
cfgnumberClassifier-free guidance scale
modelstringCheckpoint model name (leave empty for default)
negative_promptstringWhat to avoid in the output
stepsintegerNumber of sampling steps
strengthnumberHow much to deviate from the input image
waitbooleanIf 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).

ParameterTypeDescription
image *stringFilename of the image in ComfyUI's input directory
upscale_modelstringName of the upscale model file. Use comfyui_list_models with folder='upscale_models' to see available models.
waitbooleanIf 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``.

ParameterTypeDescription
template *stringTemplate name from the list above.
paramsstringJSON 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).

ParameterTypeDescription
operations *stringJSON string of an array of operation objects.
workflow *stringJSON 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.

ParameterTypeDescription
workflow *stringJSON 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.

ParameterTypeDescription
workflow *stringJSON string of the workflow to validate.

comfyui_search_models Comfyui Search Models

Search for models on HuggingFace or CivitAI.

ParameterTypeDescription
query *stringSearch query (model name, style, etc.)
limitintegerMaximum results to return (0 for default page size; values above server max are capped)
model_typestringFilter by type. CivitAI: Checkpoint, LORA, TextualInversion, etc. HuggingFace: text-to-image, etc.
offsetintegerStarting index for pagination
sourcestringWhere to search — "civitai" or "huggingface"

comfyui_download_model Comfyui Download Model

Download a model from HuggingFace or CivitAI via ComfyUI-Model-Manager.

ParameterTypeDescription
folder *stringTarget model folder (e.g. "checkpoints", "loras", "vae")
url *stringDirect download URL (must be from an allowed domain)
filenamestringFilename 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.

ParameterTypeDescription
task_id *stringID of the download task to cancel

comfyui_search_custom_nodes Comfyui Search Custom Nodes

Search installed custom node packs by name, description, or author.

ParameterTypeDescription
query *stringSearch term matched against installed node-pack name, ID, description, and author.
limitintegerMaximum number of matches to return (1-25).
offsetintegerZero-based starting index for pagination.

comfyui_install_custom_node Comfyui Install Custom Node

Install a custom node pack from the ComfyUI Manager registry.

ParameterTypeDescription
node_id *stringCustom-node pack ID from the ComfyUI Manager registry. Use comfyui_search_custom_nodes to discover IDs.
restartbooleanIf True, restart ComfyUI after install and run a security audit.
versionstringSpecific version to install. Empty string = latest.

comfyui_uninstall_custom_node Comfyui Uninstall Custom Node

Uninstall a custom node pack.

ParameterTypeDescription
node_id *stringCustom-node pack ID to uninstall.
restartbooleanIf True, restart ComfyUI after uninstall.

comfyui_update_custom_node Comfyui Update Custom Node

Update a custom node pack to the latest version.

ParameterTypeDescription
node_id *stringCustom-node pack ID to update to the latest version.
restartbooleanIf 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.

ParameterTypeDescription
settings *objectA non-empty dict of settings to merge. Keys are setting ids (e.g. "default_sampler"); values are the new values.