mcp-comfyui
Bridges Claude Desktop to local and remote ComfyUI instances, enabling health checks, model listing, workflow queuing, status polling, and output retrieval.
README
mcp-comfyui
MCP server bridging Claude Desktop to local and remote ComfyUI instances, including Comfy Cloud.
Tools
| Tool | Description |
|---|---|
comfyui_health |
Check server reachable + response time |
comfyui_list_models |
List models by type (checkpoints, loras, etc.) |
comfyui_queue_prompt |
Queue a workflow, get prompt ID back immediately |
comfyui_poll_status |
Poll prompt status (queued / running / completed / error / cancelled) |
comfyui_get_outputs |
Get output file paths or download URLs after completion |
Requirements
- Python 3.11+
- Local ComfyUI instance or a Comfy Cloud subscription
Install
pip install -r requirements.txt
Configuration
Server config format
Each entry in COMFYUI_SERVERS is either a plain URL string (local, no auth) or a dict:
{
// String shorthand — local ComfyUI, no auth
"default": "http://localhost:8188",
// Dict — full options
"remote": { "url": "http://192.168.1.100:8188", "mode": "local" },
"cloud": { "url": "https://cloud.comfy.org", "api_key": "YOUR_KEY", "mode": "cloud" }
}
mode is "local" (default) or "cloud". api_key is required for Comfy Cloud.
If COMFYUI_SERVERS is absent, defaults to {"default": "http://localhost:8000"}.
Via .env file
cp .env.example .env
# edit .env
Via Claude Desktop config
~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"comfyui": {
"command": "/opt/miniconda3/bin/python3",
"args": ["/path/to/mcp-comfyui/server.py"],
"env": {
"COMFYUI_SERVERS": "{\"default\": \"http://localhost:8188\", \"cloud\": {\"url\": \"https://cloud.comfy.org\", \"api_key\": \"YOUR_KEY\", \"mode\": \"cloud\"}}"
}
}
}
}
Omit env to use .env file instead.
Typical Workflow
comfyui_health— confirm server upcomfyui_list_models— find available checkpoints/LoRAscomfyui_queue_prompt— submit workflow JSON, getprompt_idcomfyui_poll_status— repeat untilstatus = completedcomfyui_get_outputs— get file paths (local) or/api/viewdownload URLs (cloud)
Mode Differences
| Behaviour | Local | Cloud |
|---|---|---|
| Health probe | GET /system_stats |
GET /api/queue |
| Auth | none | X-API-Key header |
| Submit workflow | POST /api/prompt |
POST /api/prompt |
| Poll status | /history/{id} + /queue |
/api/job/{id}/status |
| Status values | queued / running / completed / error | + cancelled |
| Outputs | absolute filesystem paths | /api/view?filename=… URLs (302 → signed URL) |
| Model listing | /api/models/{type} → /api/object_info fallback |
same |
Manual Test
/opt/miniconda3/bin/python3 -c "
import asyncio
from server import comfyui_health, comfyui_list_models, ServerInput, ListModelsInput
async def main():
print(await comfyui_health(ServerInput(server='default')))
print(await comfyui_list_models(ListModelsInput(server='default', filter='checkpoints')))
asyncio.run(main())
"
Notes
comfyui_queue_promptexpects valid ComfyUI API-format workflow JSON. No validation performed.- Local output paths built from
--output-directoryflag reported in/system_stats. - Cloud outputs: caller must follow the 302 redirect from
/api/viewto reach the signed storage URL. - Stdio transport only — this server opens no network ports.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.