comfyui-mcp
comfyui-mcp
为 ComfyUI 设计的模型上下文协议(Model Context Protocol, MCP)服务器。将本地(或托管的 Comfy Cloud)工作流暴露为工具接口,使聊天代理、日志和仪表盘能够生成图像、视频、音频和 3D 内容。
功能
运行任意 API 格式的工作流,支持参数注入
将输出以文件形式流式返回(图像 / 视频 / 音频)
管理队列、中断任务、释放 VRAM
列出已安装的自定义节点和模型
上传图像用于 img2img / inpaint
通过
comfy-cli安装自定义节点和模型
Related MCP server: comfy-mcp
架构
┌─────────────────────────┐ stdio / Streamable HTTP / REST ┌──────────────────┐
│ Chat agent / dashboard │ ────────────────────────────────▶ │ comfyui-mcp │
│ (Hermes, Claude, etc.) │ ◀──────────────────────────────── │ (Python) │
└─────────────────────────┘ └──────────────────┘
│
▼
┌──────────────────┐
│ ComfyUI server │
│ 127.0.0.1:8188 │
│ (or Cloud) │
└──────────────────┘提供三种传输方式:
传输方式 | URL | 使用场景 |
stdio | 无 | Claude Desktop、Hermes、任何 MCP-stdio 客户端 |
HTTP REST |
| curl、webhook、仪表盘 |
Streamable HTTP MCP |
| 浏览器端 MCP 客户端 |
隐私
本仓库完全公开。代码库中不包含任何密钥信息。 所有后端凭据在运行时通过环境变量配置(参见 .env.example):
COMFYUI_HOST— 本地 ComfyUI 服务器的主机:端口COMFY_CLOUD_API_KEY— 若设置,则目标地址为platform.comfy.orgCOMFYUI_AUTH_TOKEN— 自托管服务器的可选 Bearer 令牌
发布的代码不会接触到您的 API 密钥。
暴露的工具
工具 | 用途 |
| Ping /system_stats |
| 提交带参数的工作流 JSON |
| 通过 prompt_id 获取生成的图像/视频 |
| 查看队列 |
| 取消正在运行的任务 |
| 卸载模型 |
| 列出已安装的自定义节点 |
| 列出已安装的 checkpoint、lora、vae 等 |
| 上传图像用于 img2img / inpaint |
| 安装自定义节点 |
| 下载模型 |
快速开始
git clone https://github.com/Franzferdinan51/comfyui-mcp
cd comfyui-mcp
cp .env.example .env
# edit .env to point at your ComfyUI server
pip install -r requirements.txt
./scripts/comfyui-mcp.bat # or python scripts/comfyui_mcp_server.pyComfyUI 必须在配置的主机:端口上运行(默认为 127.0.0.1:8188)。
为 curl/仪表盘使用启动 HTTP 桥接:
python scripts/comfyui_http_bridge.py
# → http://localhost:9300启动 Streamable HTTP MCP 传输:
python scripts/comfyui_streamable_http.py
# → http://localhost:9300/mcp许可证
MIT — 可自由分叉,署名回 Franzferdinan51 / Duckets。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Official hosted MCP server for Wiro AI. Run 1,000+ image, video, audio and LLM models, build and run workflows that chain them, and deploy and talk to AI agents from any MCP client.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to control a local ComfyUI instance for image generation, allowing workflow understanding, parameter modification, execution, and model discovery.3-
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that bridges AI agents with a local ComfyUI instance, enabling them to generate and iteratively refine images, audio, and video through conversational tool calls.23 npmMIT
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes ComfyUI image and 3D generation as a single tool with smart prompt classification. It enables AI assistants to generate assets directly by selecting and running the appropriate ComfyUI workflow.-