← 返回 Skills 市场
wangxx07

Comfyui Mcp Skill

作者 wangxx · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
206
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install comfyui-mcp-skill
功能描述
Generate AI videos, create storyboards, compose and download video clips, and check task progress via ComfyUI MCP service.
使用说明 (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

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install comfyui-mcp-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /comfyui-mcp-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
ComfyUI MCP Skill v1.0.0 - 首次发布,用于基于 ComfyUI 的 AI 视频生成 - 支持根据提示词生成 AI 视频 - 提供视频分镜脚本生成和视频合成能力 - 支持进度查询及生成视频下载 - 包含详细的安装、配置和集成说明
元数据
Slug comfyui-mcp-skill
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Comfyui Mcp Skill 是什么?

Generate AI videos, create storyboards, compose and download video clips, and check task progress via ComfyUI MCP service. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 206 次。

如何安装 Comfyui Mcp Skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install comfyui-mcp-skill」即可一键安装,无需额外配置。

Comfyui Mcp Skill 是免费的吗?

是的,Comfyui Mcp Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Comfyui Mcp Skill 支持哪些平台?

Comfyui Mcp Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Comfyui Mcp Skill?

由 wangxx(@wangxx07)开发并维护,当前版本 v1.0.0。

💬 留言讨论