MCP Config Generator
The node that hands your ComfyUI to Claude and Gemini
- status_text
- json_config
Letting a chat agent drive ComfyUI is a great party trick and a genuinely useful one - tell Claude "make me a set of calendar images" and it fires off text-to-image jobs, polls for the results, and builds the collage itself. The fiddly part is wiring up the MCP server that makes that possible. MCP Config Generator is the setup node for the dseditor/Comfy-MCP pack, and it exists to take that fiddly part away: you flip a few toggles, run it once, and it writes the config that turns your local ComfyUI into an MCP tool your LLM can call.
Don't be confused by the name, and don't expect it to draw anything. This node generates JSON. It builds an MCP server entry called comfyui-image-generator that runs your bundled Python (python_embeded/python.exe -m comfy_mcp_server) pointed at your ComfyUI URL and a workflow file. The LLM's request goes in as a prompt, the server drops it into the workflow's text node, runs it over ComfyUI's API, and returns the image. Nothing here calls a cloud API and you don't need any key.
What actually happens when you run it
Peek at the source and the whole thing is a config writer with three jobs. First, if auto_install is on, it pip-installs the MCP server module into your python_embeded environment. Second, it writes the server config in whichever dialect you picked - config_format of ClaudeDesktop produces an mcpServers block, Gemini produces an mcp_servers block, so the exact same node feeds both ecosystems. Third, the three auto_update_* toggles push that config into Claude Code (user scope), Claude Desktop, or Gemini CLI's own settings files.
The two outputs are both strings: status_text is a log of what it installed and where it wrote files, and json_config is the generated config itself. It's an output node, so nothing wires into it - you just run it and read status_text. That's the part people miss: run the workflow, then actually look at the status message to confirm "Configuration File Generated" and that the MCP shows up in your CLI (/mcp in Gemini, or Claude's equivalent).
The inputs that matter
Only a handful deserve your attention:
- auto_install - must be enabled the first time, or the node does almost nothing useful. It defaults to off, along with every other toggle. This is the trap.
- workflow_file - the T2I workflow JSON to drive.
Noneresolves to the bundledimage_z_image_turbo.json(a Z-Image turbo text-to-image workflow). Only T2I is supported right now; drop your own exported API workflow into the pack'sworkflow/folder and it appears in the dropdown. - config_format - ClaudeDesktop or Gemini. Pick the client you actually use.
- auto_update_claude_code / auto_update_claude_desktop / auto_update_gemini_cli - enable only the ones matching tools you have installed; the others will error out and can be ignored.
- prompt_node_id / output_node_id - the node IDs of the text input and SaveImage node in your API workflow. The defaults (
45,9) match the bundled workflow; change them only if you customize. - max_poll_attempts (default 60) and poll_interval (default 2, seconds) - how long it waits for the image. On a slow GPU, raise the attempts or the agent times out.
- output_mode -
urlby default, to keep tokens down;filereturns the local path instead. (The README mentions awebpdisplay option, but the shipped code offers onlyurl/file- readmes rot.) - comfy_url - leave it as
http://127.0.0.1:8188unless your server lives elsewhere.
Install and gotchas
Grab it through ComfyUI Manager (search "MCP") or:
cd ComfyUI/custom_nodes
git clone https://github.com/dseditor/Comfy-MCP
Then restart ComfyUI. Dependencies (mcp[cli], langchain, Pillow) install through the normal custom-node mechanism - there are no model downloads in this pack, but the bundled workflow is Z-Image turbo, so you need that checkpoint and you should run the workflow once before letting an agent drive it. First-time flow: enable auto_install, run the workflow, restart ComfyUI. After that the MCP starts alongside ComfyUI each boot.
One honest warning: this node writes config into your Claude and Gemini tooling, and a local MCP server sees whatever context those tools have. ComfyUI's custom-node ecosystem has shipped malware before (the ComfyUI_LLMVISION incident), so glance at what a pack like this installs before you run it - here it's an inspectable, modest Python config writer, but the principle holds.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| workflow_file | COMBO | 2 options: None, image_z_image_turbo.json | |
| prompt_node_id | STRING | 45 | — |
| output_node_id | STRING | 9 | — |
| comfy_url | STRING | http://127.0.0.1:8188 | — |
| max_poll_attempts | INT | 6010–300 | — |
| poll_interval | INT | 21–10 | — |
| output_mode | COMBO | 2 options: url, file | |
| config_format | COMBO | 2 options: ClaudeDesktop, Gemini | |
| auto_install | BOOLEAN | false | — |
| auto_update_claude_code | BOOLEAN | false | — |
| auto_update_claude_desktop | BOOLEAN | false | — |
| auto_update_gemini_cli | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| status_text | STRING | — |
| json_config | STRING | — |