ComfyUI MCP Server
The ComfyUI MCP Server enables Claude Desktop to control and automate a local ComfyUI installation for AI image generation through 15 specialized tools.
Image Generation:
Quick template-based generation using pre-configured workflows (Flux, SD1.5, SDXL, img2img)
Custom workflow execution by submitting complete workflow JSON with dynamic parameter overrides
Flexible parameter control including prompts, models, steps, CFG scale, dimensions, seeds, samplers, schedulers, and LoRAs
Workflow Management:
Save, load, list, and delete workflows in a personal library with names, descriptions, tags, and metadata
Reuse workflows without managing complex JSON structures
Model & Resource Management:
List and filter available checkpoints, LoRAs, VAEs, CLIP, ControlNet, upscale models, and embeddings
Query model metadata with optional file size information
Generation Monitoring & Control:
Real-time progress tracking via WebSocket connections
Check generation status with queue position, progress, and output paths
Wait for completion with configurable timeouts and polling intervals
Cancel specific generations or interrupt running tasks
Clear pending queue items with confirmation protection
File Operations:
Upload images to ComfyUI's input folder for use in workflows
Retrieve and list output images with full Windows path support
Custom filename control with overwrite protection and sorting options
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ComfyUI MCP Server Generate a portrait of a cyberpunk samurai using SDXL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ComfyUI MCP Server
A Model Context Protocol (MCP) server that enables Claude Desktop to interact with your local ComfyUI installation for AI-powered image generation.
Features
15 MCP Tools for complete ComfyUI control
Template-based generation (Flux, SD1.5, SDXL, img2img)
Custom workflow execution with smart parameter overrides
Real-time progress monitoring via WebSocket
Model management (list checkpoints, LoRAs, VAEs, etc.)
Workflow library for saving and reusing workflows
Queue management (status, cancel, clear)
Image upload/retrieval with full Windows path support
Related MCP server: ComfyUI MCP Server
Prerequisites
Node.js v20 or higher
ComfyUI installed and running at
http://127.0.0.1:8188Claude Desktop (for MCP integration)
Windows 11 (as per specification)
Installation
1. Install Dependencies
The file paths in the examples below must be replaced with the correct paths for your system.
cd [Path to your ComfyUI MCP Server]
npm install2. Configure Paths
Edit config.json to match your ComfyUI installation:
{
"comfyui": {
"installation_path": "[Path to your ComfyUI portable installation]"
}
}3. Build the Server
npm run build4. Configure Claude Desktop
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"comfyui": {
"command": "node",
"args": [
"[Path to your ComfyUI MCP Server]\\dist\\index.js"
],
"env": {
"COMFYUI_CONFIG": "[Path to your ComfyUI MCP Server]\\config.json"
}
}
}
}5. Restart Claude Desktop
The ComfyUI tools will now be available in Claude Desktop.
Available Tools
Generation
comfy_submit_workflow- Submit custom workflow JSON with overridescomfy_generate_simple- Quick generation using templates
Status & Monitoring
comfy_get_status- Check generation status and outputscomfy_wait_for_completion- Wait for generation to complete
Model Management
comfy_list_models- List available models, LoRAs, VAEs
Workflow Library
comfy_save_workflow- Save workflow to librarycomfy_load_workflow- Load saved workflowcomfy_list_workflows- List all saved workflowscomfy_delete_workflow- Delete workflow from library
Queue Management
comfy_get_queue- Get current queue statuscomfy_cancel_generation- Cancel generationcomfy_clear_queue- Clear pending queue items
Utilities
comfy_upload_image- Upload image to ComfyUI input foldercomfy_get_output_images- List recent output images
Usage Examples
Simple Text-to-Image Generation
Ask Claude:
Generate an image of a sunset over mountains using FluxClaude will use comfy_generate_simple with the flux_txt2img template.
Custom Workflow Execution
Use my chrono_edit workflow to animate this product imageClaude will:
Load your workflow with
comfy_load_workflowUpload the image with
comfy_upload_imageSubmit with
comfy_submit_workflowand parameter overrides
Check Available Models
What Flux models do I have available?Claude will use comfy_list_models with filter="flux".
Configuration
Template Defaults
Edit config.json to customize template defaults:
{
"templates": {
"flux_txt2img": {
"default_model": "flux_dev.safetensors",
"default_steps": 20,
"default_cfg": 3.5
}
}
}Workflow Library Path
Workflows are saved to:
[Path to your ComfyUI portable installation]\ComfyUI\user\default\workflows\mcp_libraryTroubleshooting
"Cannot connect to ComfyUI"
Ensure ComfyUI is running:
run_nvidia_gpu.batCheck ComfyUI is accessible at
http://127.0.0.1:8188Verify port 8188 is not blocked by firewall
"Model not found"
Run
comfy_list_modelsto see available modelsCheck model file exists in the correct folder
Verify model name spelling matches exactly
"Workflow validation failed"
Test workflow in ComfyUI UI first
Check all node connections are valid
Ensure all required models are available
Permission Errors
Check folder permissions on ComfyUI directories
Run Claude Desktop as administrator if needed
Verify paths in
config.jsonare accessible
Development
Build in Watch Mode
npm run devClean Build
npm run clean
npm run buildArchitecture
Claude Desktop (stdio) → MCP Server → ComfyUI API (HTTP/WebSocket)
↓
File System
- Models
- Input/Output
- Workflow LibraryThe MCP server runs as a separate Node.js process and communicates with ComfyUI via its HTTP API and WebSocket connections. It does not modify any ComfyUI files.
License
MIT
Support
For issues and questions, refer to the specification document or ComfyUI API documentation.
Available Tools
14 toolscomfy_cancel_generationB
Cancel a specific generation or interrupt the currently executing generation. Can optionally remove from queue.
Inputs: prompt_id, delete_from_queue.
comfy_clear_queueA
Clear all pending items from the queue (does not affect currently running generation). Requires confirmation.
Inputs: confirm.
comfy_delete_workflowA
Delete a saved workflow from the MCP library. Requires confirmation for safety.
Inputs: name (required), confirm.
comfy_generate_simpleC
Quick image generation using pre-configured workflow templates (flux_txt2img, sd15_txt2img, sdxl_txt2img, basic_img2img). Ideal for common use cases without managing workflow JSON.
Inputs: prompt (required), template (required), negative_prompt, model, +10 more.
comfy_get_output_imagesA
List recent output images from ComfyUI's output folder. Returns full Windows paths that Claude Desktop can read.
Inputs: limit, sort, filter.
comfy_get_queueA
Get detailed information about the current generation queue, including running and pending items.
Inputs: no named parameters.
comfy_get_statusA
Get the current status and progress of a specific generation or the overall queue. Returns queue position, progress, and output paths when available.
Inputs: prompt_id, include_outputs.
comfy_list_modelsB
List available models, checkpoints, LoRAs, VAEs, and other resources in the ComfyUI models directory. Supports filtering by type and name.
Inputs: type, filter, include_size.
comfy_list_workflowsA
List all saved workflows in the MCP library. Supports filtering by name, description, or tags.
Inputs: filter, tags.
comfy_load_workflowB
Load a saved workflow from the MCP library by name. Returns the workflow JSON and metadata.
Inputs: name (required).
comfy_save_workflowC
Save a workflow JSON to the MCP library for later reuse. Includes metadata like description and tags for organization.
Inputs: name (required), workflow (required), description, tags, +1 more.
comfy_submit_workflowB
Submit a complete workflow JSON to ComfyUI for execution. Supports parameter overrides for dynamic modifications without editing the workflow structure.
Inputs: workflow (required), overrides, client_id.
comfy_upload_imageC
Upload an image to ComfyUI's input folder for use in workflows. Supports custom filenames and overwrite control.
Inputs: image_path (required), filename, overwrite.
comfy_wait_for_completionA
Block until a generation completes or fails. Returns final outputs with image paths. Useful for synchronous workflows.
Inputs: prompt_id (required), timeout, poll_interval.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool has a clearly distinct purpose with no ambiguity. For example, comfy_generate_simple is for quick image generation, comfy_submit_workflow handles complete workflow execution, and comfy_get_status monitors progress, all targeting different aspects of the ComfyUI workflow lifecycle. The descriptions clearly differentiate between queue management, workflow management, generation, and output handling.
All tools follow a consistent comfy_verb_noun pattern with snake_case throughout. The naming convention is predictable and readable, such as comfy_list_workflows, comfy_save_workflow, and comfy_cancel_generation. This uniformity helps agents easily identify and select the appropriate tools.
With 14 tools, the count is well-scoped for managing ComfyUI workflows, covering generation, queue management, workflow storage, and output retrieval. Each tool earns its place by addressing specific needs in the image generation pipeline, from submission to completion, without being excessive or insufficient.
The tool surface provides complete coverage for the ComfyUI domain, including CRUD operations for workflows (list, load, save, delete), generation lifecycle (submit, cancel, wait, status), queue management (get, clear), and output handling (get images, upload image). There are no obvious gaps, enabling agents to handle end-to-end workflows seamlessly.
Maintenance
Related MCP Connectors
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Connect Claude or any MCP client to Wireflow, the AI canvas for image, video and audio workflows. List, build, inspect and run your workflows and published apps, browse templates, check models, prices and credits, edit a video node's timeline, and plan or schedule social posts. Drafts and edits cost no credits; run tools spend the user's credits.
Connect CNAPS Studio to Claude or ChatGPT, then just say what you want. "Upscale this photo 4x" or "remove the background and make it a short video". It picks the models, builds the flow, runs it, and gives you the file back in the same chat. 80+ AI models and 80+ tools for image, video and audio. Sign in with your CNAPS account (OAuth), no API key needed. n8n and Zapier work too. Setup guide: https://docs.cnaps.ai/ai-assistant
Generate images and video from Claude with one API key.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables comprehensive ComfyUI workflow automation including image generation, workflow management, node discovery, and system monitoring through natural language interactions with local or remote ComfyUI servers.3152 PyPI14MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with local ComfyUI installations to list nodes, validate workflows, and execute image generation workflows directly without requiring an HTTP server.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to generate images through a local ComfyUI instance using Stable Diffusion and SDXL models via natural language. Users can trigger image generation, list available checkpoint models, and monitor the ComfyUI queue status directly from their MCP client.MIT
- FlicenseNot gradedqualityDmaintenanceBridges Claude Desktop to local and remote ComfyUI instances, enabling health checks, model listing, workflow queuing, status polling, and output retrieval.-