██████╗ ██████╗ ███╗ ███╗███████╗██╗ ██╗██████╗ ██╗██╗ ██████╗ ████████╗
██╔════╝██╔═══██╗████╗ ████║██╔════╝╚██╗ ██╔╝██╔══██╗██║██║ ██╔═══██╗╚══██╔══╝
██║ ██║ ██║██╔████╔██║█████╗ ╚████╔╝ ██████╔╝██║██║ ██║ ██║ ██║
██║ ██║ ██║██║╚██╔╝██║██╔══╝ ╚██╔╝ ██╔═══╝ ██║██║ ██║ ██║ ██║
╚██████╗╚██████╔╝██║ ╚═╝ ██║██║ ██║ ██║ ██║███████╗╚██████╔╝ ██║
╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝
ComfyPilot is an MCP server for ComfyUI. It gives an AI agent a clean tool surface for workflow building, queueing, progress monitoring, image retrieval, snapshots, and VRAM safety.
- Production manual:
docs/MANUAL.md - Release notes:
CHANGELOG.md
- A practical bridge between AI agents and ComfyUI.
- A 66-tool MCP surface for workflows, models, images, monitoring, safety, and routing.
- A workflow-oriented loop built for iteration, not one-shot guessing.
- A small technique library for saving and replaying working patterns.
Use this loop for every non-trivial task:
-
Check system first - Read GPU state before loading models. Start with
comfy_get_system_stats,comfy_check_vram. -
Check memory - Before building from scratch, use
comfy_search_techniquesto check if a similar workflow already exists in the library. -
Build in small steps - Use
comfy_build_workflowfor common patterns (txt2img, img2img, upscale, inpaint, controlnet), or construct API-format JSON. Validate withcomfy_validate_workflowbefore queueing. -
Monitor and retrieve - Queue with
comfy_queue_prompt, watch withcomfy_watch_progress, retrieve withcomfy_get_output_image(returns image content blocks directly in chat). -
Snapshot before changes - Always
comfy_snapshot_workflowbefore modifying a working workflow. Usecomfy_diff_snapshotsandcomfy_restore_snapshotfor undo. -
Route outputs - Send generated images to disk, TouchDesigner, or Blender with
comfy_send_to_disk,comfy_send_to_td,comfy_send_to_blender.
Use for connection health, GPU diagnostics, and VRAM management.
comfy_get_system_stats,comfy_get_gpu_info,comfy_get_featurescomfy_list_extensions,comfy_restart,comfy_free_vram
Use for discovering and managing checkpoints, LoRAs, VAEs, and other model files.
comfy_list_models,comfy_get_model_info,comfy_list_model_folderscomfy_search_models,comfy_refresh_models
Use for queueing, cancelling, and managing prompt execution.
comfy_queue_prompt,comfy_get_queue,comfy_cancel_runcomfy_interrupt,comfy_clear_queuecomfy_validate_workflow,comfy_export_workflow,comfy_import_workflow
Use for exploring ComfyUI's node catalog and understanding widget schemas.
comfy_list_node_types,comfy_get_node_info,comfy_search_nodescomfy_get_categories,comfy_get_embeddings,comfy_inspect_widget
Use for retrieving generated images (returned as image content blocks in chat).
comfy_get_output_image,comfy_upload_image,comfy_list_output_imagescomfy_download_batch,comfy_get_image_url
Use for inspecting past generations and their outputs.
comfy_get_history,comfy_get_run_result,comfy_delete_historycomfy_clear_history,comfy_search_history
Use for tracking active jobs and observing workflow dynamics.
comfy_watch_progress,comfy_subscribe,comfy_unsubscribecomfy_get_events,comfy_describe_dynamics,comfy_get_status
Use for undo/restore and workflow version tracking.
comfy_snapshot_workflow,comfy_list_snapshots,comfy_diff_snapshotscomfy_restore_snapshot,comfy_delete_snapshot,comfy_auto_snapshot
Use for learning, saving, and replaying reusable workflow patterns.
comfy_save_technique- Save a workflow as a reusable technique with tags and metadata.comfy_search_techniques- Search the library by text query and/or tags.comfy_list_techniques- List all saved techniques with metadata.comfy_replay_technique- Load a saved technique's workflow for immediate use.comfy_favorite_technique- Mark techniques as favorites and rate them (0-5).
Technique storage lives at ~/.comfypilot/techniques/ as individual JSON files.
Use for guardrails, pre-flight checks, and emergency control.
comfy_check_vram- Check GPU VRAM usage with status levels (ok/warn/critical).comfy_set_limits- Configure safety thresholds (warn %, block %, max queue size).comfy_detect_instability- Check for near-OOM conditions and stuck jobs.comfy_validate_before_queue- Pre-flight check: VRAM headroom + queue capacity.comfy_emergency_stop- Interrupt current job, clear queue, free all VRAM.
Use for template-based workflow construction and editing.
comfy_build_workflow- Build from templates: txt2img, img2img, upscale, inpaint, controlnet.comfy_add_node- Add a node to a workflow-in-progress.comfy_connect_nodes- Wire node outputs to inputs.comfy_set_widget_value- Set widget values on nodes.comfy_apply_template- Apply a named template to an existing workflow.
Use for agent-orchestrated cross-app delivery of generated images.
comfy_send_to_disk- Save output image to local filesystem.comfy_send_to_td- Route output to TouchDesigner project directory.comfy_send_to_blender- Route output to Blender project directory.comfy_list_destinations- List configured output destinations.
comfy://system/info- System stats, GPU info, ComfyUI versioncomfy://server/capabilities- Detected server profile, version, auth methodcomfy://nodes/catalog- Node catalog preview (first 100 names)comfy://models/{folder}- Model listing by folder (checkpoints, loras, etc.)comfy://embeddings- Available embeddings
- Connect MCP client to ComfyPilot.
- Check system state and VRAM headroom.
- Build a workflow (template or custom API JSON).
- Validate, then queue the prompt.
- Watch progress until complete.
- Retrieve the output image (displayed inline in chat).
- Route to disk/TD/Blender if needed. Snapshot at stable milestones.
- Building and iterating on ComfyUI workflows through conversation.
- Template-based generation (txt2img, img2img, upscale, inpaint, controlnet) with sensible defaults.
- Monitoring GPU resources and preventing OOM situations.
- Returning generated images directly in the chat (image content blocks).
- Cross-app output routing to TouchDesigner and Blender projects.
- Snapshot/restore for non-destructive workflow experimentation.
- Learning and replaying reusable workflow patterns.
- Replacing artistic direction by itself.
- Running without a live ComfyUI instance (this is a bridge, not a runtime).
- Streaming real-time video output (snapshots and polls, not live frames).
- Automatic custom node installation or dependency management.
- "One shot perfect generation" without iterative refinement.
| Feature | Status | Notes |
|---|---|---|
| Local ComfyUI (self-hosted) | Supported | Primary target |
| Comfy Cloud API | Partial | Auth and route probing supported; progress depends on remote WS support |
| stdio transport | Supported | Default |
| Streamable HTTP transport | Not yet | Planned |
| Workflow JSON (v0.17+ spec) | Supported | Multi-pass validation (schema + catalog + graph) |
| V3 custom nodes | Not tested | V3 migration is ongoing in ComfyUI |
| WebSocket progress events | Supported where /ws is available |
Binary preview frames are ignored safely |
| Image content blocks | Supported | Inline image display in chat |
| Cross-app routing | Filesystem only | Saves to disk with suggested commands |
Local development runtime:
git clone https://github.com/dreamrec/ComfyPilot.git
cd ComfyPilot
uv sync
uv run comfypilotClaude Code plugin (one-command install):
claude plugin add /path/to/ComfyPilotComfyPilot ships a standard MCP bundle in-repo:
mcp/manifest.jsonmcp/profiles/claude-desktop.json,cursor.json,generic.json
The bundled profile JSON files pin uv run with --directory; replace /path/to/ComfyPilot with your checkout path when copying them into a client config. If you're launching from inside this repo, .mcp.json already uses ${CLAUDE_PLUGIN_ROOT}.
Manual client configuration example (Claude Desktop):
{
"mcpServers": {
"comfypilot": {
"command": "uv",
"args": ["run", "--directory", "/path/to/ComfyPilot", "comfypilot"],
"env": {
"COMFY_URL": "http://127.0.0.1:8188",
"COMFY_API_KEY": ""
}
}
}
}COMFY_URL(defaulthttp://127.0.0.1:8188) - ComfyUI server URLCOMFY_API_KEY(default empty) - Optional API key for authenticated accessCOMFY_TIMEOUT(default300) - HTTP request timeout in secondsCOMFY_SNAPSHOT_LIMIT(default50) - Maximum workflow snapshots retained in memoryCOMFY_OUTPUT_DIR(default~/comfypilot_output) - Image output directory for disk routingCOMFY_TD_OUTPUT_DIR(default~/comfypilot_output/touchdesigner) - TouchDesigner output pathCOMFY_BLENDER_OUTPUT_DIR(default~/comfypilot_output/blender) - Blender output pathCOMFY_AUTH_METHOD(defaultauto) - Auth method:auto,bearer, orx-api-key
Run the test suite:
uv run pytest -vRun a specific category:
uv run pytest tests/test_builder.py -vFor a quick smoke run:
uv run pytest -qTreat this as mandatory for every meaningful task: before generations check VRAM, before workflow changes snapshot, after builds validate, after errors check comfy_detect_instability.
MIT
dreamrec // ComfyPilot // live laugh diffuse