comfy-workflow-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-workflow-mcprun my portrait workflow with a red fox in the snow and seed 7"
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-workflow-mcp
Run the workflows saved in a ComfyUI server as tools for any MCP agent (Claude Code, Claude Desktop, Cursor, your own agent).
Build and tune a workflow in the ComfyUI editor and save it. Agents can then list it, see its inputs, and run it with their own prompt, images and seed. Edit the workflow and save again: the next run uses the new version, because the saved file is loaded on every run.
Works with a local or remote ComfyUI, and with a vast.ai instance found from your API key.
Source-available, not open source. The code is public to read and evaluate. Using, copying, modifying or redistributing it needs written permission from the owner (jinsoo96); PlateerLab members have it within Plateer products. See LICENSE.
Tools
Tool | What it does |
| Which server, ComfyUI version, GPU, free VRAM, queue length |
| Workflows saved in the editor |
| Each node's id, title, class and the values you can change; which nodes take images, which produce outputs, which seeds re-roll |
| Run with your values. Returns a |
|
|
| Put a local image in the server's input folder |
| Model folders, or the files in one ( |
Inputs are addressed as <node id | title | class>.<input>:
{
"name": "portrait.json",
"set": {"Positive.text": "a red fox in the snow", "KSampler.seed": 7, "EmptyLatentImage.width": 1024},
"images": {"Reference": "C:/pics/fox.png"},
"enable": ["Turbo LoRA"],
"wait_seconds": 25
}A title wins over a class name, so give the nodes you want agents to touch a clear title in the editor (Positive, Reference). If a name matches more than one node, the error lists the ids to use instead. images takes a local file (uploaded for you) or a file name already on the server. enable / bypass switch nodes on or off for that run only. Seeds saved as "randomize" get a new value each run unless you set them.
Related MCP server: ComfyUI MCP Server
Install
pip install git+https://github.com/PlateerLab/comfy-workflow-mcp
# or from a checkout
pip install -e .Python 3.10+. The only dependency is the mcp SDK; the ComfyUI client uses the standard library.
Configure
Variable | |
| ComfyUI base URL, e.g. |
| Basic auth / bearer token / extra headers as JSON, if your server needs them |
| Instead of |
| Which instance (default: the first running one that exposes the port) |
| ComfyUI's container port on the instance (default |
| Where results are saved (default |
| Longest a single call blocks, in seconds (default |
On vast.ai the ComfyUI template puts basic auth in front of the port: user vastai, password = the instance's Jupyter token. The server reads both from the vast.ai API, so the address and token stay right when you recreate the instance.
Claude Code / Claude Desktop
{
"mcpServers": {
"comfy": {
"command": "comfy-workflow-mcp",
"env": {"VAST_API_KEY": "...", "COMFY_DOWNLOAD_DIR": "D:/comfy_outputs"}
}
}
}How it works
ComfyUI saves workflows in the editor format (nodes, positional widget values, numbered links). The /prompt endpoint needs the API format (named inputs). The server converts one into the other on every run, using the server's own /object_info to name the widgets, so any installed custom node works without a mapping table.
The conversion handles bypassed nodes (links pass through), muted nodes, notes, Reroute, legacy PrimitiveNode values, the seed "control after generate" slot, and widgets converted to inputs. API-format files saved in the workflows folder run as they are. Subgraphs and group nodes are not supported yet: unpack them in the editor and save again.
The editor workflow is sent along with each run, so every output PNG opens as the exact canvas that made it.
Security
The vast.ai API key can control your whole account. This server only reads the instance list (
GET /instances); it never creates, stops or deletes anything. The key and the instance token are not logged or returned by any tool.Agents can run any saved workflow and read the server's model and input lists. Point the server at a ComfyUI you are happy to share with the agent.
Development
pip install -e ".[dev]"
pytestThe tests cover the conversion offline with a hand-made /object_info.
License
Source-available, all rights reserved: LICENSE. Reading, evaluating and citing are allowed; any other use needs written permission from the owner (jinsoo96, wlstn010203@gmail.com, or an issue on this repository). PlateerLab/comfy-workflow-mcp is the origin; jinsoo96/js-comfy-workflow-mcp mirrors it automatically.
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
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.3136 PyPI14MIT
- AlicenseNot gradedqualityDmaintenanceDynamically loads ComfyUI workflows as MCP tools, enabling AI assistants to generate images, videos, and audio by executing workflows across categories like text-to-image, image-to-video, and text-to-audio with automatic parameter mapping and progress monitoring.16,985 npm3MIT
- AlicenseAqualityCmaintenanceMCP server that lets AI agents drive a remote ComfyUI instance end-to-end, including queueing workflows, viewing outputs, downloading models, and authoring graphs via ComfyScript.1616,985 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to generate images and videos through natural language by exposing ComfyUI workflows as parameter-configurable MCP tools.10MIT