local-comfyui-mcp

local-comfyui-mcp

An MCP server that integrates with a local ComfyUI, allowing assistants to list and run workflows, monitor progress, and view results, as well as read and edit the live workflow canvas via an optional bridge node.

Category
访问服务器

README

comfyui-mcp

An MCP server that drives a local ComfyUI - including the workflow you have open in the browser.

English | Русский

License: GPL v3 Python Tools


Point your assistant at ComfyUI and it can list your workflows, work out what parameters each one takes, run them, watch the progress, and show you the result. With the optional bridge node installed it can also read and edit the canvas on screen, unsaved changes and all.

you: run the ideogram workflow at 1.5 megapixels, portrait
     -> describe_workflow  finds `megapixels` and `aspect_ratio` and where they land
     -> run_workflow       submits, streams progress, returns the file
     -> show_image         you look at it

Why the bridge is the interesting half

ComfyUI's HTTP API knows about files, models and the queue. It knows nothing about the workflow being edited: that lives in litegraph, inside the page, and the only copy of its unsaved state is in the tab's memory.

The bridge turns the WebSocket ComfyUI already holds open to every client into a request/response channel, so an assistant can read the live graph, change widget values, rewire links, tidy the layout, take a screenshot of the canvas, and queue the workflow the same way the Queue button does.

Everything else works without it, and the tools say plainly which of the two setup steps is missing rather than failing vaguely.

Requirements

  • ComfyUI - a portable build or any local install.
  • Nothing else. The installer fetches uv, which then builds an isolated .venv with the right Python. No global Python, no system packages.
  • An MCP client. Eleven are supported out of the box; see below.

Install

Windows

install.bat

Linux and macOS

./install.sh

Five steps: fetch uv, build the .venv, seed .env from the template, check the server imports, run the test suite. Safe to run again - each step checks whether it is already done.

Prefer a menu to remembering names? launcher.bat / ./launcher.sh opens one window over every script in the folder, and installs first if there is no .venv yet.

Tell it where ComfyUI is

configure_comfy.bat        ./configure_comfy.sh

Root folder, port, launch script, the model and export directories, the download token. The installer opens this window by itself if it cannot resolve COMFYUI_ROOT. Everything it writes goes to .env; see .env.example for the full list of settings.

Connect your MCP client

configure_clients.bat      ./configure_clients.sh

Generates a ready config for Claude Code, Cursor, Kilo Code, OpenCode, LM Studio, Cherry Studio, MiMo Code, OpenClaw, Hermes, Codex and llama.cpp - the right shape, the right container key, the right file format, with the absolute paths into this checkout already filled in. An existing config is merged rather than replaced, and a file with comments in it is never rewritten.

Install the bridge node

install_node.bat           ./install_node.sh
uninstall_node.bat         ./uninstall_node.sh

A directory junction (symlink on Unix) into custom_nodes, so there is no second copy to drift. No administrator rights needed.

Restart ComfyUI afterwards - custom nodes are imported once at startup. After that, opening a tab is all it takes; workspace_status says whether both halves are in place.

What the 44 tools cover

Group What it is for
Status is ComfyUI up, what is the VRAM and the queue doing
Workflows and reference list workflow files, work out their parameters, search the node catalogue, read a node's schema
Logs ComfyUI's own console, and the browser console - where a failed extension is the only place it says anything
Canvas: reading the live graph, a screenshot of it, a diagnosis of what is wrong with it
Canvas: editing widget values, properties, on-screen labels, links, node modes, layout, groups, undo
Running run a file or the canvas, follow the progress, fetch the result, show an image
Downloading models fetch a model to the directory ComfyUI actually reads, with progress
Process and tab start, stop or restart ComfyUI; reload the browser tab

Not all of them have to be offered. configure.bat writes one line to .env that narrows the set - a switched-off tool is not registered at all, so its schema never reaches the model's context. What is off is reported by comfy_status, so the assistant does not conclude the server cannot do it.

Security

The server, ComfyUI and the browser tab all run on your own machine, under your own account, over stdio. Nothing leaves it except the model downloads you ask for. What follows is what that still leaves open, because "it runs locally" is not the whole answer.

The download is the sharp end. A model URL routinely arrives from somebody else's document - a "Model Links" note inside a shared workflow, or a loader's properties.models - reaches the assistant as ordinary text, and the assistant has a downloader. So download_model refuses three things before it opens a socket, and refuses a dry_run the same way:

  • A host you did not allow. COMFYUI_DOWNLOAD_ALLOW_HOSTS ships non-empty. An injected instruction can name any URL; it cannot name a host that is not on the list.
  • A format that executes as it loads. .ckpt .pt .pth .bin .pkl are pickle; .safetensors and .gguf are data. Refused unless COMFYUI_DOWNLOAD_ALLOW_PICKLE says otherwise.
  • A file the volume cannot hold, plus a ceiling of your own if you want one.

A download token, if you set one, reaches the origin host and no further: the redirect chain is walked by hand so that a signed CDN link never sees it.

There is no authentication by default, and ComfyUI has none either. On localhost that is the posture you already have. If ComfyUI listens wider than that, set COMFYUI_BRIDGE_TOKEN here and COMFYUI_MCP_BRIDGE_TOKEN in ComfyUI's own environment - the bridge adds routes to ComfyUI's server, and one of them restarts the process.

The tool switch is not a security boundary, and the tool descriptions say so. configure.bat decides what is offered, which is a coarse grid: the question about download_model is not whether it exists but where it may point, and that is what the settings above are for. Your MCP client's own permission prompts are the other half.

Workflows

Workflow files live in workflows/ and must be API format - Workflow -> Export (API) in ComfyUI. A UI-format export is refused with an explanation rather than half-read.

A workflow may ship a same-named .md beside it: an instruction file for whoever fills the parameters in, served verbatim by get_workflow_guide. Some graphs need input in a shape the node list cannot express, and prose gets you nowhere.

Two languages

Every window, the installer and .env.example speak English or Russian. COMFYUI_LANG decides; left empty it asks the machine. --lang=en opens any window in the other language for one run.

The tool descriptions the model reads stay English throughout, deliberately: they describe an interface to a program.

When something is wrong

  • A node type cannot be found, or a pack behaves as though half of it is missing: read get_comfy_log. A custom node whose import failed is simply absent from /object_info, and absent looks exactly like never installed.
  • A node is on the canvas but behaves wrongly: read get_console_log. The frontend catches an extension's import error and only logs it to the browser console, so that is the only place it exists.
  • A workspace tool fails: workspace_status names which of the two things is missing - the node, or an open tab. Neither is worth retrying.

Licence

GPL-3.0. ComfyUI itself is GPL-3.0, and the bridge half of this project is a custom node that runs inside it, so the same terms are the honest fit: use it, change it, distribute it - and pass the source and the credit along with it.

Copyright (C) 2026 pytraveler

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选