Comfyui

Design and media

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

Your AI app calls the Comfyui MCP server, which does the design and media work and sends the result back to the chat.

About Comfyui

Comfyui is a community MCP server from artokun, filed in our directory under design and media. MCP server + Claude Code plugin for ComfyUI: run workflows, generate images, manage models & VRAM.

Comfyui runs on your own machine: your AI app starts it with the command npx -y comfyui-mcp@0.52.206 and talks to it over standard input and output.

Comfyui is listed in the official MCP registry as io.github.artokun/comfyui-mcp, version 0.52.206.

At a glance

Publisher
artokun (community)
Runs
Locally on your machine
Install from
Node.js package on npm: comfyui-mcp
Written in
TypeScript
License
MIT
GitHub stars
975
Official MCP registry
io.github.artokun/comfyui-mcp

How to set up Comfyui

  1. Install Node.js on the machine that runs your AI app, because Comfyui starts with npx and downloads its package on first run.
  2. Check the Comfyui README for keys or settings; the registry lists none that Comfyui requires.
  3. Add Comfyui to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Comfyui tools to confirm the connection.
  5. Run one read-only task with Comfyui first, and keep your app asking before each tool call until the results look right.

Comfyui compared with similar servers

  • After Effects by Dakkshin has fewer GitHub stars than Comfyui (972 against 975); both are community servers, and both run locally.
  • Adobe Premiere Pro by hetpatel-11 has more GitHub stars than Comfyui (976 against 975); both are community servers, and both run locally.
  • StyleKit by AnxForever has fewer GitHub stars than Comfyui (944 against 975); both are community servers, and StyleKit runs as a remote server and Comfyui runs on your own machine.

Before you connect Comfyui

  • Give Comfyui its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Comfyui tool call until you trust what it does with them.
  • Treat text that Comfyui fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Comfyui on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Comfyui

How marketing and sales teams put Comfyui to work, by company size. Pick the size closest to yours and start Comfyui on one use case.

Small business

  • A small business can use Comfyui to resize and adapt one design for every channel instead of hiring for each version.
  • Owners can ask Comfyui to pull brand assets and make quick ad and social variations that still look on brand.
  • Comfyui runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Creative teams can connect Comfyui so agents produce variants for testing while designers keep control of the master files.
  • Marketing teams can use Comfyui to hand off designs to web and ads with specs attached, cutting review rounds.
  • Start Comfyui on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can use Comfyui with brand rules and approved assets only, so generated work stays inside the brand system.
  • Large creative ops teams can use Comfyui to localize and version assets for many markets with review built in.
  • Comfyui is a community server, so have security review the code and pin a version before Comfyui touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Comfyui README

From artokun/comfyui-mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

comfyui-mcp, drive ComfyUI with ANY LLM

The Agent panel driving ComfyUI end to end, sped up. It reads what is installed locally, wires the graph, frees VRAM, and runs the render.
Watch the full 76s demo →

The local-first, agent-native control plane for ComfyUI. An MCP server plus a live sidebar agent that generates images, video and audio, authors and runs workflows, manages models and custom nodes, and edits your live ComfyUI graph in natural language. Bring whatever model you have: Claude or ChatGPT on your subscription, Gemini on your Google login, a free local model via Ollama (fully offline), or any hosted model over one API key (DeepSeek, GLM, MiMo, Kimi, GPT, Claude via OpenRouter). The tools and the panel are the same on every tier, and the built-in LLM Arena scores each model on real ComfyUI tasks so you know what yours can do. One config targets local installs, LAN, VPS, or Comfy Cloud.

One-click GPU pod. A ready-to-run ComfyUI with this project + Agent Panel + ComfyUI-Manager v2 preinstalled, on your own GPU. No setup.

Works on macOS, Linux, and Windows. Auto-detects your ComfyUI installation and port.

Stuck or have a question? Join the Discord for help, model tips, and release announcements.

38 MCP tools | 42 AI skills (Flux · WAN · LTX 2.3 video · MiniMax H3 · Qwen · Z-Image · Ideogram 4 · ERNIE · ANIMA · model registry · Civitai · node authoring · launch/perf flags) | 56 installer packs | 11 slash commands | 4 autonomous agents | 3 hooks

The plugin ships skills that grow with every release: model-specific generation guides with curated download URLs, workflow recipes, troubleshooting, and custom-node authoring. With them, Claude knows the right sampler, CFG, resolution, and model files for each architecture without trial and error.

Now available: the ComfyUI Agent Panel on ComfyUI-Manager & the Comfy Registry

An autonomous AI agent in your ComfyUI sidebar, running on Claude, ChatGPT, Gemini, or ANY local/hosted LLM (Ollama and every OpenAI-compatible endpoint). Subscriptions work with no API key; local models work with no account at all. Pick a provider and it drives your live graph: edits, spatial layout, one-shot workflow/pack loads, rewind/rollback, a pending-message tray, activity cards, multi-tab. It asks before spending paid API credits. Search comfyui-agent-panel in ComfyUI-Manager to install. comfyui-mcp.artokun.io/docs/panel

Full documentation: comfyui-mcp.artokun.io/docs

Quick Start

1. Install ComfyUI (if you haven't already): ComfyUI Desktop or from source

2. Add the MCP server to your Claude Code config (~/.claude/settings.json):

{
  "mcpServers": {
    "comfyui": {
      "command": "npx",
      "args": ["-y", "comfyui-mcp"],
      "env": {
        "CIVITAI_API_TOKEN": ""
      }
    }
  }
}

3. Start using it. With ComfyUI running, ask Claude to generate an image:

> Generate an image of a sunset over mountains

Claude will find (or download) a checkpoint, build a workflow, execute it, and return the image.

Note: This runs as a standalone MCP server, so there is no need to clone this repo. npx downloads and runs it.

Scope: local, remote, or Comfy Cloud

comfyui-mcp is local-first. A self-hosted ComfyUI on Mac/Linux/Windows is the primary target, and the same agent reaches remote installs (RunPod, VPS, LAN, reverse-proxied) from one config. Local-first, not local-only.

More than a bridge. Most ComfyUI MCP servers are thin connectors. They forward a prompt and hand back an image. comfyui-mcp is a full control plane. It authors and edits the graph node by node, runs and iterates on workflows, manages models and custom nodes, and ships model-specific expertise (samplers, CFG, resolutions, curated model URLs) so the agent gets it right without trial and error. If you want a minimal local relay, a lightweight server is fine. If you want an agent that operates ComfyUI, that's this project.

For Comfy Cloud users, Comfy-Org ships its own agent tooling: Comfy Cloud MCP (public beta, hosted on Comfy Cloud GPUs), the Comfy In-App Agent (private alpha, inside Comfy Cloud), and a first-party Comfy Local MCP (private test, not publicly available yet), all maintained by the Comfy team. If you don't have a GPU or you want zero setup, that's the better path; go use it.

Where this project differs is that it runs on your install and your choice of model, including a free local one via Ollama with no account and no network at all. comfyui-mcp also includes a community cloud mode (set COMFYUI_API_KEY, see Deployment modes) so a single MCP can target all three deployment shapes from one config.

Local vs. Comfy Cloud agent is a side-by-side comparison, including when Comfy Cloud is the right answer. (Statuses above are as of July 2026. Comfy-Org ships fast, so check their docs for the current state.)

Remote / hosted connector (one command)

To use comfyui-mcp from Claude Desktop's Custom Connectors or any remote client, like Comfy's own cloud.comfy.org/mcp connector, run it as an authenticated, publicly reachable Streamable-HTTP server with one flag:

npx -y comfyui-mcp@latest --tunnel

This forces the HTTP transport, generates an auth token, opens a cloudflared quick tunnel, and prints a ready-to-paste https://…/mcp URL + token + Claude Desktop connector snippet. Auth accepts Authorization: Bearer <token> or X-API-Key: <token> (matching Comfy Cloud's convention). See the Remote / hosted connector guide for the full walkthrough and headless usage.

Auth is opt-in. With no COMFYUI_MCP_HTTP_TOKEN set and no --tunnel, the default stdio (and plain --http on loopback) behavior is unchanged. It stays open and local. OAuth (Comfy's browser sign-in flow) is a planned follow-up.

Claude Code Plugin

This package also ships as a Claude Code plugin that adds slash commands, skills, agents, and hooks on top of the MCP tools.

Install as a plugin
# In Claude Code
/plugin marketplace add artokun/comfyui-mcp
/plugin install comfy
Slash commands
Command Description
/comfy:gen <prompt> Generate an image from a text description, auto-selects checkpoint, builds workflow, returns image
/comfy:viz <workflow> Visualize a workflow as a Mermaid diagram with nodes grouped by category
/comfy:node-skill <pack> Generate a Claude skill for a custom node pack from Registry ID or GitHub URL
/comfy:debug [prompt_id] Diagnose why a workflow failed, reads history, logs, traces root cause, suggests fixes
/comfy:batch <prompt, params> Parameter sweep generation across cfg, sampler, steps, seed, etc.
/comfy:convert <file> Convert between UI format and API format workflows
/comfy:install <pack> Install a custom node pack, git clone, pip install, optional restart
/comfy:gallery [filter] Browse generated outputs with metadata, filter by date, count, or filename
/comfy:compare <a vs b> Diff two workflows side by side, shows added/removed nodes and changed parameters
/comfy:recipe <name> <prompt> Multi-step recipes: portrait, hires-fix, style-transfer, product-shot
Built-in skills

42 skills total: model-family guides (Flux, WAN, LTX 2.3, MiniMax H3, Qwen, Z-Image, Ideogram 4, ERNIE, ANIMA + anime / WAN / Z-Image LoRA training), the model-registry (curated download URLs), the civitai pairing skill, node authoring, the launch/performance-flags matrix, and the core four below. Full list on the plugin docs page.

Installer packs. packs/ bundles 13 one-command ComfyUI setups: ANIMA, Ideogram 4, LTX-2.3, ERNIE, WAN (animate / longer-videos / transparent), Qwen (image / image-edit), Z-Image (turbo / base / xy-plot) and artokun-flow (WAN Animate: replace / animate). Each is a manifest of custom nodes + model URLs + workflow that drives both apply_manifest and generated install-windows.bat / install-runpod.sh, with CI that validates every model link + payload size. See packs/README.md.

Skill Description
comfyui-core Workflow format, node types, data flow patterns, pipeline architecture, MCP tool usage guide
prompt-engineering CLIP weight syntax (word:1.3), BREAK tokens, embeddings, model-specific prompting for SD1.5/SDXL/Flux/SD3
troubleshooting Common error catalog, OOM, dtype mismatches, missing nodes, NaN tensors, black images, CUDA errors, with VRAM estimates per model
model-compatibility Compatibility matrix, loaders, resolutions, CFG, samplers, ControlNets, LoRAs, and VAEs per model family (SD1.5/SDXL/Turbo/Lightning/Flux/SD3/LTXV)
Agents
Agent Model Description
comfy-explorer Sonnet Researches custom node packs, reads docs, queries /object_info, generates skill files
comfy-debugger Sonnet Autonomously diagnoses workflow failures, gathers logs + history, identifies failing node, checks models + custom nodes, proposes and optionally applies fixes
comfy-optimizer Sonnet Analyzes workflows for performance, detects redundant nodes, VRAM waste, wrong CFG/steps for model family, precision issues, suggests optimizations
comfy-researcher Sonnet Discovers and ranks ComfyUI custom node packs for a stated image-generation problem
Hooks
Event Trigger Action
PreToolUse enqueue_workflow VRAM watchdog, checks GPU memory via /system_stats and warns if < 1GB free before execution
PreToolUse restart_comfyui (actions stop/restart) Save warning, prompts user to save unsaved workflow changes before stopping ComfyUI
PostToolUse Any comfyui tool Job completion notify, checks for completed jobs and injects completion summaries into the conversation
Background Scripts
Script Description
monitor-progress.mjs Progress monitor, connects to ComfyUI's WebSocket for real-time step progress (e.g., step 5/14 (36%)). Run as a background Bash task after enqueuing workflows. Reports completion with output filenames, errors with node details. Replaces polling queue (action:"status") in a loop.

Panel agent (Claude · ChatGPT · Gemini · any local/hosted LLM)

Beyond the headless MCP server, this package ships the panel orchestrator that powers the ComfyUI Agent Panel, an autonomous agent embedded in ComfyUI's sidebar that drives the live canvas. It runs in the background on your own subscription (Claude or ChatGPT), started on demand by the panel's Connect button:

npx -y comfyui-mcp@latest connect
Drive a REMOTE ComfyUI from your own machine (connect)

When ComfyUI runs somewhere with no Node or agent (a RunPod pod, a cloud box) you can still run the agent on your machine and drive that remote ComfyUI. There is no agent login on the box and nothing to install or configure remotely:

npx -y comfyui-mcp@latest connect https://abcd1234-3000.proxy.runpod.net

This is sugar for --panel-orchestrator with COMFYUI_URL set from the URL. The orchestrator runs locally on your Claude/ChatGPT login and reaches the remote ComfyUI over its public proxy URL. For a remote HTTPS pod, connect opens a token-gated wss:// tunnel (via Cloudflare) to the local agent bridge and hands the pod's panel that URL, so the pod's HTTPS page reaches your machine with no browser prompt, in any browser. A secure page can't open a plain ws:// socket to your box because of mixed-content and Private Network Access rules. A local ComfyUI uses the plain ws://127.0.0.1:9199 loopback bridge. Add --insecure-bridge to force that loopback for a remote pod, then arrange your own path to it, e.g. an SSH port-forward. Either way the panel JS runs in your local browser, and the agent and your login run only on your machine, so nothing is installed remotely.

To finish, with connect still running on your machine, open the remote ComfyUI in your browser and click Connect in the Agent panel. The panel is a pure-frontend extension. It links to the bridge your connect process is already serving, rather than asking the ComfyUI host to spawn an orchestrator it cannot run.

Multi-provider, full parity. The orchestrator depends on a provider-neutral AgentBackend port (dependency injection), with two adapters:

  • ClaudeBackend wraps the Claude Agent SDK (@anthropic-ai/claude-agent-sdk), a persistent streaming session over the claude.ai subscription (OAuth, no key).
  • CodexBackend wraps OpenAI Codex over the codex app-server JSON-RPC protocol (@openai/codex), on the ChatGPT subscription (codex login, no key).

Further adapters follow the same port: Gemini CLI (ACP), Antigravity (agy, the Google AI Pro/Ultra subscription path; install from antigravity.google and run agy once to sign in), Grok, Kimi, GLM, Ollama/LM Studio/llama.cpp (local), OpenRouter, and any OpenAI-compatible endpoint. See docs/backends for the full matrix.

Both are optional dependencies, and the panel picks a provider, not a port. Each backend runs its own orchestrator on its own loopback bridge port. A capability matrix tells the panel which features each backend supports (e.g. conversation-rollback is Claude-only today, since the Codex app-server resumes whole threads only).

The live-canvas tools and model knowledge are identical across providers. The panel_* tool definitions live in one shared list, registered onto both the in-process Claude SDK MCP server and a @modelcontextprotocol/sdk server over a loopback streamable-HTTP MCP that the orchestrator hosts for Codex (which can only host config-declared MCP servers). The headless comfyui MCP is likewise injected into both, in-process for Claude and declared via codex app-server -c mcp_servers for ChatGPT, so generation, models, and workflow tools are the same everywhere.

New tools that give every backend the same expertise and a cost guardrail:

Tool Description
list_packs (action: "skill_list" / "skill_read") Discover and read bundled model-family + workflow skills, the knowledge Claude loads natively, exposed to any MCP client (e.g. the Codex backend)
list_packs (action: "list" / "read_workflow") List one-command installer packs (custom nodes + weights + ready workflow; all local-GPU / free) and read a pack's graph
list_packs (action: "list_templates") List the connected ComfyUI's custom-node-contributed workflow templates
list_packs (action: "check_runtime") Classify a workflow as local (your GPU, free) or api / mixed / unknown (hosted API nodes = paid credits) so the agent asks before spending paid API credits
list_packs (action: "extract_deps" / "install_deps") Work out which custom node packs a workflow needs, and install the missing ones through ComfyUI-Manager
panel_load_workflow (panel tool) Load a full workflow onto the live canvas in one shot, by bundled pack name (read server-side, never shuttled through chat) or by graph JSON
panel_strip_workflow / panel_slice_workflow (panel tools) De-virtualize a tangled graph (Get/Set buses, Reroutes, subgraphs, bypass → real connections) or carve one rgthree-toggled pipeline out of a monolith, by pack, server-side path, or inline graph; for understanding/rebuilding expert workflows without hand-tracing

MCP Tools

38 tools across workflow execution, generation, iteration, composition, models, and more:

Image Generation (high-level)
Tool Description
generate_image action: "image" Generate from a text prompt, builds a txt2img workflow, fills unspecified params from your defaults, auto-selects a checkpoint
generate_image action: "controlnet" Generate conditioned by a ControlNet image (pose/depth/canny/normal) + prompt
generate_image action: "ip_adapter" Generate guided by a reference image's style/subject via IP-Adapter (needs ComfyUI_IPAdapter_plus)
generate_image action: "video" / "3d" Generate a short video clip (LTX-2.3, local GPU) or a 3D model (hosted partner API nodes) from the same one-line entry point
generate_image action: "upscale" Post-process an uploaded or staged image with ESRGAN super-resolution
generate_image (action:"remove_background") Post-process an uploaded or staged image into a transparent BiRefNet cutout
Audio Generation (high-level)
Tool Description
generate_image action: "audio" Generate audio from a text prompt, supports ACE Step 1.5 (music with lyrics/structure) and Stable Audio 3 (music, instruments, SFX); auto-selects local models
Assets & Iteration
Tool Description
get_image (action:"view") Return a generated asset's bytes as an inline image so the agent can see the result
get_image (action:"analyze_color") Palette / contrast / color statistics for a generated image (dominant colors, average + luminance stats, contrast checks) so the agent can reason about color without a vision round-trip
generate_image (action:"regenerate") Re-run the workflow that produced an asset_id, with optional parameter overrides
get_image (action:"list_assets") Browse recently generated assets (newest-first) by asset_id
get_image (action:"asset_metadata") Full provenance for an asset, including the originating workflow
Defaults
Tool Description
get_defaults action:"get" Show merged generation defaults with per-source attribution
get_defaults action:"set" Update runtime defaults; persist: true writes the config file
get_defaults action:"get_ui" / action:"set_ui" Read/write ComfyUI's OWN frontend UI settings (the Comfy.* ids), a separate store from the generation defaults above
Workflow Execution
Tool Description
enqueue_workflow action: "enqueue" Submit a workflow (API format JSON), returns prompt_id immediately, non-blocking
enqueue_workflow action: "rerun" / "run_url" / "template_schema" Re-run a past generation, or read/run a shared workflow from a URL, or inspect a bundled template's overridable slots
enqueue_workflow (action:"run_template") One-shot: resolve a bundled pack's expert graph, apply <nodeId>.<widget> overrides, and enqueue it
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, escalates interrupt → verify → /free, reports WEDGED if it won't die; clear_pending: true also drops all pending), cancel_queued, clear
get_system_stats Get system info, GPU, VRAM, Python version, OS
Workflow Visualization
Tool Description
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 executable workflow JSON), to_dsl/from_dsl (the compact, losslessly round-tripping authoring DSL)
Workflow Composition
Tool Description
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 nodes, broken connections, invalid output indices, missing model files), node_info (query available node types from ComfyUI's /object_info endpoint)
Workflow Library
Tool Description
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-virtualize any workflow from an absolute path, library filename, or inline graph, resolve GetNode/SetNode buses, Reroutes, subgraph defs, and bypassed nodes into real connections and return the flat graph; reads ANY path server-side, so it loads ad-hoc/expert workflows the cached library can't), slice (un-chunk a toggle-template monolith, one rgthree Fast-Groups-Bypass-toggled pipeline out into a standalone activated graph; pair with strip to then flatten the buses), from_image (the workflow ComfyUI embedded in a PNG), prompt_director (Prompt Director's sanitized runtime state)
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)
Image Management
Tool Description
upload_image Copy a local image into ComfyUI's input/ directory for img2img, inpaint, or ControlNet
get_image (action:"list_outputs") Browse recently generated images and videos from the output directory, sorted newest-first, recurses into subfolders (e.g. SaveVideo's output/video/…) and returns each result's subfolder
Model Management
Tool Description
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 three view/edit the extra search-path YAML)
Memory Management
Tool Description
clear_vram Free GPU VRAM by unloading cached models, calls ComfyUI's /free endpoint, reports before/after stats
Registry & Discovery
Tool Description
search_custom_nodes Search the ComfyUI Registry for node packs by keyword (action: "search"), or get one pack's full details (action: "details")
list_packs (action: "generate_skill") Generate a Claude skill .md file from a Registry ID or GitHub URL
comfy_cli Search actual loaded node classes through official comfy nodes search (action:"search_nodes")
Official comfy-cli

Install comfy-cli 1.11.1 or newer to enable the official JSON-backed tools. The MCP resolves comfy from COMFY_CLI_PATH, PATH, or the selected workspace's .venv/venv. Local custom-node operations prefer comfy node when a supported CLI is available and otherwise fall back to Manager HTTP; remote targets keep using Manager HTTP.

Tool Description
comfy_cli One action-parameterized tool for the whole official CLI: status, server_start/server_stop/server_restart, jobs_list/jobs_status/jobs_wait/jobs_watch/jobs_cancel, search_nodes, workflow_validate/workflow_run, transfer_upload/transfer_download, models_* (list/search/show/download/remove), skills_* (list/show/validate/install/status/uninstall)
Diagnostics
Tool Description
get_system_stats (action:"logs") Get ComfyUI server logs with optional keyword filter (e.g., error, warning, a node name)
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
get_history action: "list" Get execution history with full error details, Python tracebacks, timing, and cached node info
get_history action: "diagnose" Explain a FAILED run in one call, the failed node and traceback PLUS the missing models (file + widget) and missing node types
Process Control
Tool Description
restart_comfyui action:"restart" Stop and restart ComfyUI, preserving all launch arguments
restart_comfyui action:"stop" Stop the running ComfyUI process (saves PID and launch args for restart; on Windows, action:"start" cannot bring it back)
restart_comfyui action:"start" Start ComfyUI using info saved from a previous stop (macOS/Linux; refused on Windows)
restart_comfyui action:"status" Read-only: what start/stop/restart would do now, and whether a stop could be undone by this tool. Call it before stop
Generation Tracker
Tool Description
get_history action: "suggest" Suggest proven sampler/scheduler/steps/CFG settings from local generation history, query by model family, LoRA hash, or text search
get_history action: "stats" Show local generation tracking statistics, total runs, unique combos, breakdown by model family

Every enqueue_workflow call logs settings to a local SQLite database (generations.db). Repeated settings combos get a reuse_count bump instead of a duplicate row, so the count works as a popularity signal. The tracker identifies models and LoRAs by content hash (AutoV2 / SHA256), not filename, so renamed files still group together.

# View local stats from the CLI
npm run generations:stats

Examples

Generate an image
> /comfy:gen a cyberpunk city at night with neon lights

Claude will:

  1. Check installed checkpoints (download one if needed)
  2. Build a txt2img workflow with your prompt
  3. Execute it on ComfyUI
  4. Return the generated image
Visualize a workflow
> /comfy:viz ~/workflows/my-workflow.json

Produces a Mermaid diagram with nodes grouped by category:

flowchart LR
  subgraph Loaders
    1["CheckpointLoaderSimple"]
  end
  subgraph Conditioning
    2(["Positive Prompt"])
    3(["Negative Prompt"])
  end
  subgraph Sampling
    5{{"KSampler<br/>steps:20 cfg:8"}}
  end
  1 -->|MODEL| 5
  2 -->|CONDITIONING| 5
  3 -->|CONDITIONING| 5
Debug a failed workflow
> /comfy:debug

Reads the last execution history and logs, identifies the failing node, checks for missing models or node packs, and suggests a fix.

> /comfy:debug abc123-def456

Diagnose a specific execution by prompt ID.

Parameter sweep
> /comfy:batch a cat in a field, cfg:5-10:2, sampler:euler,dpmpp_2m

Generates a grid of images across all parameter combinations and presents a summary table with results.

Supported sweep parameters: cfg, steps, sampler, scheduler, seed, denoise, width, height.

Multi-step recipes
> /comfy:recipe hires-fix a dramatic fantasy landscape with castles

Runs two passes: txt2img at 512x768, then an img2img upscale to 1024x1536 that adds detail.

Available recipes:

Recipe Description
portrait Generate at 1024x1024, then 2x upscale to 2048x2048
hires-fix Low-res generation → img2img upscale with denoise 0.4-0.5
style-transfer Apply a style prompt to an existing image via img2img
product-shot Product image with clean white background
Convert workflow format
> /comfy:convert ~/workflows/my-ui-workflow.json

Converts between ComfyUI's UI format (nodes + links arrays) and API format (node IDs → {class_type, inputs}).

Install a custom node pack
> /comfy:install comfyui-impact-pack

Searches the registry, shows details, clones the repo to custom_nodes/, installs dependencies, and offers to restart ComfyUI.

Browse output gallery
> /comfy:gallery last 5
> /comfy:gallery today

Lists recent outputs with their embedded metadata: checkpoint, prompt, seed, steps, CFG, and sampler for each image.

Compare workflows
> /comfy:compare workflow-a.json vs workflow-b.json

Shows added/removed nodes, changed parameters (old → new values), and optional Mermaid diagrams for visual comparison.

Validate before running
> Validate this workflow before I run it

Checks for missing node types, broken connections, invalid output indices, and missing model files without executing the workflow.

Manage models
> What checkpoints do I have installed?
> Search HuggingFace for SDXL turbo models
> Download this model to my checkpoints folder
Manage VRAM
> Free my VRAM
> What embeddings do I have?
Extract workflow from an image
> Extract the workflow from this image: ~/outputs/ComfyUI_00042_.png

Reads the PNG metadata chunks to recover the exact workflow and prompt used to generate the image.

Explore custom nodes
> /comfy:node-skill comfyui-impact-pack

Generates a skill file documenting every node, its inputs/outputs, and usage patterns.

Process control
> Restart ComfyUI
> Stop ComfyUI
> Start ComfyUI back up

Configuration

The server auto-detects your ComfyUI installation and port. Override with environment variables if needed.

Where to put keys and overrides:

  • Panel users. Use the API Keys card (▾ menu next to "connected"). Keys are stored in ~/.comfyui-mcp/panel-secrets.json and take effect without a restart.
  • MCP-only setups (Claude Desktop, Claude Code, etc.). Use the env block of your MCP client config, as shown in the setup examples above.
  • Real environment variables always take precedence over stored keys. For development, the server also loads ~/.comfyui-mcp/.env as an override file; regular installs shouldn't need it.

Read the rest of the Comfyui README on GitHub

Questions about Comfyui

What is the Comfyui MCP server?

MCP server + Claude Code plugin for ComfyUI: run workflows, generate images, manage models & VRAM. Comfyui is maintained by artokun on GitHub at artokun/comfyui-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Comfyui MCP server?

Add Comfyui to your AI app's MCP config with the command npx -y comfyui-mcp@0.52.206. In Claude Code, run claude mcp add --transport stdio comfyui -- npx -y comfyui-mcp@0.52.206. To run Comfyui this way you need Node.js installed.

Does Comfyui need an API key?

The registry lists no required keys for Comfyui. Check the Comfyui README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Comfyui an official MCP server?

No. Comfyui is a community server maintained by artokun. Community servers can be excellent; read the code and the open issues before you give Comfyui access to company data.

What license is Comfyui under?

Comfyui is released under the MIT license, according to its GitHub repository. The license covers the code of Comfyui; the service it connects to has its own terms.