# comfyui-mcp [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/artokun/comfyui-mcp  
**GitHub Stars:** 897  
**npm Downloads (last month):** 72615  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/comfyui-mcp-2

## Description
MCP server + Claude Code plugin for ComfyUI: run workflows, generate images, manage models & VRAM.

## Tools
Capabilities this server exposes over MCP:

- **queue** — One action-parameterized tool for the execution queue: `list` (running + pending), `status` (one job by prompt ID), `get_workflow` (a pending job's full payload), `move`/`edit` (requeue a pending job front/back, patched or replaced, with a new prompt ID), `cancel` (interrupt the running job — escal…
- **get_system_stats** — Get system info — GPU, VRAM, Python version, OS
- **visualize_workflow** — One action-parameterized tool for rendering and converting a workflow you pass in: `render` (Mermaid flowchart, nodes grouped by category), `render_hierarchical` (the same graph sectioned — overview, one section in detail, a listing, or an AI-oriented summary), `mermaid` (a Mermaid diagram back to…
- **create_workflow** — One action-parameterized tool for authoring: `create` (from templates: `txt2img`, `img2img`, `upscale`, `inpaint`, `controlnet`, `ip_adapter`, `ace_step_15`, `stable_audio_3`), `modify` (operations: `set_input`, `add_node`, `remove_node`, `connect`, `insert_between`), `validate` (dry-run — missing…
- **get_workflow** — One action-parameterized tool for READING a saved workflow file: `list` (the user library, subfolders included), `get` (one workflow's JSON by filename), `analyze` (a structured summary instead of raw JSON), `query` (filter/traverse/aggregate a big graph without dumping it), `strip` (**de-virtualiz…
- **save_workflow** — One action-parameterized tool for WRITING to the library: `save` (store a workflow — overwrites a same-filename file), `lock` (record a provenance lock: SHA-256 per model, git commit per node pack), `verify_lock` (report drift against that lock)
- **upload_image** — Copy a local image into ComfyUI's `input/` directory for img2img, inpaint, or ControlNet
- **download_model** — Find and fetch model weights, and track the transfers. `action`: `download` (from a URL, into the correct ComfyUI subdirectory), `status`, `cancel`, `search` (HuggingFace), `search_civitai`, `search_creators`, `download_civitai`, `resolve_missing
- **list_local_models** — What is installed, and where ComfyUI looks. `action`: `list` (installed models by type: checkpoints, loras, vae, upscale_models, controlnet, embeddings, clip, unet, diffusion_models, text_encoders), `remove` (**deletes a model file**), `embeddings`, `list_paths`, `add_path`, `remove_path` (the last…
- **clear_vram** — Free GPU VRAM by unloading cached models — calls ComfyUI's `/free` endpoint, reports before/after stats
- **search_custom_nodes** — Search the ComfyUI Registry for node packs by keyword (`action: "search"`), or get one pack's full details (`action: "details"`)
- **comfy_cli** — Search actual loaded node classes through official `comfy nodes search` (action:"search_nodes")
- **kitchen** — See what comfy-kitchen can do on this GPU (`status`), find where a graph leaves it on the table (`assess`), and apply the faster path (`apply`) — a failed probe is unknown, never a no

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "comfyui-mcp": {
    "command": "npx",
    "args": ["-y","comfyui-mcp@latest"]
  }
}
```

## Documentation

## What comfyui-mcp does

comfyui-mcp gives MCP-compatible clients a control layer for ComfyUI. It can create workflows from templates, modify graphs node by node, validate them, submit jobs, inspect queue state, and return workflow or system information. Supported workflow templates include text-to-image, image-to-image, upscaling, inpainting, ControlNet, IP-Adapter, ACE Step 1.5, and Stable Audio 3.

The server also manages the surrounding ComfyUI environment. Agents can inspect installed models and search the ComfyUI Registry for custom-node packs, upload local input images, download model files, adjust model paths, clear cached VRAM, and examine GPU, operating-system, Python, and VRAM details. Workflow files can be listed, analyzed, queried, stripped of virtualized content, saved, and checked against provenance locks.

## How it works

The default launch method uses the npm package through `npx` and communicates over MCP stdio. ComfyUI must be running; the server auto-detects a local installation and its port. The same configuration can target a self-hosted instance on macOS, Linux, or Windows, as well as remote installations reached over a LAN, VPS, RunPod, or reverse proxy.

For remote MCP clients, `--tunnel` switches to authenticated Streamable HTTP, starts a Cloudflare quick tunnel, and prints a URL, token, and connector configuration. Plain HTTP is also available, while authentication can be enabled with an HTTP token. A community cloud mode is available through a ComfyUI API key.

## Setup and configuration

Install ComfyUI from ComfyUI Desktop or from source, then register the server in the MCP client configuration. A minimal stdio entry runs `npx -y comfyui-mcp`; the package does not require cloning the repository. Node.js 22 or newer is required.

The example configuration includes `CIVITAI_API_TOKEN`, which enables authenticated Civitai operations when needed. Cloud deployments use `COMFYUI_API_KEY`, and HTTP authentication can be configured with `COMFYUI_MCP_HTTP_TOKEN`. These settings are only needed for the corresponding features or deployment modes.

The project also ships a Claude Code plugin. Installing it adds commands such as generation, workflow visualization, debugging, batching, format conversion, custom-node installation, and gallery browsing on top of the MCP tools.

## Tools and capabilities

- Queue, inspect, edit, reorder, and cancel ComfyUI jobs.
- Build, modify, validate, render, and convert workflow graphs.
- Read, save, analyze, query, and provenance-lock workflow files.
- Upload input images for image-to-image, inpainting, and ControlNet workflows.
- Search for models through Hugging Face and Civitai, download them, track transfers, and resolve missing files.
- List, remove, and locate local checkpoints, LoRAs, VAEs, ControlNet models, embeddings, CLIP files, UNets, diffusion models, text encoders, and upscalers.
- Search registry custom-node packs and inspect loaded node classes through the Comfy CLI.
- Inspect hardware, clear cached VRAM, and assess or apply `comfy-kitchen` optimization paths.

## Limitations and notes

The primary target is a running self-hosted ComfyUI installation, even though remote and cloud deployment modes are supported. Model removal deletes a model file, so that operation should be used deliberately. The default local stdio setup stays unauthenticated; public HTTP deployments should use the provided token-based authentication. Cloudflare quick-tunnel operation depends on the `cloudflared` executable and a reachable deployment environment.

_Full upstream README: https://allmcps.com/mcp/comfyui-mcp-2/readme_

