MCP server and Claude Code plugin for controlling ComfyUI: it can generate images, execute and inspect workflows, manage models and VRAM, and browse or modify workflows and custom nodes. It works with local, remote, or community cloud ComfyUI setups and exposes many workflow, diagnostics, and process-control tools.
From the registry: MCP server + Claude Code plugin for ComfyUI: run workflows, generate images, manage models & VRAM.
Please install the `comfyui-mcp` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Node.js** — Node.js 22.0.0 or later is required to run the MCP server via npx. (https://nodejs.org/)
- **Install and run ComfyUI** — Install ComfyUI and have it running before using the server. Local mode is the default; remote or cloud modes are also supported via environment variables. (https://github.com/comfyanonymous/ComfyUI)
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","comfyui-mcp"]
- optional environment variables:
- `CIVITAI_API_TOKEN`: CivitAI API token for model downloads. (example: `<your-civitai-api-token>`)
- `COMFYUI_URL`: Full ComfyUI URL to target a specific local or remote ComfyUI instance. Overrides COMFYUI_HOST/COMFYUI_PORT and skips auto-detection. (example: `<your-comfyui-url>`)
- `COMFYUI_HOST`: ComfyUI server host when not using COMFYUI_URL. (example: `<your-comfyui-host>`)
- `COMFYUI_PORT`: ComfyUI server port when not using COMFYUI_URL. (example: `<your-comfyui-port>`)
- `COMFYUI_PATH`: Path to the ComfyUI data directory containing models and related files. Useful when auto-detection fails. (example: `<your-comfyui-path>`)
- `COMFYUI_API_KEY`: Comfy Cloud API key. When set, cloud mode is activated and the server talks to Comfy Cloud instead of a local/remote ComfyUI instance. (example: `<your-comfyui-api-key>`)
- `COMFYUI_CLOUD_URL`: Override the Comfy Cloud endpoint for testing or staging. (example: `<your-comfyui-cloud-url>`)
- `HUGGINGFACE_TOKEN`: HuggingFace token for higher API rate limits or gated model access. (example: `<your-huggingface-token>`)
- `GITHUB_TOKEN`: GitHub token used for skill generation to avoid rate limits. (example: `<your-github-token>`)
- `REGISTRY_ACCESS_TOKEN`: Comfy Registry API key for publish_custom_node functionality. (example: `<your-registry-access-token>`)
- `COMFYUI_DOWNLOAD_CACHE_DIR`: Directory for the content-addressed model download cache. (example: `<your-download-cache-dir>`)
- `COMFYUI_LRU_CACHE_SIZE_GB`: Maximum download cache size in GB. Set to limit cache growth; 0 disables LRU eviction. (example: `<your-cache-size-gb>`)
- `COMFYUI_STARTUP_CHECK_INTERVAL_S`: Readiness probe interval in seconds when starting a local ComfyUI process. (example: `<your-startup-check-interval-seconds>`)
- `COMFYUI_STARTUP_CHECK_MAX_TRIES`: Maximum readiness probe attempts when starting a local ComfyUI process. (example: `<your-startup-check-max-tries>`)
- `COMFYUI_ALWAYS_RESTART`: Whether to auto-restart a crashed local ComfyUI process. (example: `<true-or-false>`)
- `LOG_LEVEL`: Logging verbosity. (example: `<debug-or-info-or-warn-or-error>`)
Note: Default transport is stdio via `npx -y comfyui-mcp`. The server auto-detects ComfyUI installation path and port. It also supports HTTP mode with `--http` or `MCP_TRANSPORT=http`, but the simplest documented canonical config is stdio. In cloud mode, set `COMFYUI_API_KEY`. In remote mode, set `COMFYUI_URL` or pass `--comfyui-url`.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.CIVITAI_API_TOKENrequiredAPI token used in the example config for downloading or accessing Civitai contentCOMFYUI_API_KEYrequiredAPI key for using the community Comfy Cloud modeAI orchestration with hive-mind swarms, neural networks, and 87 MCP tools for enterprise dev.
Persistent codebase knowledge graph. Survives session restarts and context compaction.
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.