ComfyUI Builder

平台与服务

by mit9

ComfyUI 的 MCP 服务器,提供知识库、工作流搭建、实时执行,以及模型与插件管理。

什么是 ComfyUI Builder

ComfyUI 的 MCP 服务器,提供知识库、工作流搭建、实时执行,以及模型与插件管理。

README

mcp-comfy-ui-builder

<img src="assets/icon.svg" width="48" height="48" alt="" align="left" />

CI npm Docker License: MIT

ComfyUI Node Discovery — seed knowledge base and MCP tools for Cursor/Claude.
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 build
    npm 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 build
npm 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.git
    git branch -M main
    git 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

常见问题

ComfyUI Builder 是什么?

ComfyUI 的 MCP 服务器,提供知识库、工作流搭建、实时执行,以及模型与插件管理。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论