comfyui-mcp-server

comfyui-mcp-server

61

The ComfyUI MCP Server is a Python-based server that allows AI agents to programmatically generate images via requests to a local ComfyUI instance using the MCP protocol. It supports flexible workflows and dynamic parameters for image generation.

Overview

This project enables AI agents to send image generation requests to ComfyUI using the MCP protocol over WebSocket. It supports:

  • Flexible workflow selection.
  • Dynamic parameters: prompt, width, height, and model.
  • Returns image URLs served by ComfyUI.

Prerequisites

  • Python 3.10+.
  • ComfyUI: Installed and running locally.
  • Dependencies: requests, websockets, mcp.

Setup

  1. Clone the Repository.
  2. Install Dependencies.
  3. Start ComfyUI.
  4. Prepare Workflows.

Usage

  1. Run the MCP Server.
  2. Test with the Client.
  3. Custom Requests.