# Repository Briefing: Comfy-Org/comfy-mcp
> Source: https://repoforai.com/repo/Comfy-Org/comfy-mcp (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Comfy-Org/comfy-mcp
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Python
- **License**: See repository
- **Engineering Health**: A (78/100 · Maintenance 35/35 · Adoption 17/25 · Releases 20/20 · License 6/20)
- **Latest Release**: v0.11.0 (2026-11-16) — https://github.com/Comfy-Org/comfy-mcp/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: MCP, CLI, Self-Hosted
- **Momentum**: 388 ★ total (+1 24h / +8 7d) · 57 forks
- **Topics**: `ai-agents`, `comfy-cli`, `comfyui`, `mcp`, `model-context-protocol`
- **When to Use**: Best for: 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. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Process boundary: The client launches a Python stdio server; the selected `comfy` binary runs commands and returns `envelope/1` JSON.
- Live discovery: Node, model, and template searches reflect the active installation, including custom nodes.
- Job lifecycle: Submit asynchronously, wait or watch, cancel, and retrieve failure verdicts and output files.
- Workflow authoring: Run API-format JSON or UI exports, validate graphs, edit template slots, and generate variants.
- Output inspection: Produce video contact sheets and audio waveforms; inline rendering uses MCP Apps and depends on client support.
- Spend visibility: `search_templates` exposes an `api` flag for credit-consuming templates; `billing_status` returns a balance with comfy-cli 1.17.0 or newer.
```

## Quick Start / Clone
```bash
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)
```
