← Back to Skills Marketplace
wangxx07

Comfyui Mcp Skill

by wangxx · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
206
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install comfyui-mcp-skill
Description
Generate AI videos, create storyboards, compose and download video clips, and check task progress via ComfyUI MCP service.
README (SKILL.md)

ComfyUI MCP Skill

AI 视频生成技能,基于 ComfyUI 的 MCP 服务

功能

  • 🎬 视频生成 - 根据提示词生成 AI 视频
  • 📖 分镜生成 - 创建视频分镜脚本
  • 🎞️ 视频合成 - 合并多个视频片段
  • 📥 视频下载 - 下载生成的视频
  • 📊 进度查询 - 查看生成任务进度

技术栈

  • Python 3.10+
  • FastMCP
  • ComfyUI API
  • Docker (可选)

安装

方式 1:从 GitHub 安装

cd /root/.nanobot/workspace/skills
git clone https://github.com/lemnt-ai/comfyui-mcp-server.git comfyui-mcp-skill
cd comfyui-mcp-skill
pip install -r requirements.txt

方式 2:Docker 部署

docker-compose up -d

配置

环境变量

变量 说明 默认值
COMFYUI_HOST ComfyUI 服务器地址 localhost
COMFYUI_PORT ComfyUI 端口 8188
LOG_LEVEL 日志级别 INFO

配置文件

编辑 config/config.yaml

comfyui:
  host: localhost
  port: 8188
  timeout: 300

server:
  transport: http
  host: 0.0.0.0
  port: 18060
  path: /mcp

使用说明

启动服务

# HTTP 模式
python server.py --transport http --host 0.0.0.0 --port 18060

# stdio 模式
python server.py --transport stdio

工具调用示例

生成视频

generate_video(
    prompt="一个机器人在跳舞",
    duration=5,
    width=512,
    height=512,
    fps=12
)

查询进度

check_progress(prompt_id="xxx-xxx-xxx")

下载视频

download_video(prompt_id="xxx-xxx-xxx")

集成到 nanobot

在 nanobot 配置中添加:

{
  "mcpServers": {
    "comfyui": {
      "command": "python",
      "args": ["/root/.nanobot/workspace/skills/comfyui-mcp-skill/server.py"],
      "cwd": "/root/.nanobot/workspace/skills/comfyui-mcp-skill",
      "env": {
        "COMFYUI_HOST": "localhost",
        "COMFYUI_PORT": "8188"
      }
    }
  }
}

依赖服务

ComfyUI 安装

# 克隆 ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

# 安装依赖
pip install -r requirements.txt

# 启动
python main.py --listen 0.0.0.0 --port 8188

必要节点

  • AnimateDiff
  • ControlNet
  • IPAdapter

工作流文件

工作流配置文件位于 workflows/ 目录:

文件 说明
video_workflow.json 视频生成工作流
storyboard_workflow.json 分镜生成工作流
compose_workflow.json 视频合成工作流

常见问题

Q: 视频生成失败?

A: 检查 ComfyUI 服务是否正常运行,端口是否正确。

Q: 生成速度慢?

A: 视频生成依赖 GPU,确保有可用的 GPU 资源。

Q: 如何自定义工作流?

A: 编辑 workflows/ 目录下的 JSON 文件。

相关链接

版本历史

  • v1.0.0 - 初始版本
    • 视频生成
    • 分镜生成
    • 视频合成
    • 进度查询

创建时间:2026-03-17 版本:v1.0.0

Usage Guidance
Do not install blindly. The code will send workflows, prompts, and downloads to the COMFY_CLOUD_API endpoint (default: https://cloud.comfy.org) using an API key stored in config/settings.yaml — but the documentation claims a local ComfyUI. Before using: (1) inspect and if desired replace config/settings.yaml or set COMFY_CLOUD_API and COMFY_CLOUD_API_KEY to point to your own local ComfyUI or private endpoint; (2) remove hard-coded keys from the repo and supply your own credentials via environment variables; (3) review network calls in utils/comfy_client.py to ensure outputs/prompts are not exfiltrated to an external service you don't control; (4) if you expect a strictly local setup, modify the client to call your local ComfyUI HTTP API (COMFYUI_HOST/COMFYUI_PORT) instead of the cloud API. If you cannot confirm or control the destination of requests, treat this skill as risky for sensitive prompts or data.
Capability Analysis
Type: OpenClaw Skill Name: comfyui-mcp-skill Version: 1.0.0 The skill bundle contains functional ComfyUI integration but exhibits significant security vulnerabilities related to file handling. Specifically, 'tools/download_video.py' and 'tools/compose_video.py' are vulnerable to path traversal attacks because they use unsanitized user-provided filenames and directory paths in 'os.path.join' and 'subprocess.run' (ffmpeg) calls. While these appear to be unintentional design flaws rather than intentional malware, they present a high risk of arbitrary file writes or system manipulation if exploited.
Capability Assessment
Purpose & Capability
The SKILL.md and README describe integration with a local ComfyUI service (COMFYUI_HOST/COMFYUI_PORT) and instruct running ComfyUI locally, but the runtime client (utils/comfy_client.py) posts to COMFY_CLOUD_API and uses COMFY_CLOUD_API_KEY. The repo contains config/settings.yaml pointing at https://cloud.comfy.org and a placeholder API key, which is not referenced in the docs — this mismatch is disproportionate to the stated purpose.
Instruction Scope
Instructions tell the user to edit config/config.yaml and set COMFYUI_HOST/PORT, yet the code reads config/settings.yaml and environment variables COMFY_CLOUD_API/COMFY_CLOUD_API_KEY. The runtime will call external endpoints (/api/prompt, /api/view, /api/job/...) rather than a local ComfyUI HTTP API as documented, meaning user prompts, workflow JSON, and generated outputs may be transmitted to an external service not described in the SKILL.md.
Install Mechanism
No install spec in registry (instruction-only), uses a local Python server and requirements.txt — nothing fetched from obscure URLs and dependencies are standard. This is lower risk for arbitrary remote code, but the repo includes code that will perform network requests to an external API.
Credentials
No required env vars declared in metadata, but the code depends on COMFY_CLOUD_API and COMFY_CLOUD_API_KEY (and falls back to values in config/settings.yaml). The repo contains config/settings.yaml with comfy_cloud_api set to https://cloud.comfy.org and comfy_cloud_api_key set to a token-like string — a hard-coded endpoint/key in the repository is unexpected and could leak prompts/output to that endpoint. The documented COMFYUI_HOST/PORT environment variables are not used by the client.
Persistence & Privilege
Skill is not marked always:true, does not request system-wide config changes, and only exposes a user-level FastMCP server. No elevated persistence or automatic enabling is present.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install comfyui-mcp-skill
  3. After installation, invoke the skill by name or use /comfyui-mcp-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
ComfyUI MCP Skill v1.0.0 - 首次发布,用于基于 ComfyUI 的 AI 视频生成 - 支持根据提示词生成 AI 视频 - 提供视频分镜脚本生成和视频合成能力 - 支持进度查询及生成视频下载 - 包含详细的安装、配置和集成说明
Metadata
Slug comfyui-mcp-skill
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Comfyui Mcp Skill?

Generate AI videos, create storyboards, compose and download video clips, and check task progress via ComfyUI MCP service. It is an AI Agent Skill for Claude Code / OpenClaw, with 206 downloads so far.

How do I install Comfyui Mcp Skill?

Run "/install comfyui-mcp-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Comfyui Mcp Skill free?

Yes, Comfyui Mcp Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Comfyui Mcp Skill support?

Comfyui Mcp Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Comfyui Mcp Skill?

It is built and maintained by wangxx (@wangxx07); the current version is v1.0.0.

💬 Comments