ComfyUI Builder

io.github.MIt9由 GitHub 帳號 MIt9 發布v2.4.1更新於 Oct 24, 2026

ComfyUI MCP server: knowledge base, workflow builder, real-time execution, models, plugins.

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理建立、驗證並執行 ComfyUI 影像生成工作流程,管理模型並取得輸出。

可以做什麼
  • 探索與檢視節點、檢查相容性,並依內建知識庫建議節點
  • 以程式方式建立工作流程:建立、加入節點、連線、驗證,並使用範本與巨集
  • 透過 WebSocket 串流進度執行工作流程,支援批次與鏈式執行及進度追蹤
  • 檢視系統資源(GPU/VRAM/RAM),列出並檢查 checkpoint、LoRA、VAE 等各類模型
  • 列出、下載輸出檔案,檢視與清空佇列,中斷執行中的工作
  • 列出並重新載入外掛,透過 ComfyUI-Manager 安裝自訂節點與模型
適用情境
適合讓助理把一句影像描述變成可執行的 ComfyUI 工作流程並直接跑起來,不必手動編輯 JSON。也適合批次或鏈式生成,以及在建立大型工作流程前確認硬體上限。
執行需求
以 Node.js 18+ 本機程序透過 stdio 執行,通常以絕對路徑啟動建置後的 dist/mcp-server.js。執行、佇列、模型與輸出相關工具需要運作中的 ComfyUI 實例,透過 COMFYUI_HOST 設定。安裝自訂節點與模型需要 COMFYUI_PATH;COMFYUI_KNOWLEDGE_DIR 為選用,用來指定知識目錄。
安裝前請注意
透過 ComfyUI-Manager 安裝自訂節點與模型會改動 ComfyUI 安裝,並下載第三方程式碼與大型檔案,安裝前應確認內容。執行、清空佇列與中斷等工具會直接作用在運作中的 ComfyUI 實例及其工作。COMFYUI_HOST 只應指向自己可控制的 ComfyUI 服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ComfyUI Builder,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-comfy-ui-builder

Control ComfyUI from Claude or Cursor — 50+ MCP tools for node discovery, dynamic workflow building, real-time WebSocket execution, and model management. No JSON editing required.

[圖片]

[CI] [npm] [Docker] [License: MIT]

Tell your AI assistant what image to generate — it builds and runs the ComfyUI workflow for you.
Works with Claude Desktop, Cursor, and any MCP-compatible client.

[Demo]

Publishable to the MCP Registry via server.json and mcpName.

What is this

  • Knowledge base: Seed knowledge/base-nodes.json and node-compatibility.json from bundled data (62 seed nodes; 100–600+ after sync). No external services required for suggest/build.
  • Sync: Custom packs from ComfyUI-Manager; nodes from running ComfyUI via sync-nodes CLI or on MCP startup.
  • MCP server (50+ tools): Node discovery, dynamic workflow builder, 9 templates (txt2img, txt2img_flux, img2img, …), WebSocket real-time execution, batch/chain, model management, plugin system.
  • Real-time execution: Sub-second progress via WebSocket with automatic polling fallback; ~90% less network traffic for batch runs.

Install

bash
npm install mcp-comfy-ui-builder

Or from source: git clone https://github.com/MIt9/mcp-comfy-ui-builder.git && cd mcp-comfy-ui-builder && npm install

Quick start

  1. Build (postbuild fills knowledge from seed)

    bash
    npm run buildnpm run mcp
  2. Use knowledge in code

    ts
    import baseNodes from './knowledge/base-nodes.json' assert { type: 'json' };

Commands

CommandDescription
npm run seedFill knowledge from seed. Use --force to overwrite.
npm run sync-managerUpdate custom packs list from ComfyUI-Manager
npm run sync-nodesSync nodes from running ComfyUI to knowledge base (requires COMFYUI_HOST)
npm testRun tests (vitest)
npm run mcpStart MCP server (after npm run build)

Documentation

Single entry point — task-oriented navigation:

Requirements

  • Node.js 18+

MCP Server (Cursor / Claude)

Server provides 50+ tools across 9 categories:

Core Features

Node Discovery:

  • list_node_types, get_node_info, check_compatibility, suggest_nodes
  • discover_nodes_live, search_nodes, sync_nodes_to_knowledge

Dynamic Workflow Builder:

  • create_workflow, add_node, connect_nodes, validate_workflow
  • Build workflows programmatically without JSON manipulation

Templates & Macros:

  • list_templates, build_workflow — Pre-built templates (txt2img, img2img, inpainting, upscale, LoRA, ControlNet, batch)
  • create_template, apply_template — Parameterized templates
  • list_macros, insert_macro — Reusable sub-workflows

Real-time execution 📡

  • execute_workflow_sync — Execute with WebSocket progress streaming (sub-second updates)
  • execute_workflow_stream — Full event history collection (WebSocket-only)
  • get_execution_progress — Real-time progress with node-level granularity
  • execute_batch — Concurrent execution with 90% reduced network traffic
  • execute_chain — Sequential workflows with data passing

Resources & Model Management:

  • get_system_resources — GPU/VRAM/RAM + recommendations (max resolution, model size, batch size); call first before building workflows to avoid OOM
  • list_models, check_model_exists, get_workflow_models
  • Supports checkpoint, lora, vae, controlnet, upscale, embedding, clip

Outputs & Queue:

  • list_outputs, download_output, download_all_outputs
  • list_queue, interrupt_execution, clear_queue

Plugins:

  • list_plugins, reload_plugins — Data-only plugin system

Install (requires COMFYUI_PATH):

  • install_custom_node, install_model — Install nodes and models via ComfyUI-Manager

WebSocket features

  • <100ms latency for progress updates (vs 1.5s polling)
  • Node-level tracking: See exactly which node is executing with progress percentage
  • Automatic fallback: Gracefully falls back to polling if WebSocket unavailable
  • Shared connection: Single WebSocket for batch/chain execution (90% reduced traffic)

Set COMFYUI_HOST environment variable for execution/model/output tools:

bash
export COMFYUI_HOST="http://localhost:8188"

See doc/MCP-SETUP.md for full tool list and doc/WEBSOCKET-GUIDE.md for real-time features.

Running MCP

From project root, first build the project, then start the server:

bash
npm run buildnpm run mcp

Or without npm: node dist/mcp-server.js. Server works via stdio (stdin/stdout). More details → doc/MCP-SETUP.md.

Connect MCP (Cursor / Claude)

What you need: Node.js 18+, one-time build (npm run build), absolute path to dist/mcp-server.js, restart after config change. If the server fails to start with «spawn node ENOENT», use the full path to node in command (run which node and put that path). See doc/MCP-SETUP.md → Troubleshooting.

Minimal config (knowledge and workflow tools only):

json
{  "mcpServers": {    "comfy-ui-builder": {      "command": "node",      "args": ["/ABSOLUTE/PATH/TO/mcp-comfy-ui-builder/dist/mcp-server.js"]    }  }}

Use full path in command (e.g. "/opt/homebrew/bin/node") if Cursor/IDE reports «spawn node ENOENT».

With ComfyUI execution (execute_workflow, get_execution_status, list_outputs, etc.): add "env": { "COMFYUI_HOST": "http://127.0.0.1:8188" } to the server block. See doc/MCP-SETUP.md for full checklist, optional env vars (COMFYUI_PATH, COMFYUI_KNOWLEDGE_DIR), and troubleshooting.

Publish on GitHub

  1. Create a new repository on GitHub: name mcp-comfy-ui-builder, visibility Public (or Private). Do not initialize with README, .gitignore, or license (project already has them).

  2. Add remote and push:

    bash
    git remote add origin https://github.com/MIt9/mcp-comfy-ui-builder.gitgit branch -M maingit push -u origin main
  3. If you fork this repo, replace MIt9 with your GitHub username in the URLs above.

Cursor: Settings → MCP; Claude Desktop: config file ~/Library/Application Support/Claude/claude_desktop_config.json (macOS). Replace the path with your absolute path to dist/mcp-server.js, then restart the app. Full guide: doc/MCP-SETUP.md.

License

MIT

來源:README.md,提交 72928ad

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.4.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分