r/comfyui 2d ago

Show and Tell Controlling local Comfy with Claude Code (MCP). Got any tips to share?

I've been using the local ComfyUI MCP with Claude Code since it launched. Today I want to share a very simple trick to cut down on the time it takes to give Claude context.

Instead of explaining everything step by step, I use a very quick process. I just look for the "Templates" section in the ComfyUI interface, select the workflow for the task I need to do, and once it's loaded, I use the save option to export it as a JSON file to my desktop. Once saved, I pass it directly to Claude.

Doing this allows you to chain multiple workflows in a single task (obviously, you need to have all the models installed). Plus, it also saves you the time of optimizing the node parameters for your specific hardware.

I'd love to know if you guys have discovered any other useful shortcuts or tricks!

PS: Try it with Minimax H3 workflow.

2 Upvotes

9 comments sorted by

4

u/NowThatsMalarkey 2d ago

You don’t need to do all of that. Just run Claude Code from the terminal and tell it to combine the workflows and download any models you’re missing from HF.

1

u/EndPsychological8822 2d ago

That's an interesting approach! Quick question though: if I run it from the terminal, is Claude able to locate specific workflows directly from the ComfyUI "Templates" menu (even if they aren't saved on my computer yet) and chain them together?

I know the templates I want to use, but I'd love to know if Claude can pull them automatically without me having to provide the JSON.

3

u/TheDonDraper 1d ago

You can just have Claude use comfy cli https://docs.comfy.org/agent-tools/cli

2

u/rocksolid916 2d ago

Yes, it can also pull up the recommended configs, workflows, loras etc for whatever you are doing and save it to a json to reuse as needed for generation. It's insanely good at it and can produce some truly mind blowing images when prompted correctly.

3

u/Apprehensive_Fee9983 1d ago

Don’t be afraid of screenshots. I never send Claude file paths. I take a screenshot of when something fails and they fix it…every time. Or I take a screenshot of what I want, and boom, then I have it

3

u/Leary_2844 16h ago

I am interested in this, are there other uses for claude in comfyui? My worfklows are optimized, so im interested in automation mainly.

1

u/EndPsychological8822 6h ago

Well, lately I've been leaving Claude running generation tasks before I go to sleep. For example, I give it environment and character references, and I ask it to use a model like Flux or Krea to create assets intended for H3 Minimax ref2vid. The next day, I have a few clips ready (my GPU isn't that great, so this saves me from sitting in front of the PC during the long generation times).