ComfyUI Builder — Claude Code MCP server: what it does, how to install
ComfyUI Builder is a Claude Code MCP server that generates and runs ComfyUI workflows through chat. It streams step progress over WebSockets without manual JSON editing.
MIT ★ 5 updated 2026-10-30
claude mcp add --env COMFYUI_HOST=<COMFYUI_HOST> --env COMFYUI_PATH=<COMFYUI_PATH> --env COMFYUI_KNOWLEDGE_DIR=<COMFYUI_KNOWLEDGE_DIR> --transport stdio comfyui-builder -- npx -y mcp-comfy-ui-builderWhat ComfyUI Builder does
The server constructs image synthesis workflows, validates slot compatibility, and queues jobs directly in ComfyUI. It ships with a local base of 62 core nodes alongside presets for txt2img, Flux, img2img, and upscaling. Live execution reports render progress node by node.
Hardware headroom checks run via get_system_resources before queueing heavy batches. Querying available VRAM prevents out-of-memory crashes on oversized canvases. The toolset also inspects the task queue, downloads rendered outputs, and synchronizes node catalogs.
Running the server requires Node.js 18+ and an active ComfyUI instance. Execution tools fail without COMFYUI_HOST pointing to the web service, while node and model management tools demand COMFYUI_PATH.
What it helps with
- construct image generation graphs without writing workflow JSON files
- validate slot connections and compatibility across custom nodes
- stream sub-second step rendering progress directly over WebSocket
- inspect system VRAM to adjust output resolution before execution
Example prompts for the agent
- Create a txt2img workflow with Flux and start rendering the prompt
- Check available GPU memory before launching this upscale pipeline
- Sync all installed custom nodes from my local ComfyUI into the knowledge base
How to install ComfyUI Builder
Platform CLI
claude mcp add --env COMFYUI_HOST=<COMFYUI_HOST> --env COMFYUI_PATH=<COMFYUI_PATH> --env COMFYUI_KNOWLEDGE_DIR=<COMFYUI_KNOWLEDGE_DIR> --transport stdio comfyui-builder -- npx -y mcp-comfy-ui-builderReplace <…> with your own values
Platform CLI
codex mcp add comfyui-builder --env COMFYUI_HOST=<COMFYUI_HOST> --env COMFYUI_PATH=<COMFYUI_PATH> --env COMFYUI_KNOWLEDGE_DIR=<COMFYUI_KNOWLEDGE_DIR> -- npx -y mcp-comfy-ui-builderReplace <…> with your own values
Config file
{
"mcpServers": {
"comfyui-builder": {
"command": "npx",
"args": [
"-y",
"mcp-comfy-ui-builder"
],
"env": {
"COMFYUI_HOST": "<COMFYUI_HOST>",
"COMFYUI_PATH": "<COMFYUI_PATH>",
"COMFYUI_KNOWLEDGE_DIR": "<COMFYUI_KNOWLEDGE_DIR>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"comfyui-builder": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-comfy-ui-builder"
],
"env": {
"COMFYUI_HOST": "<COMFYUI_HOST>",
"COMFYUI_PATH": "<COMFYUI_PATH>",
"COMFYUI_KNOWLEDGE_DIR": "<COMFYUI_KNOWLEDGE_DIR>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e COMFYUI_HOST=<COMFYUI_HOST> -e COMFYUI_PATH=<COMFYUI_PATH> -e COMFYUI_KNOWLEDGE_DIR=<COMFYUI_KNOWLEDGE_DIR> comfyui-builder npx -y mcp-comfy-ui-builderReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ComfyUI Builder
How to install ComfyUI Builder in Claude Code?
For a standard setup, run claude mcp add comfy-ui-builder -- npx -y mcp-comfy-ui-builder. To supply local server paths immediately, run `claude mcp add --env COMFYUI_HOST=<COMFYUI_HOST> --env COMFYUI_PATH=<COMFYUI_PATH> --env COMFYUI_KNOWLEDGE_DIR=<COMFYUI_KNOWLEDGE_DIR> --transport stdio comfyui-builder -- npx -y mcp-comfy-ui-builder`.
What does ComfyUI Builder do?
It exposes over fifty tools for node discovery, workflow creation, execution management, and live rendering updates via WebSocket.
What is required to run ComfyUI Builder?
It requires Node.js 18 or newer, an accessible instance specified in COMFYUI_HOST, and COMFYUI_PATH set if installing manager extensions.