comfyui-mcp
comfyui-mcp
为 ComfyUI 设计的模型上下文协议(Model Context Protocol, MCP)服务器。将本地(或托管的 Comfy Cloud)工作流暴露为工具接口,使聊天代理、日志和仪表盘能够生成图像、视频、音频和 3D 内容。
功能
运行任意 API 格式的工作流,支持参数注入
将输出以文件形式流式返回(图像 / 视频 / 音频)
管理队列、中断任务、释放 VRAM
列出已安装的自定义节点和模型
上传图像用于 img2img / inpaint
通过
comfy-cli安装自定义节点和模型
Related MCP server: Agent Construct
架构
┌─────────────────────────┐ 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。
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.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA lightweight MCP server that bridges AI agents with a local ComfyUI instance to generate and iteratively refine images, audio, and video through conversational tool calls.41MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- FlicenseNot gradedqualityBmaintenanceMCP server that connects local ComfyUI to AI agents, enabling natural language control of ComfyUI for creating workflows, generating images, and managing the queue.
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to control a local ComfyUI instance for image generation, allowing workflow understanding, parameter modification, execution, and model discovery.242Apache 2.0
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Franzferdinan51/comfyui-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server