ComfyMCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ComfyMCPGenerate a cat astronaut in space"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ComfyMCP
Give Claude the ability to generate images with ComfyUI. Just ask for what you want in natural language.
You: "Generate an image of a robot painting a sunset"
Claude: I'll create that image for you.
[builds 7-node workflow, executes it]
Done! Generated robot_painting_00001.png in 2.3 seconds.What You Can Ask
Once installed, Claude can handle requests like:
Image Generation
"Generate an image of a cat astronaut floating in space"
"Create a 1024x1024 fantasy landscape using SDXL"
"Make a portrait with negative prompt 'blurry, low quality'"
Model & System Info
"What checkpoint models do I have?"
"Show me the available samplers"
"What's my GPU memory usage?"
Workflow Control
"Use 30 steps instead of 20 for better quality"
"Generate 4 variations with different seeds"
"What's the status of my last generation?"
Claude handles all the complexity—discovering nodes, building connections, validating the workflow, and monitoring execution.
Related MCP server: ComfyUI MCP Server
How It Works
When you ask Claude to generate an image, it builds a complete ComfyUI workflow:
[1] CheckpointLoaderSimple ─────────────────────────────┐
├── MODEL ──────────────────────────────────────────┤
├── CLIP ───┬──→ [3] CLIPTextEncode (positive) ────┤
│ └──→ [4] CLIPTextEncode (negative) ────┤
└── VAE ────────────────────────────────────────────┤
▼
[2] EmptyLatentImage ──────────────────────────→ [5] KSampler
│
▼
[6] VAEDecode
│
▼
[7] SaveImageThis happens automatically. Claude:
Discovers available nodes and their inputs/outputs
Builds the workflow with proper connections
Validates everything before execution
Queues the job and monitors completion
Reports the output filename
Installation
Prerequisites
# Install uv if needed
curl -LsSf https://astral.sh/uv/install.sh | shClaude Code (CLI)
claude mcp add comfyui \
--transport stdio \
--env COMFYUI_HOST=127.0.0.1 \
--env COMFYUI_PORT=8188 \
-- uvx --from git+https://github.com/hernantech/comfymcp comfymcpClaude Desktop
Add to your config file:
Linux:
~/.config/claude/claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"comfyui": {
"command": "uvx",
"args": ["--from", "git+https://github.com/hernantech/comfymcp", "comfymcp"],
"env": {
"COMFYUI_HOST": "127.0.0.1",
"COMFYUI_PORT": "8188"
}
}
}
}Verify Installation
Ask Claude: "Check if ComfyUI is connected"
You should see confirmation that the server is online with GPU info.
Configuration
Environment Variable | Description | Default |
| ComfyUI server address | 127.0.0.1 |
| ComfyUI server port | 8188 |
| API key (if required) | None |
For remote ComfyUI servers, update the host:
claude mcp add comfyui \
--env COMFYUI_HOST=192.168.1.100 \
...Reference
Available MCP Tools
Tool | Description |
| Submit a workflow for execution |
| Check running/pending jobs |
| Get status of a specific job |
| View execution history |
| Stop current generation |
| Clear pending jobs |
Tool | Description |
| Start a new workflow session |
| Add a node with inputs |
| Finalize and validate |
| Check for errors |
| Search available nodes |
| Get node specifications |
| Reload node definitions |
Tool | Description |
| List checkpoints, LoRAs, VAEs, etc. |
| List textual inversions |
| List generated images |
| Retrieve an image |
| Upload for img2img |
Tool | Description |
| Verify ComfyUI is reachable |
| GPU memory, system info |
| Unload models, clear cache |
| List installed extensions |
MCP Resources
URI | Description |
| All available nodes |
| Node categories |
| Specific node definition |
| Recent outputs |
| Retrieve image |
Python API
For programmatic use outside of MCP:
from comfymcp.workflow import WorkflowBuilder
builder = WorkflowBuilder()
# Nodes return refs with named outputs
checkpoint = builder.add_node("CheckpointLoaderSimple",
ckpt_name="sd_turbo.safetensors")
latent = builder.add_node("EmptyLatentImage",
width=512, height=512, batch_size=1)
positive = builder.add_node("CLIPTextEncode",
clip=checkpoint.CLIP, # Named output connection
text="a beautiful sunset")
negative = builder.add_node("CLIPTextEncode",
clip=checkpoint.CLIP,
text="ugly, blurry")
sampler = builder.add_node("KSampler",
model=checkpoint.MODEL,
positive=positive.CONDITIONING,
negative=negative.CONDITIONING,
latent_image=latent.LATENT,
seed=42, steps=4, cfg=1.0,
sampler_name="euler", scheduler="normal", denoise=1.0)
decode = builder.add_node("VAEDecode",
samples=sampler.LATENT,
vae=checkpoint.VAE)
builder.add_node("SaveImage",
images=decode.IMAGE,
filename_prefix="output")
workflow = builder.build()Templates
from comfymcp.templates import Text2ImgTemplate, Img2ImgTemplate
# Text to image
txt2img = Text2ImgTemplate(
checkpoint="sd_turbo.safetensors",
positive_prompt="a majestic mountain",
negative_prompt="ugly, blurry",
width=512, height=512,
steps=4, cfg=1.0
)
workflow = txt2img.build()
# Image to image
img2img = Img2ImgTemplate(
checkpoint="sd_turbo.safetensors",
image="input.png",
positive_prompt="enhance details",
denoise=0.6
)
workflow = img2img.build()Direct Client Usage
from comfymcp.client import ComfyUIClient
async with ComfyUIClient(host="127.0.0.1", port=8188) as client:
# Queue workflow
result = await client.queue_prompt(workflow)
# Check status
history = await client.get_history(prompt_id=result.prompt_id)
# List models
checkpoints = await client.get_models("checkpoints")Requirements
Python 3.10+
ComfyUI server running
MCP-compatible client (Claude Code, Claude Desktop, Cursor, etc.)
License
MIT License - see LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hernantech/comfymcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server