https://github.com/zuojianghua/comfyui_mcp_server
generate_image and other workflows
https://github.com/zuojianghua/comfyui_mcp_server
Last synced: about 2 months ago
JSON representation
generate_image and other workflows
- Host: GitHub
- URL: https://github.com/zuojianghua/comfyui_mcp_server
- Owner: zuojianghua
- Created: 2025-04-07T07:28:41.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-18T10:29:12.000Z (7 months ago)
- Last Synced: 2025-04-19T00:20:15.110Z (7 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-servers - **comfyui_mcp_server** - generate_image and other workflows `python` `pip install git+https://github.com/zuojianghua/comfyui_mcp_server` (🤖 AI/ML)
- awesome-mcp-servers - **comfyui_mcp_server** - generate_image and other workflows `python` `pip install git+https://github.com/zuojianghua/comfyui_mcp_server` (AI/ML)
README
# ComfyUI 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
1. **Core Components**:
- FastMCP framework implementation
- ComfyUI API integration
- Polling mechanism for result retrieval
2. **Key Functions**:
- `generate_image`: Creates images from text prompts
- `optimize_image_prompt`: Enhances input prompts for better generation results
3. **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
```json
{
"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