About ComfyUI MCP Server
ComfyUI MCP Server provides image generation and prompt optimization for creators using ComfyUI workflows. It returns both local file paths and online-accessible URLs.
Key features
- 01Generate images from text prompts
- 02Optimize image-generation prompts
- 03Adjust image dimensions automatically
- 04Return local paths and online URLs
Use cases
- 01Create images from text prompts
- 02Refine prompts for generation workflows
MCP support
The MCP server exposes ComfyUI image generation and prompt optimization as tools for MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEComfyUI MCP Server
A Model Context Protocol (MCP) server for ComfyUI that provides image generation and prompt optimization services.
Features
- Image Generation: Generate images using ComfyUI text_to_image workflows
- Prompt Optimization: Optimize image generation prompts for better results
Server Architecture
-
Core Components:
- FastMCP framework implementation
- ComfyUI API integration
- Polling mechanism for result retrieval
-
Key Functions:
generate_image: Creates images from text promptsoptimize_image_prompt: Enhances input prompts for better generation results
-
Technical Specifications:
- Automatic image dimension adjustment (multiples of 8)
- Random seed generation for diverse outputs
- Returns both local file paths and online accessible URLs
Configuration
{
"mcpServers": {
"ComfyUI_MCP_Server": {
"disabled": false,
"timeout": 600,
"command": "python",
"args": [
"D:\\code\\comfyui_mcp_server\\server.py"
],
"env": {
"COMFY_URL": "http://127.0.0.1:8188/"
},
"transportType": "stdio"
}
}
}
Requirements
- Python 3.7+
- ComfyUI instance running
- FastMCP library installed
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.