Basic information
About Comfyui Mcp Server
MCP server + Claude Code plugin for ComfyUI — execute workflows, generate images, visualize pipelines as Mermaid diagrams, compose/validate workflows, manage and download models, control VRAM, and explore custom nodes. 36 MCP tools. Cross-platform (macOS/Linux/Windows) with auto-
Comfyui Mcp is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by artokun. It exposes 41 tools, including comfy_cli, enqueue_workflow, get_system_stats, visualize_workflow and more. Supported transport: stdio. Runtime: TypeScript. License: MIT. The repository has 896 GitHub stars. Source code is hosted on github.com. Related topics: agent-skills, ai-agent, claude-code, claude-plugin, comfyui.
Setup
{
"mcpServers": {
"comfyui": {
"command": "npx",
"args": [
"-y",
"comfyui-mcp"
]
}
}
}
{
"mcpServers": {
"comfyui": {
"command": "npx",
"args": [
"-y",
"comfyui-mcp"
]
}
}
}
{
"servers": {
"comfyui": {
"command": "npx",
"args": [
"-y",
"comfyui-mcp"
]
}
}
}
Comfyui Mcp config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"comfyui": {
"command": "npx",
"args": [
"-y",
"comfyui-mcp"
]
}
}
}
Comfyui Mcp tools
- comfy_cli — Drive the official comfy-cli (envelope/1 JSON contract) for the selected ComfyUI environment. The MCP resolves `comfy` from COMFY_CLI_PATH, PATH, or the selected workspace's .venv/venv. Driven by the `action` parameter: - action:"status" — Inspect the comfy-cli integration a...
- enqueue_workflow — Submit work to the ComfyUI execution queue — the primary way an agent starts a render. Driven by the `action` parameter: - action:"enqueue" — Submit an API-format workflow you are already holding (one you built with create_workflow, loaded with get_workflow, or edited with...
- get_system_stats — Inspect the connected ComfyUI server: what it is running on, what it has logged, and whether it is healthy enough to dispatch work to. All three actions are READ-ONLY — nothing here mutates anything. Driven by the `action` parameter: - action:"stats" — Get system informati...
- visualize_workflow — DRAW a diagram of, or convert, workflow JSON you PASS IN (a JSON string or object) — it does NOT read the user's live canvas, so for 'show me what's on the canvas' / the CURRENTLY-OPEN graph use panel_graph_outline instead. Driven by the `action` parameter: - action:"render"...
- create_workflow — Author and check ComfyUI workflow JSON. Driven by the `action` parameter: - action:"create" — Create a ready-to-run API-format workflow from a built-in template (txt2img, img2img, upscale, inpaint, controlnet, ip_adapter, ace_step_15, stable_audio_3, remove_background, ltx_v...
- queue — Inspect and manage the ComfyUI execution queue. Driven by the `action` parameter: - action:"list" — The job running now plus all pending jobs, each with its prompt_id and position. Read-only; requires a reachable ComfyUI server (works against local or remote --comfyui-url). ...
- search_custom_nodes — Discover ComfyUI custom node PACKS in the public ComfyUI Registry (registry.comfy.org). Read-only and network-only: queries the hosted registry over HTTP and does NOT require a running ComfyUI or COMFYUI_PATH. This searches node PACKS, not models (use download_model action:"se...
- download_model — Find model weights and get them onto the connected ComfyUI, and track the transfers. Driven by the `action` parameter: - action:"download" — Download a model file to the connected ComfyUI's models directory from a URL (HuggingFace, direct HTTP(S), s3://, or Azure Blob). Requ...
- list_local_models — Inspect what models this ComfyUI has installed, and where it looks for them. Driven by the `action` parameter: - action:"list" — List model files available to the connected ComfyUI, grouped by type. Read-only. Queries ComfyUI's /models REST endpoint first (works with remote ...
- get_history — Read what has already been generated on this machine — execution history, why a run failed, and the settings your past renders actually used. Driven by the `action` parameter: - action:"list" — Execution history for a ComfyUI prompt: status, timing, cached nodes, and outpu...
- runpod — Deploy, start, stop, inspect and connect to RunPod cloud GPU pods, and switch rendering between your local machine and a pod. Driven by the `action` parameter. SPENDS MONEY: action:"create" and action:"start" put a pod into a billing state; action:"stop" ends GPU billing. Conf...
- runpod_watch — Watch a RunPod pod's live status in the control panel, stop watching it, or diagnose why it isn't usable. Driven by the `action` parameter. None of these actions DEPLOYS or resumes a pod — the runpod tool does that. One of them CAN stop one, though: action:"watch" arms the i...
- get_workflow — Return, list, summarize or query a SAVED workflow FILE — files on disk, named from the library or given as a path/JSON — NOT the graph open on the user's canvas (that is panel_graph_outline). Every action here is READ-ONLY; saving and locking are save_workflow. Driven by t...
- save_workflow — WRITE to the ComfyUI user library: persist a workflow, or capture/verify its provenance lock. This is the only tool here that writes — reading is get_workflow. Driven by the `action` parameter: - action:"save" — Save a workflow JSON to the connected ComfyUI server's user l...
- restart_comfyui — Control the lifecycle of the ComfyUI server process. Driven by the `action` parameter: - action:"restart" — Restart ComfyUI: stops the running process (capturing its config), waits for the port to free, relaunches with the same arguments, and polls the API for bounded readin...
- get_image — Fetch, browse and inspect ComfyUI images and registered assets. Driven by the `action` parameter: - action:"get" — Fetch a generated image from ComfyUI by FILENAME and return it as an inline image. Video/audio outputs (e.g. a VHS_VideoCombine .mp4) and allowlisted mesh/mater...
- upload_image — Put a file where ComfyUI (or cloud storage) can read it. Driven by the `action` parameter: - action:"image" — Upload a local image file to the connected ComfyUI's input/ directory via the HTTP /upload/image endpoint so it can be referenced in LoadImage nodes. Works for both ...
- clear_vram — Free GPU VRAM by unloading cached models from ComfyUI. Use this between generation runs with different model families (e.g. switching from SDXL to Flux) or when running low on VRAM. Optionally unload only models or only memory.
- get_defaults — Read and write settings — either OUR generation defaults or ComfyUI's own frontend UI settings. These are two SEPARATE stores and the `action` says which one you mean: - action:"get" — Return the merged view of OUR generation defaults with per-source attribution. Precedenc...
- generate_image — Generate media from a prompt or an existing image — the high-level entry points that build the graph for you. Every action enqueues on the connected ComfyUI and returns the prompt_id immediately; the resulting asset_id arrives in the completion notification. Driven by the `a...
- node_snapshot — Custom-node snapshots via ComfyUI-Manager (mirrors `comfy node save-snapshot` / `restore-snapshot`). Driven by the `action` parameter: - action:"list" — List the snapshots ComfyUI-Manager knows about. No other parameters. Read-only. - action:"save" — Save the current custo...
- bisect — Binary-search (git-bisect style) over installed ComfyUI custom nodes to find which one causes a problem. A state machine driven by the `action` parameter: - action:"start" — Begin a session over all currently-enabled custom nodes. Enables half and disables the rest for the f...
- install_custom_node — Install, repair, enable/disable and remove ComfyUI custom node packs on this ComfyUI. To FIND a pack in the public registry first, use search_custom_nodes. Driven by the `action` parameter: - action:"install" — Install a pack by registry id, git URL, or name. Local installs ...
- report_issue — ARCHIVED — this project is no longer maintained and its issue trackers are closed. This tool files NOTHING and contacts no service: it returns a notice pointing at ComfyUI's official agent and MCP tooling (Comfy Agent / Comfy MCP, by Comfy-Org). Kept registered only so older...
- install_comfyui — Install, update and configure the local ComfyUI installation, its sidebar panel, and this MCP server itself. Driven by the `action` parameter: - action:"install" — Install ComfyUI locally: git-clone it into `target_path`, create a dedicated workspace virtualenv (<target>/.ve...
- model_metadata — Curate a model file's embedded .safetensors metadata (Model Explorer). Driven by the `action` parameter: - action:"read" — Read a model file's CURRENT embedded metadata + evidence, for curating it. Returns classify (asset_type/base/precision/rank), the current model_card and...
- workspace — Inspect and manage ComfyUI workspaces (local installs). Driven by the `action` parameter: - action:"get" — Report the active ComfyUI workspace (mirrors `comfy-cli which`): the local installation path being used (from COMFYUI_PATH or auto-detection), the source of that path, ...
- list_api_nodes — Discover and run hosted partner/API nodes on the connected ComfyUI (e.g. Flux/BFL, Ideogram, Kling, Stability). These call external image/video providers and run server-side, requiring a Comfy account/API key configured on the ComfyUI server — they spend PAID api credits, un...
- node_pack — Author, edit, test and publish YOUR OWN ComfyUI custom-node pack under the custom_nodes/ directory the running ComfyUI actually scans. LOCAL-ONLY: it acts on the local filesystem and is meaningless for a remote --comfyui-url target. Every file-touching action (list_files, read...
- apply_manifest — Apply a ComfyUI setup manifest from an inline object or .json/.yaml/.yml file. Composes custom-node installs and model downloads, installs pip packages, and reports apt entries as skipped (system packages need manual/root installation). LOCAL ComfyUI: model downloads use the c...
- list_packs — Bundled ComfyUI knowledge — installer packs, model-family skills, workflow templates — plus the two workflow-readiness checks. Driven by the `action` parameter: - action:"list" — List the bundled installer packs under packs/: one-command setups for a model family (custom...
- calculate — Evaluate a batch of math expressions exactly — no ComfyUI connection needed, so it works even in cloud mode or when ComfyUI is down. A safe, zero-dependency expression evaluator (no eval): numbers only, no strings/arrays/property access. Handy for the arithmetic agents get w...
- train_prepare_dataset — Stage and curate the training DATASETS a LoRA run consumes — the images and their captions. Datasets are keyed by `name`; the jobs that train on them live in the separate `train_start` tool and are keyed by `id`. Driven by the `action` parameter: - action:"prepare" — Stage...
- train_start — Run and inspect LoRA training JOBS — launch a run, poll it, stop it, delete it, and read back the settings behind it. Jobs are keyed by `id`; the datasets they train on live in the separate `train_prepare_dataset` tool and are keyed by `name`. Driven by the `action` paramete...
- train_doctor — Preflight and set up the TRAINER ITSELF — the docker/GPU/venv machinery every training job needs. Touches no dataset and no job. Driven by the `action` parameter: - action:"doctor" — Preflight the local trainer: docker daemon reachable, `--gpus all` GPU passthrough working...
- apps — Micro-apps on this ComfyUI (panel Apps feature): named workflows packaged for one-click runs. Driven by the `action` parameter: - action:"list" — List every registered app. Each entry is the app's manifest: id, name, description, appMode {inputs, outputs}, deps, hideWorkflow...
- batch — Run MANY ComfyUI workflows under one durable batch_id. Driven by the `action` parameter: - action:"submit" — Enqueue a batch. Provide EITHER `workflows` (array of API-format workflows) OR one `workflow` plus a `sweep` (array of flat input-override sets — each set produces ...
- kitchen — See what comfy-kitchen can do on this GPU, find where a graph is leaving it on the table, and apply the faster path. Driven by `action`: - action:"status" — kitchen version, backends (hip/cuda/triton/eager), INT8 attention, GPU fp8/NVFP4/MXFP8, launch flags (--use-ck-attenti...
- list_tools — List every comfyui-mcp capability as a token-light catalog: tool names with one-line summaries, grouped by category. Start here. Then use describe_tool to get a tool's parameters and call_tool to run it.
- describe_tool — Get the full description and JSON Schema of one tool from the catalog. Always call this before the first call_tool of a tool you haven't used in this session.
- call_tool — Execute a tool from the catalog by name. Pass its parameters in `args` (object). The result is exactly what the underlying tool returns.
Overview
What is Comfyui Mcp?
Comfyui Mcp is an MCP server and Claude Code plugin for ComfyUI that lets you execute workflows, generate images, visualize pipelines, manage models, control VRAM, and explore custom nodes directly from an AI coding assistant. It auto‑detects your ComfyUI installation and port, works on macOS, Linux, and Windows, and requires Node.js ≥ 22.0.0.
How to use Comfyui Mcp?
Add the MCP server to your Claude Code config (~/.claude/settings.json) with the command npx -y comfyui-mcp (optional CIVITAI_API_TOKEN environment variable). With ComfyUI running, ask Claude to generate an image – it will find or download a checkpoint, build a workflow, execute it, and return the image. You can also install the Claude Code plugin with claude plugin install comfyui-mcp to access slash commands, skills, agents, and hooks.
Key features of Comfyui Mcp
- 80+ MCP tools covering generation, workflow execution, model management, and diagnostics
- 10 slash commands:
/comfy:gen,/comfy:viz,/comfy:debug,/comfy:batch, and more - 6 built‑in knowledge skills for prompt engineering, troubleshooting, model compatibility
- 3 autonomous agents: explorer, debugger, and optimizer
- 3 hooks including VRAM watchdog and job completion notifications
- Local generation tracker with SQLite database for statistics and settings suggestions
Use cases of Comfyui Mcp
- Generate images from natural language prompts with automatic workflow building
- Visualize and debug ComfyUI workflows directly in the chat interface
- Manage models: search, download, and list checkpoints, LoRAs, VAEs, etc.
- Perform batch parameter sweeps across cfg, sampler, steps, and seed
- Diagnose workflow failures with autonomous debugger agent
Frequently asked questions
1 What scope does Comfyui Mcp support?
It supports local and remote ComfyUI installations (Mac/Linux/Windows, RunPod, VPS, LAN). For Comfy Cloud, a community cloud‑mode is available by setting COMFYUI_API_KEY, but the primary target is self‑hosted instances.
2 What are the runtime requirements?
Node.js ≥ 22.0.0 and a running ComfyUI instance (local or remote). The server auto‑detects the ComfyUI port if installed locally.
3 Where does generation history data live?
Every enqueue_workflow call logs settings to a local SQLite database (generations.db). You can view stats with npm run generations:stats.
4 How do I manage VRAM and ComfyUI processes?
Tools include clear_vram (calls ComfyUI's /free endpoint), stop_comfyui, start_comfyui, and restart_comfyui – all with hooks that warn before stopping if there are unsaved changes.
5 What transport and authentication does Comfyui Mcp use?
It runs as a standalone MCP server over stdio (launched via npx). No built‑in authentication is required; an optional CIVITAI_API_TOKEN can be set for model search/download from Civitai.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In