comfy-mcp
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., "@comfy-mcpload the 'portrait' workflow, set prompt to 'a beautiful sunset', and execute it"
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.
comfy-mcp
MCP (Model Context Protocol) server for controlling a local ComfyUI instance from AI agents like Claude Cowork or Claude Code.
Lets an agent understand, modify, and execute ComfyUI workflows — enabling iterative AI-assisted image generation. Should work with any MCP-compatible agent, though it was built with Claude Cowork in mind.
Features
Workflow understanding — Parse workflow JSON and get a human-readable description of nodes, connections, and parameters
Parameter modification — Change prompts, seeds, models, samplers, resolution, and any other workflow parameter
PNG workflow extraction — Extract embedded workflow metadata from ComfyUI-generated PNG images
Workflow execution — Submit workflows, track progress, and retrieve generated images inline
Reproducible outputs — Output PNGs have workflow metadata embedded automatically, so images can be dragged back into ComfyUI to reproduce or tweak results with all nodes, connections, and widget values intact
Model discovery — List available checkpoints, LoRAs, VAEs, ControlNet models, samplers, and schedulers
Image upload — Upload input images for img2img, ControlNet, and other input-dependent workflows
Queue management — Monitor, cancel, and clear the execution queue
Workflow storage — Save and load workflows locally for reuse
Related MCP server: ComfyUI MCP
Platform support
Developed and tested on Windows. Should work on macOS and Linux but this has not been tested.
Requirements
Node.js 22+
A running ComfyUI instance
Setup
npm install
npm run buildConfiguration
Add to your MCP client settings. For Claude Code / Claude Cowork, add to .claude/settings.json:
{
"mcpServers": {
"comfyui": {
"command": "node",
"args": ["C:\\path\\to\\comfy-mcp\\dist\\index.js"],
"env": {
"COMFYUI_HOST": "127.0.0.1:8000"
}
}
}
}For development, use tsx instead:
{
"mcpServers": {
"comfyui": {
"command": "npx",
"args": ["tsx", "C:\\path\\to\\comfy-mcp\\src\\index.ts"],
"env": {
"COMFYUI_HOST": "127.0.0.1:8000"
}
}
}
}Set COMFYUI_HOST to match your ComfyUI instance (default: 127.0.0.1:8000).
Tools
Tool | Description |
| GPU, VRAM, RAM, and system info |
| Available node types and their schemas |
| Checkpoints, LoRAs, VAEs, and other model files |
| Human-readable workflow analysis |
| Modify workflow parameters by node ID |
| Find nodes by class type or title |
| Extract workflow from PNG metadata |
| Run a workflow and return images (with embedded metadata for reproducibility) |
| Check job status |
| Retrieve output images |
| Upload input images to ComfyUI |
| Download images from ComfyUI |
| View running and pending jobs |
| Stop a running job |
| Clear all pending jobs |
| View execution history |
| Save workflow to local storage |
| Load a saved workflow |
| List saved workflows |
Typical usage flow
Extract a workflow from a PNG or load a saved one
Describe the workflow to understand its structure
Check available models
Modify parameters (prompt, seed, model, etc.)
Execute and view the result
Drag the output PNG back into ComfyUI to reproduce or continue iterating
PNG metadata
Output images automatically embed the full workflow in ComfyUI-compatible PNG metadata. This means any image generated through this server can be dragged directly into the ComfyUI canvas to restore all nodes, connections, and widget values. If you provide the original UI-format workflow (via the ui_workflow parameter), exact node positions and group labels are preserved; otherwise, the server auto-generates a clean left-to-right layout from the API-format workflow.
Environment variables
Variable | Default | Description |
|
| ComfyUI API host and port |
|
| Local workflow storage directory |
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
MCP server for Qwen Image 3 AI image generation
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for Producer/Riffusion AI music generation
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA lightweight MCP server that bridges AI agents with a local ComfyUI instance to generate and iteratively refine images, audio, and video through conversational tool calls.18 npmMIT
- FlicenseNot gradedqualityDmaintenanceMCP server that connects local ComfyUI to AI agents, enabling natural language control of ComfyUI for creating workflows, generating images, and managing the queue.-
- AlicenseBqualityBmaintenanceAn MCP server that bridges AI agents with ComfyUI for automated workflow building, execution, monitoring, and output routing.961MIT
- AlicenseNot gradedqualityBmaintenanceA lightweight MCP server that bridges AI agents with a local ComfyUI instance, enabling them to generate and iteratively refine images, audio, and video through conversational tool calls.15 npmMIT