Labsco
MCP SERVER

ComfyUI MCP Server

by zjf2671

Generate and edit images through your own local ComfyUI, with your exported workflows loaded as resources and prompt and size swapped in per call.

Image Generation
Summary
Your ComfyUI graphs, called by name from a chat.

The design keeps the hard part where it belongs: the workflow is authored and debugged in ComfyUI, and this only swaps prompt and size into it. That means the first job is exporting your graph in API format and confirming it runs in ComfyUI on its own — the sample workflows also need a plugin installed on the ComfyUI side, which the README links a walkthrough for.

What it is

A bridge between an assistant and a ComfyUI instance running on your machine. Workflow JSON files in a directory are loaded at startup and exposed as resources; a request picks one and substitutes the prompt and dimensions into it.

What you get
  • Text-to-image generation against whichever workflow you select
  • Image-to-image, background removal and Kontext image editing, using the sample workflows shipped with the project
  • Prompt and size are replaced inside the workflow at call time, so one workflow file serves many requests
  • Every JSON workflow in the workflows directory is registered as a resource when the server starts — drop a new file in and restart
  • Defaults are the t2image_bizyair_flux workflow at 1024x1024
Requirements

Python 3.12 or newer and a running ComfyUI instance — the default address is http://127.0.0.1:8188, set with COMFYUI_API_BASE. Install as `uvx hh-mcp-comfyui`, `pip install hh_mcp_comfyui`, or the container image zjf2671/hh-mcp-comfyui. COMFYUI_WORKFLOWS_DIR points at your workflow folder; your own workflows must be exported from ComfyUI in API JSON format.

Setup effort

One command — uvx hh-mcp-comfyui