operit-comfyui-mcp
A local MCP server that enables AI assistants to control ComfyUI on a computer for image generation via Operit on a mobile device.
README
operit-comfyui-mcp
本仓库代码由 AI 生成。
Operit 本地 MCP 插件,让 AI 助手调用电脑上运行的 ComfyUI 生成图像。
工作原理
ComfyUI 跑在电脑上,这个插件让手机上的 Operit 通过 MCP 协议跟它通信。 手机上发指令,电脑出图。
前置条件
- 电脑上已安装并运行 ComfyUI
- 手机和电脑在同一局域网
- Operit 中已配置此 MCP 插件
功能
连接与状态
- comfy_connect(host) — 连接 ComfyUI 服务器,host 填
IP:8188 - comfy_system_stats() — 查看系统信息(Python版本、CUDA/GPU、显存)
- comfy_free_vram() — 释放显存,卸载模型
工作流管理
- comfy_list_workflows() — 列出所有可用工作流
- comfy_load_workflow(name, json_string, file_path) — 加载工作流
- comfy_get_workflow_params(name) — 查看工作流可调参数
- comfy_get_recent_workflows(limit) — 查看最近执行过的工作流
- comfy_load_from_history(prompt_id) — 从历史记录重新加载工作流
生成
- comfy_generate(workflow_name, params, wait) — 修改参数并执行生成
- comfy_quick_gen(file_path, params) — 从文件快速加载并生成
- comfy_get_result(prompt_id) — 获取某次生成的结果
- comfy_upload_image(file_path) — 上传图片到 ComfyUI 输入目录
诊断与修复
- comfy_list_nodes() — 列出 ComfyUI 已安装的所有节点类型
- comfy_list_models(folder) — 列出指定目录下的模型
- comfy_check_compatibility(name) — 检查工作流是否有缺失节点
- comfy_fix_workflow(name) — 自动修复缺失节点
队列控制
- comfy_queue_status() — 查看当前执行队列
- comfy_interrupt() — 中断当前正在执行的工作流
使用步骤
- 电脑上启动 ComfyUI(加 --listen 参数允许远程连接)
- 在 Operit 中调 comfy_connect 连接你的 ComfyUI
- 让 AI 在 ComfyUI 中搭建工作流,或加载已有工作流
- 调 comfy_generate 改提示词,开始生图
首次生图较慢(ComfyUI 需编译 Shader),之后就快了。
💡 游玩建议
可以让 AI 为你写一个 Operit skill,把常用的工作流、模型、分辨率、步数等参数预设好。
之后每次生图只需要 @你的skill 描述画面 就能一键出图,不用每次都问参数。
服务器地址(IPv4 地址)每次开机可能会变,需要告诉 AI 当前地址。
注意事项
- 工作流路径基于 ComfyUI 的 user/default/workflows 目录
- 图片保存到 ComfyUI 的 output 目录
- 连不上先检查网络
- 理论上也可以生成视频(需使用 AnimateDiff 等视频工作流),但 Operit 暂无视频播放功能,需要 AI 将视频文件放到指定位置供你查看
许可证
本项目采用 CC BY-NC 4.0(署名-非商业使用)许可证。 可以自由分享、修改,但需署名原作者且不得用于商业用途。 详见 LICENSE 文件。
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.