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

- **GitHub URL**: https://github.com/artokun/comfyui-mcp
- **Official Docs / Website**: https://comfyui-mcp.artokun.io/docs
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 19/25 · Releases 17/20 · License 20/20)
- **Latest Release**: v0.52.206 (2026-10-14) — https://github.com/artokun/comfyui-mcp/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, Self-Hosted, Local AI, CLI
- **Momentum**: 979 ★ total (+4 24h / +19 7d) · 158 forks
- **Topics**: `agent-skills`, `ai-agent`, `claude-code`, `claude-plugin`, `comfyui`, `comfyui-extension`, `comfyui-mcp`, `comfyui-mcp-server`, `flux`, `image-generation`, `local-first`, `mcp`
- **When to Use**: Best for: Teams running their own ComfyUI that want an agent to build, debug, and iterate on workflows and inspect or install the dependencies they need. Skip if: 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.

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

## Key Capabilities
```text
- Integration surfaces: A standalone MCP CLI, a ComfyUI sidebar driven by the panel orchestrator, and a Claude Code plugin with commands, skills, agents, and hooks.
- Workflow control: 38 MCP tools cover graph authoring, execution and iteration, model management, and GPU cache release through ComfyUI's `/free` endpoint.
- Generation paths: `generate_image` supports text-to-image, ControlNet, IP-Adapter, local LTX-2.3 video, hosted partner-node 3D, ESRGAN upscaling, and BiRefNet background removal.
- Provider separation: `AgentBackend` isolates the orchestrator from provider details, including Claude Agent SDK sessions and Codex app-server JSON-RPC.
- Repeatable setup: Pack manifests feed `apply_manifest` and generated Windows and RunPod installers; CI checks model links and payload sizes.
- Remote transport: `--tunnel` exposes a token-authenticated Streamable HTTP MCP endpoint; `connect` can keep the panel agent on the workstation while ComfyUI renders remotely.
```

## Quick Start / Clone
```bash
npx -y comfyui-mcp@latest --tunnel
```
