dcc-mcp-comfyui
Production ComfyUI adapter for the DCC Model Context Protocol (MCP) ecosystem. It gives agents a typed, bounded path from API-format workflow validation to queue execution and artifact delivery through ComfyUI's local REST API.
Illustrative workflow generated with OpenAI ImageGen from the retained source in docs/assets/sources; it depicts only the implemented validation, queue, polling, and artifact-delivery path.
Capabilities
- Workflow validation checks API-format structure, graph references, live node classes, and required inputs before queue submission.
- Catalog discovery exposes bounded features, models, embeddings, node summaries, exact node contracts, and redacted device/runtime status.
- Queue operations inspect IDs without workflow bodies, target one exact prompt for cancellation or history deletion, and verify the resulting state; running cancellation fails closed instead of falling back to ComfyUI's legacy global interrupt.
- Asset handoff uploads bounded images with SHA-256 provenance and atomically downloads only artifacts proven to belong to the requested prompt.
- Artifact discovery is shape-based rather than tied to English labels or an image-only key, so file-shaped image, animation, video, audio, 3D, and custom-node outputs share one bounded contract.
- Standalone discovery, packaged Skill subprocesses, and six-part DCC-MCP readiness are supported out of the box.
The production path was live-validated on ComfyUI 0.32.0 with a three-node EmptyImage -> ImageInvert -> SaveImage workflow, including typed validation, execution, status polling, and artifact retrieval.
Quick Start
# Install
pip install dcc-mcp-comfyui
# Start ComfyUI locally (in another terminal)
python main.py --listen 127.0.0.1
# Start the MCP server
dcc-mcp-comfyui --comfyui-base-url http://127.0.0.1:8188
Environment Variables
| Variable | Default | Description |
|---|---|---|
DCC_MCP_COMFYUI_BASE_URL |
http://127.0.0.1:8188 |
ComfyUI server URL |
DCC_MCP_COMFYUI_TIMEOUT |
120 |
Request timeout (seconds) |
DCC_MCP_COMFYUI_PORT |
OS-assigned | MCP instance port |
DCC_MCP_GATEWAY_PORT |
9765 |
Gateway port |
DCC_MCP_COMFYUI_ENABLE_GATEWAY_FAILOVER |
true |
Gateway failover |
Skills
The wheel includes four validated Skills and 17 typed tools:
| Skill | Tools | Boundary |
|---|---|---|
comfyui-workflow |
4 | Validate, submit, monitor, and resolve exact prompt-owned artifacts |
comfyui-catalog |
7 | Features, model folders, models, embeddings, node summaries/contracts, and redacted runtime status |
comfyui-queue |
4 | Redacted queue inspection, exact cancellation/history deletion, and memory reclamation |
comfyui-assets |
2 | Bounded image upload and atomic prompt-owned artifact download |
The public surface does not expose arbitrary Python, raw process arguments, local ComfyUI install paths, bulk queue deletion, or unbounded catalog dumps.
MCP Client Config
{
"mcpServers": {
"dcc-mcp-comfyui": {
"url": "http://127.0.0.1:9765/mcp"
}
}
}
Build & Test
uv pip install -e ".[dev]"
uv run pytest
uv run ruff check src/ tests/
Architecture
MCP Client → Gateway (:9765) → ComfyUiMcpServer (OS port)
└─ Skill scripts → ComfyUIBridge → ComfyUI REST API (:8188)
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dcc_mcp_comfyui-0.1.1.tar.gz.
File metadata
- Download URL: dcc_mcp_comfyui-0.1.1.tar.gz
- Upload date:
- Size: 51.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
053c546bbaa7ef83beee8cb1eace8b5edc03a05e83147da7c0bf5fc9787e02da
|
|
| MD5 |
412630a688963cd31d9f2a049a955882
|
|
| BLAKE2b-256 |
135767040e690684723c83f32f7cb1a8120f2c639a7d3e8fb78394269bf67ac0
|
Provenance
The following attestation bundles were made for dcc_mcp_comfyui-0.1.1.tar.gz:
Publisher:
release.yml on dcc-mcp/dcc-mcp-comfyui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dcc_mcp_comfyui-0.1.1.tar.gz -
Subject digest:
053c546bbaa7ef83beee8cb1eace8b5edc03a05e83147da7c0bf5fc9787e02da - Sigstore transparency entry: 2449781459
- Sigstore integration time:
-
Permalink:
dcc-mcp/dcc-mcp-comfyui@950d0e54a5a622f6757801fed1fa49da322f3190 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dcc-mcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@950d0e54a5a622f6757801fed1fa49da322f3190 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dcc_mcp_comfyui-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dcc_mcp_comfyui-0.1.1-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ac8fb98d88217abd22c6281835bd282caf00bb63a5aa26887f369370f7d756
|
|
| MD5 |
6aba4d44f9841fb70860fb269e4dd2ac
|
|
| BLAKE2b-256 |
7ce968babf57175e35985a543d437e668b92f5328c4c616cc86ce74d317be7de
|
Provenance
The following attestation bundles were made for dcc_mcp_comfyui-0.1.1-py3-none-any.whl:
Publisher:
release.yml on dcc-mcp/dcc-mcp-comfyui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dcc_mcp_comfyui-0.1.1-py3-none-any.whl -
Subject digest:
69ac8fb98d88217abd22c6281835bd282caf00bb63a5aa26887f369370f7d756 - Sigstore transparency entry: 2449781722
- Sigstore integration time:
-
Permalink:
dcc-mcp/dcc-mcp-comfyui@950d0e54a5a622f6757801fed1fa49da322f3190 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dcc-mcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@950d0e54a5a622f6757801fed1fa49da322f3190 -
Trigger Event:
push
-
Statement type: