经 AI Skill Hub 精选评估,ComfyUI MCP 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
ComfyUI MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
ComfyUI MCP 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/artokun/comfyui-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"comfyui-mcp": {
"command": "npx",
"args": ["-y", "comfyui-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 ComfyUI MCP 执行以下任务... Claude: [自动调用 ComfyUI MCP MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"comfyui_mcp": {
"command": "npx",
"args": ["-y", "comfyui-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
MCP server + Claude Code plugin for ComfyUI — execute workflows, generate images, visualize pipelines, manage models, control VRAM, and explore custom nodes, all from your AI coding assistant.
Works on macOS, Linux, and Windows. Auto-detects your ComfyUI installation and port.
80+ MCP tools | 10 slash commands | 6 knowledge skills | 3 autonomous agents | 3 hooks
📖 Full documentation: comfyui-mcp.artokun.io/docs
---
claude plugin install comfyui-mcp
> /comfy:install comfyui-impact-pack
Searches the registry, shows details, clones the repo to custom_nodes/, installs dependencies, and offers to restart ComfyUI.
git clone https://github.com/artokun/comfyui-mcp.git
cd comfyui-mcp
npm install
1. Install ComfyUI (if you haven't already): ComfyUI Desktop or from source
2. Add the MCP server to your Claude Code config (~/.claude/settings.json):
{
"mcpServers": {
"comfyui": {
"command": "npx",
"args": ["-y", "comfyui-mcp"],
"env": {
"CIVITAI_API_TOKEN": ""
}
}
}
}
3. Start using it. With ComfyUI running, ask Claude to generate an image:
> Generate an image of a sunset over mountains
Claude will find (or download) a checkpoint, build a workflow, execute it, and return the image.
Note: This runs as a standalone MCP server — no need to clone this repo. npx will download and run it automatically.
---
> /comfy:gallery last 5
> /comfy:gallery today
Lists recent outputs with embedded metadata — shows checkpoint, prompt, seed, steps, CFG, sampler for each image.
Community-maintained preset library (model-settings.json) with research-backed sampler, scheduler, steps, and CFG values for 10+ model families. User overrides in model-settings.user.jsonc (auto-created from template on install, gitignored).
---
The server auto-detects your ComfyUI installation and port. Override with environment variables if needed:
| Variable | Default | Description |
|---|---|---|
COMFYUI_URL | Full ComfyUI URL, e.g. https://comfy.example.com:8443 — overrides COMFYUI_HOST/PORT/SSL and skips auto-detection (use for remote ComfyUI) | |
COMFYUI_HOST | 127.0.0.1 | ComfyUI server address |
COMFYUI_PORT | *(auto-detect)* | ComfyUI server port (tries 8188, then 8000) |
COMFYUI_PATH | *(auto-detect)* | Path to ComfyUI data directory |
CIVITAI_API_TOKEN | CivitAI API token for model downloads | |
HUGGINGFACE_TOKEN | HuggingFace token for higher API rate limits | |
GITHUB_TOKEN | GitHub token for skill generation (avoids rate limits) | |
REGISTRY_ACCESS_TOKEN | Comfy Registry API key for publish_custom_node (env-only, never logged) | |
COMFYUI_DOWNLOAD_CACHE_DIR | ~/.comfyui-mcp/cache | Content-addressed model-download cache (dedup + concurrent coalescing) |
COMFYUI_LRU_CACHE_SIZE_GB | 0 | Cap the download cache in GB; 0 disables LRU eviction |
COMFYUI_STARTUP_CHECK_INTERVAL_S / …_MAX_TRIES | 1 / 20 | Readiness-probe interval + max tries when starting a local ComfyUI |
COMFYUI_ALWAYS_RESTART | false | Auto-restart a crashed local ComfyUI (bounded by COMFYUI_RESTART_MAX_ATTEMPTS / COMFYUI_RESTART_WINDOW_S) |
LOG_LEVEL | info | Logging verbosity: debug, info, warn, error |
This package also ships as a Claude Code plugin, providing slash commands, skills, agents, and hooks on top of the MCP tools.
| Tool | Description |
|---|---|
enqueue_workflow | Submit a workflow (API format JSON) — returns prompt_id immediately, non-blocking |
get_job_status | Check execution status of a job by prompt ID |
get_queue | View the current execution queue (running + pending) |
cancel_job | Interrupt the currently running job |
get_system_stats | Get system info — GPU, VRAM, Python version, OS |
| Tool | Description |
|---|---|
visualize_workflow | Convert a workflow to a Mermaid flowchart with nodes grouped by category |
mermaid_to_workflow | Convert a Mermaid diagram back to executable workflow JSON |
| Tool | Description |
|---|---|
create_workflow | Generate a workflow from templates: txt2img, img2img, upscale, inpaint |
modify_workflow | Apply operations: set_input, add_node, remove_node, connect, insert_between |
get_node_info | Query available node types from ComfyUI's /object_info endpoint |
| Tool | Description |
|---|---|
validate_workflow | Dry-run validation — checks missing nodes, broken connections, invalid output indices, missing model files |
| Tool | Description |
|---|---|
list_workflows | List saved workflows from ComfyUI's user library |
get_workflow | Load a specific saved workflow by filename |
save_workflow | Save a workflow to the ComfyUI user library |
> /comfy:viz ~/workflows/my-workflow.json
Produces a Mermaid diagram with nodes grouped by category:
> /comfy:debug
Automatically reads the last execution history and logs, identifies the failing node, checks for missing models or node packs, and suggests a fix.
> /comfy:debug abc123-def456
Diagnose a specific execution by prompt ID.
> /comfy:convert ~/workflows/my-ui-workflow.json
Converts between ComfyUI's UI format (nodes + links arrays) and API format (node IDs → {class_type, inputs}).
> Extract the workflow from this image: ~/outputs/ComfyUI_00042_.png
Reads the PNG metadata chunks to recover the exact workflow and prompt used to generate the image.
> /comfy:compare workflow-a.json vs workflow-b.json
Shows added/removed nodes, changed parameters (old → new values), and optional Mermaid diagrams for visual comparison.
"ComfyUI not detected on ports 8188, 8000" Make sure ComfyUI is running. The Desktop app uses port 8000 by default; the CLI uses 8188. Set COMFYUI_PORT if you're using a custom port.
"COMFYUI_PATH is not configured" The auto-detection couldn't find your ComfyUI data directory. Set COMFYUI_PATH to the directory containing your models/ folder (e.g., ~/Documents/ComfyUI).
"Multiple ComfyUI installations detected" This is informational — the server uses the first one found. Set COMFYUI_PATH to pick a specific installation.
Model downloads fail For HuggingFace gated models, set HUGGINGFACE_TOKEN. For CivitAI, set CIVITAI_API_TOKEN.
Workflow execution errors Use /comfy:debug to automatically diagnose failures. Or use get_history / get_logs directly to see detailed error messages including Python tracebacks from ComfyUI.
Out of memory (OOM) Use clear_vram to free GPU memory before running large workflows. The VRAM watchdog hook will warn you automatically if memory is critically low. See the troubleshooting skill for model-specific VRAM estimates.
Missing custom nodes Use /comfy:install <pack> to install missing node packs from the registry. The debug command will detect and suggest missing packs automatically.
---
高质量的MCP工具,提供灵活的工作流执行和可视化功能
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
AI Skill Hub 点评:ComfyUI MCP 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | comfyui-mcp |
| 原始描述 | 开源MCP工具:ComfyUI MCP server + Claude Code plugin — workflow execution, visualization, com。⭐110 · TypeScript |
| Topics | mcptypescriptworkflow |
| GitHub | https://github.com/artokun/comfyui-mcp |
| 语言 | TypeScript |
收录时间:2026-05-26 · 更新时间:2026-05-26 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端