79 lines
1.8 KiB
Markdown
79 lines
1.8 KiB
Markdown
# ComfyUI MCP
|
|
|
|
**Type:** Docker / npm
|
|
**Group:** Image
|
|
**Port:** 8000
|
|
|
|
## Description
|
|
|
|
Connects to ComfyUI for image generation workflows and processing.
|
|
|
|
## Deployment Options
|
|
|
|
### Option 1: Inside MCP Gateway (Docker-in-Docker)
|
|
|
|
Runs as a Docker container spawned by the MCP Gateway:
|
|
|
|
**Configuration (pre-set):**
|
|
- Image: `ghcr.io/richardi-ai/comfyui-mcp-server:latest`
|
|
- Command: `--port 8000`
|
|
- Connects to ComfyUI at `http://comfyui:8188`
|
|
|
|
### Option 2: Local npm (for testing)
|
|
|
|
```bash
|
|
# Run locally
|
|
npx -y @richardi-ai/comfyui-mcp-server --port 8000
|
|
|
|
# Or with custom ComfyUI URL
|
|
npx -y @richardi-ai/comfyui-mcp-server --port 8000 \
|
|
--base-url http://192.168.1.40:18002
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
```bash
|
|
COMFYUI_URL=http://comfyui:8188
|
|
COMFYUI_WS_URL=ws://comfyui:8188
|
|
```
|
|
|
|
## Features
|
|
|
|
- Generate images via ComfyUI workflows
|
|
- Submit workflow JSON to ComfyUI
|
|
- Check workflow status
|
|
- Retrieve generated images
|
|
- WebSocket support for real-time updates
|
|
- Integrated with Claude.ai custom connector
|
|
|
|
## ComfyUI Integration
|
|
|
|
This MCP server connects to the existing ComfyUI instance:
|
|
- **Base URL:** `http://comfyui:8188` (internal Docker network)
|
|
- **Public URL:** `http://192.168.1.40:18002`
|
|
|
|
## Usage in Claude.ai
|
|
|
|
Available tools:
|
|
- `comfyui_generate` - Generate images with ComfyUI
|
|
- `comfyui_workflow` - Submit workflow JSON
|
|
- `comfyui_status` - Check workflow status
|
|
- `comfyui_history` - Get generation history
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
# Test locally (adjust URL if needed)
|
|
COMFYUI_URL=http://192.168.1.40:18002 \
|
|
npx -y @richardi-ai/comfyui-mcp-server --port 8000
|
|
|
|
# Verify health
|
|
curl http://localhost:8000/health
|
|
```
|
|
|
|
---
|
|
|
|
**Documentation:** `/opt/stacks/ai/mcp-servers/comfyui/`
|
|
**Gateway UI:** `https://mcp.nuclide.systems/ui` (OAuth required)
|
|
**ComfyUI:** `http://192.168.1.40:18002`
|