artokun/comfyui-mcp
ComfyUI control plane with MCP tools and a sidebar agent for live workflow editing
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
The TypeScript package exposes the comfyui-mcp CLI and separates orchestration from rendering. An MCP client calls tools to discover models, build or revise a workflow, and queue it on a running ComfyUI instance. ComfyUI executes the graph; the control plane manages the workflow and its dependencies. The package uses @modelcontextprotocol/sdk and @stable-canvas/comfyui-client; the progress monitor subscribes to ComfyUI's WebSocket for step, completion, and error events instead of repeatedly polling the queue.
The same package ships a panel orchestrator that connects the browser sidebar to the live graph. Its provider-neutral AgentBackend interface separates session handling from canvas control: ClaudeBackend wraps the Claude Agent SDK, while CodexBackend uses the Codex app-server JSON-RPC protocol. The Claude Code plugin is a separate integration layer over the MCP tools, adding commands, skills, agents, and hooks without making the plugin a requirement for headless clients.
Key Capabilities & Differentiators
The 38 MCP tools do more than submit existing workflows: they can construct and edit graphs, iterate on runs, find missing weights, edit model search paths, and unload cached models. The generate_image entry point covers text-to-image, ControlNet and IP-Adapter conditioning, local LTX-2.3 video, hosted partner-node 3D, ESRGAN upscaling, and BiRefNet background removal. These actions have different prerequisites: IP-Adapter needs ComfyUI_IPAdapter_plus, and the 3D path uses a hosted API rather than local inference.
The live panel adds spatial layout, workflow and pack loading, rewind/rollback, and multi-tab operation. It supports Claude, ChatGPT, Gemini, Ollama, and OpenAI-compatible endpoints. The Claude Code plugin ships 42 skills, including guides for Flux, WAN, Qwen, and LTX 2.3 that give the agent model-specific settings and dependency guidance. Installer pack manifests tie custom nodes, model URLs, and workflows together for apply_manifest and generated installers.
Trade-offs & Limitations
A thin MCP relay is easier to operate when clients only need to submit fixed graphs and retrieve outputs. This control plane earns its extra complexity when users need graph authoring, live edits, and dependency management. Its broader tool surface also expands what an agent can change: model removal deletes files, search-path edits modify configuration, and custom-node installation can clone repositories and install Python packages. Give the service only the access it needs and review third-party nodes before installation. Canvas rollback should not be treated as a backup for filesystem changes.
Comfy Cloud's first-party MCP is a more direct fit when the goal is hosted GPUs without maintaining a ComfyUI install; the community cloud mode here does not replace that first-party integration. Local ComfyUI and Ollama can keep both rendering and agent inference local, but running them concurrently on one GPU can put pressure on VRAM. A hosted LLM can shift agent inference off the workstation, but does not reduce local rendering requirements and adds network, data-handling, and provider-cost considerations.
Hardware & Deployment Guide
On macOS, Linux, or Windows, run ComfyUI and launch npx -y comfyui-mcp from an MCP client's stdio configuration. The package requires Node.js ^22.14.0 || >=24.0.0; it auto-detects the ComfyUI installation and port, with environment overrides. For a LAN or VPS instance, COMFYUI_URL selects the render target; panel users can run connect locally against a remote URL without installing the Node orchestrator on the render host. COMFYUI_API_KEY selects the community Comfy Cloud mode. An offline setup requires a local provider such as Ollama and the necessary model weights and nodes already installed.
Remote MCP clients can use Streamable HTTP. --tunnel opens a public Cloudflare quick tunnel and generates a token accepted as Authorization: Bearer or X-API-Key. Plain --http on loopback does not require authentication by default; configure COMFYUI_MCP_HTTP_TOKEN for shared HTTP access rather than assuming authentication is on. Panel keys are stored in ~/.comfyui-mcp/panel-secrets.json, with environment variables taking precedence. In v0.52.206, Ollama context sizing switched from a fixed 16K to model-aware defaults with panel overrides, and compacted messages retain a summary with the full text available for recall.
/free endpoint.generate_image supports text-to-image, ControlNet, IP-Adapter, local LTX-2.3 video, hosted partner-node 3D, ESRGAN upscaling, and BiRefNet background removal.AgentBackend isolates the orchestrator from provider details, including Claude Agent SDK sessions and Codex app-server JSON-RPC.apply_manifest and generated Windows and RunPod installers; CI checks model links and payload sizes.--tunnel exposes a token-authenticated Streamable HTTP MCP endpoint; connect can keep the panel agent on the workstation while ComfyUI renders remotely.Teams running their own ComfyUI that want an agent to build, debug, and iterate on workflows and inspect or install the dependencies they need.
You only need to submit fixed workflows and retrieve outputs, want fully managed GPU execution, or cannot grant an agent write access to graphs and their dependencies.
Quick Start & Installation
npx -y comfyui-mcp@latest --tunnel
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| comfyui-mcp ★ | 979 | +19 | TypeScript | MIT | ComfyUI control plane with MCP tools and a sidebar agent for live workflow editi |
| OpenMontage | 85.4k | +1.5k | Python | AGPL-3.0 | Agent-led video production from brief to finished edit |
| diffusers | 35k | +36 | Python | Apache-2.0 | A modular PyTorch SDK for running and customizing multimodal diffusion pipelines |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/artokun/comfyui-mcp.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about comfyui-mcp
Do I need the Agent Panel to use the MCP tools?
comfyui-agent-panel and run the connect orchestrator when users need live canvas edits in the browser. In a remote ComfyUI setup, the orchestrator can run on your workstation while the remote host handles rendering.What hardware should I provision, and does the MCP server itself need a GPU?
clear_vram unloads ComfyUI's cached models through /free, but it cannot lower a workflow's peak memory requirement. There is no single GPU minimum for the full toolset.Can we use this commercially and keep it entirely self-hosted?
When is this a better fit than a thin ComfyUI relay or Comfy Cloud's MCP?
COMFYUI_API_KEY mode.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy