# ComfyUI Builder

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: MIt9
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/MIt9/mcp-comfy-ui-builder
- Updated: 2026-10-30
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/comfyui-builder

## What it 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`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `COMFYUI_HOST`, `COMFYUI_PATH`, `COMFYUI_KNOWLEDGE_DIR` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-builder
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-builder
```
Replace <…> with your own values

## When to use it
- 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
- 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

## Similar
- [comfyui](https://affpapa.org/en/nevibecode/skills/comfyui.md) — skill · 405 installs
- [ai-game-art-generation](https://affpapa.org/en/nevibecode/skills/ai-game-art-generation.md) — skill · 265 installs
- [comfyui-mcp](https://affpapa.org/en/nevibecode/mcp/comfyui-mcp.md) — MCP server · ★ 946 repo stars
- [comfyui-mcp-server](https://affpapa.org/en/nevibecode/mcp/comfyui-mcp-server.md) — MCP server · ★ 10 repo stars
- [ai-image-prompts-skill](https://affpapa.org/en/nevibecode/skills/ai-image-prompts-skill.md) — skill · 1200 installs
- [cli-anything-comfyui](https://affpapa.org/en/nevibecode/skills/cli-anything-comfyui.md) — skill · 615 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
