Uses TOML configuration files to specify ComfyUI base URL, workflow paths, and asset directories for orchestrating ComfyUI workflows
ComfyUI_MCP
An experimental Model Context Protocol (MCP) server that orchestrates ComfyUI workflows. It discovers workflow templates, applies high-level mutations, submits prompts to a running ComfyUI instance, and offers lightweight tooling for local experimentation.
Quick Start
Create a configuration file (see
config.example.toml) and update the ComfyUI base URL plus any asset directories you keep on disk.Install the package in editable mode:
pip install -e .Interact with the helper CLI:
# List available workflow templates comfyui-mcp list --json # Describe a specific workflow comfyui-mcp describe basic_workflow --json # Inspect discovered checkpoints/LoRAs/VAEs comfyui-mcp assets --jsonYou can override configuration values at runtime without editing the TOML file. For example:
comfyui-mcp list --base-url http://localhost:8188 --workflows-path ~/custom-workflows \ --directory checkpoints=~/models/StableDiffusion --jsonLaunch the MCP server runtime using FastMCP:
comfyui-mcp-serve --config path/to/config.toml --transport stdioThe runtime exposes tools for listing, describing, customising, and executing workflows. Choose
--transport streamable-httpif you need an HTTP endpoint rather than stdio.To integrate with MCP-compatible IDEs (e.g., Cursor), copy
mcp.jsoninto the location they expect and adjust the configuration path or transport as needed. The file declares the stdio command to launchcomfyui-mcp-serve, making it easy for third-party clients to connect.
The server loads workflow templates from the workflows/ directory by default and scans configured asset directories (checkpoints,
LoRAs, VAEs, text encoders, embeddings). Asset validation helps catch typos before submitting prompts to ComfyUI.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables orchestration of ComfyUI workflows through natural language by discovering workflow templates, applying mutations, and submitting prompts to running ComfyUI instances. Provides asset validation and lightweight tooling for AI image generation experimentation.