What you can do with ComfyUI

Built for

AI Artists, Local Generative Media, Workflow Automation

Example workflows

Check ComfyUI is ready

Uses status read before queueing work.

Try this

Check whether my local ComfyUI server is running and summarize GPU memory and the current queue.

List checkpoints

Uses models list for workflow authoring.

Try this

List available checkpoint models in my local ComfyUI install so I can pick one for a txt2img workflow.

Fetch a finished render

Chains history + image read for review.

Try this

Given the latest ComfyUI history entry, fetch the output image and describe what was generated.

Context to know first

Does this run ComfyUI in the cloud?

No. Workflows execute on your machine through ComfyUI Desktop or a local ComfyUI server. MCPBundles Desktop forwards API calls to localhost.

Which port should I use?

ComfyUI Desktop usually listens on port 8000. Command-line ComfyUI installs often use 8188. Match the port in your MCPBundles connection to the value shown in ComfyUI's server settings.

AI Skill
SKILL.md

Domain knowledge for ComfyUI — workflow patterns, data models, and gotchas for your AI agent.

ComfyUI (local)

ComfyUI is a node-graph engine for diffusion and generative media. This bundle reaches the HTTP API on the user's machine through MCPBundles Desktop — not a hosted ComfyUI cloud.

Runtime requirements

  • ComfyUI Desktop or a ComfyUI server must be running locally with the HTTP API enabled.
  • ComfyUI Desktop defaults to 127.0.0.1:8000; CLI/portable installs often use 8188.
  • MCPBundles Desktop must be running on the same machine so the backend can forward HTTP to localhost.

Workflow shape

ComfyUI executes API prompt JSON: a map of string node ids to [node_class, {inputs}]. Example node classes: CheckpointLoaderSimple, CLIPTextEncode, KSampler, VAEDecode, SaveImage.

Typical flow:

  1. Optionally list checkpoints with the models tool (checkpoints folder).
  2. If no checkpoint is installed, use comfyui_get_manager_status, then comfyui_search_model_catalog to find a catalog entry, then comfyui_install_model with those exact fields (Desktop includes Manager; CLI needs --enable-manager).
  3. Fetch node schemas when unsure of input names (KSampler, etc.).
  4. Queue the graph — response includes prompt_id.
  5. Poll history with that prompt_id until outputs appear.
  6. Fetch images with filename/subfolder/type from history metadata.
  7. Upload datasets or download trained weights with comfyui_put_file / comfyui_get_file (paths under input/, output/, or models/ only).

LoRA training (kohya through ComfyUI)

Kohya sd-scripts runs inside ComfyUI via custom node packs (for example Kijai's ComfyUI-FluxTrainer: InitFluxLoRATraining, FluxTrainLoop, FluxTrainSave). Queue training like any other graph with comfyui_run_workflow — there is no separate kohya MCP server.

Training setup flow:

  1. comfyui_list_custom_nodes with node_classes to confirm training nodes exist.
  2. If missing: comfyui_search_custom_node_catalog, then comfyui_install_custom_node.
  3. comfyui_install_node_requirements for the pack when pip deps are missing.
  4. comfyui_install_model / comfyui_put_file for checkpoint and dataset files.
  5. After a failed or OOM run: comfyui_interrupt if needed, then comfyui_free_memory (set wait_until_vram_free_mb to confirm VRAM dropped). If weights stay resident, comfyui_reboot_comfyui through Manager.
  6. Queue the FluxTrainer workflow, poll history, comfyui_get_file for the .safetensors output.

ComfyUI's built-in TrainLoraNode is a different trainer — not kohya. Prefer FluxTrainer nodes for kohya-style training and memory options such as blocks_to_swap on constrained GPUs.

Agent operations (queue, memory, validation)

Recovery after a failed or OOM run:

  1. comfyui_interrupt — stop the in-progress job.
  2. comfyui_clear_queue — drop pending jobs that would re-run on stale VRAM.
  3. comfyui_free_memory — unload models and clear execution cache on the next idle tick. Optional wait_until_vram_free_mb polls /system_stats until free VRAM rises.
  4. comfyui_reboot_comfyui — hard restart through ComfyUI-Manager when /free is not enough.

Authoring and execution:

  • comfyui_validate_workflow — live check of wires, paths, and registered node classes (complements offline comfyui_index_validate_draft).
  • comfyui_get_workflow_template — starter API prompts for common graphs (wan_t2v_native_1_3b for built-in WAN).
  • comfyui_list_local_files — confirm input datasets and models/ checkpoints on disk.
  • comfyui_wait_for_history — wait until a queued job finishes. Default poll_mode=auto tries WebSocket progress (value/max for ETA) then falls back to HTTP poll (GET /history/{prompt_id} + GET /queue) on keepalive-only streams or WebSocket errors — never fails the turn on stream parse misses. For LoRA training over ~15 minutes use poll_mode=http with timeout_seconds=3600, or loop comfyui_get_queue + comfyui_get_history manually. Returns output_files paths for comfyui_get_file and last_progress when seen.
  • comfyui_install_missing_nodes_for_workflow — Manager install for unregistered node classes.
  • comfyui_get_import_fail_info — diagnose packs that installed but failed to import.

Model install (ComfyUI-Manager)

  • comfyui_search_model_catalog reads the Manager install catalog (/v2/externalmodel/getlist) and returns fields for comfyui_install_model.
  • comfyui_install_model uses the same Manager download queue as the ComfyUI UI — not arbitrary URLs. Returns already_installed when the file is already visible under comfyui_list_models (idempotent).
  • Requires ComfyUI-Manager on the instance (comfyui_get_manager_status first). active_queue_items shows stuck installs; comfyui_reset_manager_queue clears a zombie Manager queue without deleting files.
  • Large checkpoints may still download after the tool returns in_progress; poll with comfyui_get_model_install_status or comfyui_list_models.

Gotchas

  • Local GPU time: Runs on the user's hardware; large graphs can take minutes.
  • No built-in auth: Default ComfyUI binds to localhost only. Do not expose the port to the public internet.
  • History outputs: Image and video fetches need exact paths from history — not guessed. comfyui_wait_for_history returns output_files with comfyui_get_file paths. comfyui_list_local_files zone=output is unreliable for SaveVideo nested folders on Desktop.
  • Long training runs: TrainLoraNode and similar jobs may run 15–60+ minutes with no intermediate history. Use comfyui_wait_for_history with poll_mode=http and a long timeout_seconds, or poll comfyui_get_queue + comfyui_get_history in a loop until the LoRA appears under models/loras/.
  • node_errors: Invalid graphs return structured node_errors from the queue endpoint; fix inputs and retry.
  • Interrupt vs queue: Interrupt stops the current job; it does not clear pending queue items.
  • Interrupt vs free memory: comfyui_free_memory unloads models on the next idle tick; set wait_until_vram_free_mb to confirm VRAM dropped, or comfyui_reboot_comfyui when Flux weights stay loaded.
  • Windows paths: comfyui_validate_workflow and comfyui_run_workflow normalize path strings to the host separator before queueing.
  • Object info size: Full node catalog is huge; request one node_class at a time when building graphs.

Tools in this Server (29)

Comfyui Clear Queue

Clear pending jobs from the local ComfyUI execution queue. Does not stop the currently running workflow — use comfyui_interrupt for that. Pair with co...

Comfyui Free Memory

Release GPU memory on the local ComfyUI instance. Calls ComfyUI POST /free to unload models and clear execution cache on the next idle tick. Use comfy...

Comfyui Get File

Read a file from the local ComfyUI install on the routed desktop machine. Paths must be relative to input/, output/, or models/. Small files return co...

Comfyui Get History

Read ComfyUI execution history and outputs metadata. Pass prompt_id (returned by comfyui_run_workflow) to fetch one job's outputs, node timing, and st...

Comfyui Get Image

Download a generated image from the local ComfyUI server and return it for visual analysis. Pass filename, subfolder, and type exactly as reported in ...

Comfyui Get Import Fail Info

Read ComfyUI-Manager import failure details for custom node packs. Use when a pack is installed but its node classes do not appear in comfyui_get_node...

Comfyui Get Manager Status

Check whether ComfyUI-Manager is available on the local ComfyUI instance and read its download queue state. Use before comfyui_install_model — Desktop...

Comfyui Get Model Install Status

Poll ComfyUI-Manager for an install queued by comfyui_install_model, comfyui_install_custom_node, or comfyui_install_node_requirements. Pass save_path...

Comfyui Get Node Info

Get the input/output schema for one ComfyUI node class. Use when constructing or debugging workflow JSON for comfyui_run_workflow. Pass the internal c...

Comfyui Get Queue

Get ComfyUI's execution queue: jobs currently running and jobs waiting to run. Use comfyui_get_status for version and hardware info; use this when you...

Comfyui Get Status

Check whether ComfyUI is reachable on the user's machine and summarize runtime state. Returns ComfyUI version, Python/PyTorch versions, GPU/VRAM info ...

Comfyui Get Workflow Template

Return a starter ComfyUI API prompt template for common workloads (SDXL txt2img, SDXL LoRA via FluxTrainer nodes, WAN T2V smoke). Use wan_t2v_native_1...

Comfyui Install Custom Node

Install a custom node pack on the local ComfyUI instance via ComfyUI-Manager. Use comfyui_search_custom_node_catalog to discover catalog entries, or p...

Comfyui Install Missing Nodes For Workflow

Detect node classes in a workflow that are not registered on the local ComfyUI instance and queue ComfyUI-Manager installs for matching custom node pa...

Comfyui Install Model

Download a model into the local ComfyUI install via ComfyUI-Manager (same backend as the Manager UI). All fields must match a Manager catalog entry — ...

Comfyui Install Node Requirements

Install or repair Python dependencies for an installed custom node pack via ComfyUI-Manager. Uses the same Manager fix queue as the UI's dependency re...

Comfyui Interrupt

Cancel the workflow ComfyUI is currently executing. Does not remove pending queue items — use only to stop an in-progress generation.

Comfyui List Custom Nodes

List custom node packs installed on the local ComfyUI instance via ComfyUI-Manager. Optionally probe whether specific node classes are registered befo...

Comfyui List Local Files

List files in the local ComfyUI input, output, temp, or models directories. Best for input datasets and models/ checkpoints. After SaveVideo or SaveIm...

Comfyui List Models

List model files available to the local ComfyUI instance for a given folder (checkpoints, loras, vae, etc.). Use the returned filenames when wiring Ch...

Comfyui Put File

Write a file into the local ComfyUI install on the routed desktop machine. Paths must be relative to input/, output/, or models/ — use this to upload ...

Comfyui Reboot Comfyui

Hard-restart the local ComfyUI server through ComfyUI-Manager. Use when comfyui_free_memory cannot reclaim resident VRAM after Flux training or repeat...

Comfyui Reinstall Custom Node

Reinstall a custom node pack via ComfyUI-Manager (uninstall + install). Use when a pack is corrupted or import failures persist after comfyui_install_...

Comfyui Reset Manager Queue

Clear the ComfyUI-Manager install download queue when it is stuck (in_progress_count stays high after files are already on disk). Does not delete mode...

Comfyui Run Workflow

Queue a ComfyUI workflow for execution on the user's local GPU. Pass workflow as the API prompt dict (node id → [class, inputs]). Returns prompt_id an...

Comfyui Search Custom Node Catalog

Search the ComfyUI-Manager custom node catalog on the local ComfyUI instance. Returns node pack metadata for comfyui_install_custom_node. Requires Com...

Comfyui Search Model Catalog

Search the ComfyUI-Manager model install catalog on the local ComfyUI instance. Returns entries with the exact name, type, base, save_path, filename, ...

Comfyui Validate Workflow

Validate a ComfyUI workflow against the live instance: wire references, path shape, and whether each node class is registered. Use before comfyui_run_...

Comfyui Wait For History

Wait until a queued ComfyUI workflow finishes. Default poll_mode=auto tries WebSocket progress (value/max for ETA) then falls back to HTTP poll on kee...

Frequently Asked Questions

What is the ComfyUI MCP server?

Run ComfyUI image and video generation workflows on the user's local machine. Queue API-format workflow graphs, inspect node schemas, list checkpoints, read execution history, and fetch generated images — via MCPBundles Desktop to localhost ComfyUI (Desktop default port 8000). It provides 29 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect ComfyUI to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/comfyui. Authentication is handled automatically.

How many tools does ComfyUI provide?

ComfyUI provides 29 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does ComfyUI require?

ComfyUI uses API Key. ComfyUI requires credentials. Connect via MCPBundles and authentication is handled automatically.

Does this run ComfyUI in the cloud?

No. Workflows execute on your machine through ComfyUI Desktop or a local ComfyUI server. MCPBundles Desktop forwards API calls to localhost.

Which port should I use?

ComfyUI Desktop usually listens on port 8000. Command-line ComfyUI installs often use 8188. Match the port in your MCPBundles connection to the value shown in ComfyUI's server settings.

Setup Instructions

Connect ComfyUI to any MCP client in minutes

MCP URL
https://mcp.mcpbundles.com/bundle/comfyui

One-click install:

The link prefills the Add custom connector dialog — you still review the values and click Add, then Connect to complete OAuth.

Or add manually

  1. Open claude.ai → Settings → Connectors.
  2. Click the + button and choose Add custom connector.
  3. Set Name to ComfyUI and paste the MCP URL into Remote MCP server URL.
  4. Click Add. ComfyUI will appear under Not connected — select it and click Connect to complete OAuth.
Name: ComfyUI
Remote MCP server URL: https://mcp.mcpbundles.com/bundle/comfyui
Authentication: OAuth

Custom connectors at claude.ai require a paid Claude plan (Pro, Max, Team, or Enterprise).

Ready to use ComfyUI?

Sign in to connect your credentials and start running tools from the chat.