Comfy-Org/comfy-mcp
A stdio MCP bridge from AI agents to ComfyUI workflows via comfy-cli
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
Comfy MCP is a Python 3.10+ stdio server and a thin bridge from an MCP client to comfy-cli. The client launches comfy-mcp as a subprocess. The bridge invokes comfy with --where local --json, parses its envelope/1 response, and returns it through MCP. The default ComfyUI target is 127.0.0.1:8188; COMFYUI_URL redirects the run and job tools to a ComfyUI instance you control.
The comfy executable is resolved from PATH or COMFY_BIN, not installed as a dependency of the MCP package. Compatibility therefore depends on the executable the client-launched process actually sees. The output viewer registers an inline HTML resource through MCP Apps, using the APIs available from MCP 2.3 and checking whether the client supports the extension.
Key Capabilities & Differentiators
The tool surface covers more than prompt-to-image generation. It runs workflow JSON in API format or as a UI export, validates graphs, edits template slots, and fans workflows out into variants. Asynchronous jobs can be submitted, watched or waited on, and canceled; the agent can inspect a failure verdict and collect output files. Video contact sheets and audio waveforms let the agent inspect media without handling the full output directly.
Discovery operates against the actual ComfyUI installation, including custom nodes, rather than a static catalog. Agents can also stage inputs, launch, stop, or restart ComfyUI, and tail logs. partner_generate runs models such as Flux, Ideogram, and Kling on partner infrastructure without a local ComfyUI execution path. Partner API nodes are distinct: the workflow runs in ComfyUI but delegates specific operations to hosted APIs.
Trade-offs & Limitations
Compared with scripting comfy-cli directly, the MCP layer gives an agent discoverable tools for workflow authoring, environment inspection, and job management. It also adds a client-to-subprocess boundary and a separate CLI version to manage. In particular, a successful MCP handshake does not test whether comfy is present or usable: the missing-engine error can first appear on a tool call. If a script already knows the workflow and job sequence, direct CLI use has fewer moving parts.
Self-hosting gives you control over the ComfyUI workspace and custom-node inventory, but leaves you responsible for inference capacity and runtime upkeep. It also does not guarantee that a workflow stays local: partner nodes and partner_generate use hosted infrastructure and can spend credits. Comfy Cloud MCP trades local setup for a hosted HTTP connection and an account. For self-hosted licensing, the manifest declares AGPL-3.0-or-later OR LicenseRef-Comfy-Commercial; check LICENSE and NOTICE against your intended use.
Hardware & Deployment Guide
Install Python 3.10+ and both packages with pip install comfy-mcp "comfy-cli>=1.14.0". Run comfy install if you do not already have a workspace, start ComfyUI with comfy launch, and register comfy-mcp as a stdio command in Claude Code, Claude Desktop, or Cursor. Set COMFY_BIN when the client environment cannot find comfy, and provide COMFY_API_KEY only for partner features that need it. On macOS, keep the workspace out of protected folders unless the client has the required access.
For local inference, size the ComfyUI host for the chosen models, output sizes, and concurrency, not for the MCP subprocess. The hosted HTTP option is a separate service at https://cloud.comfy.org/mcp, with OAuth or API-key authentication. v0.9.0 was the first PyPI release and fixed the broken generate_image path; v0.10.0 added the api marker to template results. The v0.11.0 correction clarifies that billing_status needs comfy-cli 1.17.0 or later to return a balance, even though the general minimum is 1.14.0.
comfy binary runs commands and returns envelope/1 JSON.search_templates exposes an api flag for credit-consuming templates; billing_status returns a balance with comfy-cli 1.17.0 or newer.Teams with a self-managed ComfyUI workspace that want agents in Claude Code, Claude Desktop, or Cursor to discover installed nodes and models, adapt workflows, and manage render jobs.
A fixed comfy-cli script already does the job, you need hosted GPUs without maintaining ComfyUI, or your client requires a native remote HTTP MCP endpoint rather than a local stdio subprocess.
Quick Start & Installation
pip install comfy-mcp "comfy-cli>=1.14.0" # this server + the engine it wraps comfy install # create a ComfyUI workspace (skip if you have one)
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| comfy-mcp ★ | 388 | +8 | Python | — | A stdio MCP bridge from AI agents to ComfyUI workflows via comfy-cli |
| agents | 43.2k | +221 | Python | MIT | One Markdown plugin catalog adapted to seven AI coding tools |
| rea | 488.8k | +7.6k | TypeScript | MIT | A local CLI and MCP server for evidence-backed app and binary analysis |
| chrome-devtools-mcp | 60.4k | +801 | TypeScript | Apache-2.0 | Chrome DevTools via MCP and CLI for live browser debugging and performance analy |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Comfy-Org/comfy-mcp.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about comfy-mcp
Does a successful MCP connection mean ComfyUI is ready to run workflows?
comfy-mcp as a stdio subprocess, and the server invokes the external comfy executable. Install comfy-cli separately and set COMFY_BIN to its absolute path if the client cannot resolve it. A successful MCP handshake does not prove the CLI is available or that ComfyUI is running.How much GPU memory does a local deployment need?
COMFYUI_URL, the target machine bears the inference load for the run and job tools.What should a commercial self-hosting team check before adopting it?
AGPL-3.0-or-later OR LicenseRef-Comfy-Commercial. Self-hosting is a deployment choice, not a licensing exemption. Review LICENSE and NOTICE, check the obligations of your chosen license against your modification, distribution, and network-use plans, and contact licensing@comfy.org if you need commercial terms.When should I use comfy-cli directly or choose Comfy Cloud MCP instead?
COMFYUI_URL is still a stdio deployment, not Comfy Cloud MCP.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