OpenBio Comfy MCP
Summary: This server lets an AI client read and modify the live workflow on an open ComfyUI canvas through atomic, undoable patches.
Inspect the canvas (
inspect_canvas) — read a compact live graph, or get details for specific native node/group refs.Search installed nodes (
search_nodes) — find node types available in that ComfyUI instance.Read a node type's schema (
inspect_node_type) — full native schema for oneclass_type.Control the view (
present_canvas) — select and optionally fit native nodes/groups without changing the workflow.Edit the graph (
apply_canvas_patch) — apply one atomic, undoable batch: add/remove/move nodes, set inputs, connect/disconnect, and add/update/move/remove groups, or fit a group to nodes.
All write operations require a canvas_id and base_revision, and all tools are local-only (openWorldHint: false).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenBio Comfy MCP Add a group called 'upscaler' around the selected nodes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenBio Comfy MCP
Let Cursor, Codex, Claude, or another local AI inspect, edit, and queue the workflow currently open on your ComfyUI canvas.
It uses ComfyUI's own graph, selection, groups, undo, and Queue button. It never saves a workflow for you.
This is not Comfy's official MCP. Official Comfy MCP generates images on Comfy Cloud or runs workflow files through comfy-mcp. This project edits and queues the live graph you already have open.
What you can ask
Once both pieces below are installed and a ComfyUI window is open:
What is on this canvas?
Add a node, connect these two, or move this group.
Search the node types installed in this ComfyUI.
Pack or unpack a native subgraph.
Queue the open canvas and get output file paths when it finishes.
Changes appear on the canvas immediately. One ComfyUI undo reverts a whole patch. Queue uses the same path as the Queue button.
Related MCP server: comfy-mcp
Install
You need both steps. Manager only adds the ComfyUI side. The AI client still needs the MCP server.
1. ComfyUI extension
In ComfyUI Manager, search for OpenBio Comfy MCP or openbio-comfy-mcp, install it, and restart ComfyUI. Keep a browser or Desktop window open while you use the tools.
The extension has no extra Python packages. Registry builds already include the bundled MCP server.
Confirm the relay is up:
Invoke-RestMethod http://127.0.0.1:8188/openbio-comfy-mcp/healthYou should see "ok": true. Use your ComfyUI port if it is not 8188.
2. MCP host
Node.js 20+ must be on your PATH. Point the host at the published package — do not copy a file path:
{
"mcpServers": {
"openbio-comfy-mcp": {
"command": "npx",
"args": ["-y", "openbio-comfy-mcp@latest"]
}
}
}Codex
codex mcp add openbio-comfy-mcp -- npx -y openbio-comfy-mcp@latest
codex mcp get openbio-comfy-mcp --jsonRestart the Codex client after adding it. Desktop, CLI, and the IDE extension share the same host config. See the Codex MCP docs.
Cursor
Add the JSON above to ~/.cursor/mcp.json (global) or .cursor/mcp.json in a project, then reload MCP.
Other stdio hosts (Claude Desktop, Claude Code, …)
Use the same npx -y openbio-comfy-mcp@latest command. Key names vary by host; the command must stay npx.
Local ComfyUI instances are discovered automatically. You only need one MCP registration even if several ComfyUI processes are running.
Requirements
ComfyUI 0.33.0 or newer
Python 3.10 or newer in the ComfyUI runtime
Node.js 20 or newer on the PATH of the MCP host
An MCP host that can launch a local stdio server
A ComfyUI page left open while the tools run
Configuration
Variable | Default | When to set it |
| Unset (discover locally) | Pin this MCP connection to one instance, for example |
|
| Override the shared registration directory. ComfyUI and the MCP host must use the same path. |
Install the extension in every ComfyUI instance you want to edit. Each running backend writes its address under the shared directory. Discovery accepts loopback and private LAN addresses (192.168.x.x, 10.x, 172.16–31.x). Public internet hosts are not supported. ComfyUI listening on 0.0.0.0 still registers as 127.0.0.1; from another machine set OPENBIO_COMFY_URL to that host's LAN URL, for example http://192.168.1.13:8188.
With several online instances, tools pick the one whose page was focused last. Say “edit the workflow on port 8189” if you need a specific one. list_instances shows instance_id, status, and connected canvases.
Tools
Tool | Effect | Purpose |
| Read-only | List local instances and connected canvases. |
| Read-only | Inspect the live graph, subgraphs, or specific nodes and groups. |
| Read-only | Search the node types installed in that ComfyUI. |
| Read-only | Read the native schema of one |
| UI only | Navigate graphs, select items, optionally fit the view. |
| Writes the canvas | Apply one atomic, undoable batch of graph edits. |
| Queues the live canvas | Same as the Queue button, including seed widgets. Returns |
| Read-only | Status of a queued prompt, plus output filenames, local paths, and view URLs. Failed runs are |
| Read-only | Poll until that prompt finishes, fails, or the timeout elapses. |
Typical flow: inspect → search a node type if needed → apply one patch → queue_canvas → wait_for_prompt → undo in ComfyUI if the graph edit was wrong.
Exact operations live in docs/spec.md.
Security
The MCP process runs with the same OS permissions as the host that launched it.
apply_canvas_patchcan change the open workflow.queue_canvasruns that workflow on your GPU. Review both in your host if you gate write tools.The server opens no listening port. Canvas commands are accepted from loopback and private LAN addresses only. That is not a general ComfyUI login; do not expose an unauthenticated ComfyUI to the public internet.
Inspections can include prompts, filenames, and widget values. What happens next follows your MCP host and model provider.
Troubleshooting
NO_LIVE_CANVAS: open or reload a ComfyUI page and leave it connected.Host shows no tools: confirm Node 20+ is on
PATH, that the host command isnpx -y openbio-comfy-mcp@latest, then restart the host.Health route missing: the extension is not loaded. Reinstall under
custom_nodes, restart ComfyUI, check its console.STALE_CANVAS: inspect again and send a new patch.PROMPT_TIMEOUT: the queued prompt was still running whenwait_for_promptstopped. Callinspect_promptor wait again.AMBIGUOUS_INSTANCE: several instances, no clear focus. Uselist_instancesand pass aninstance_idorcanvas_id.INSTANCE_UNAVAILABLE/INSTANCE_NOT_FOUND: that ComfyUI is down or was restarted. List and inspect again.Port
5173Vite frontend: custom-node JavaScript does not load there. Use the frontend served by ComfyUI.
Update and uninstall
Manager users: update the extension in ComfyUI Manager, then restart ComfyUI and reload the page. The MCP host always fetches @latest on the next npx launch.
Remove the host registration first (Codex: codex mcp remove openbio-comfy-mcp), then uninstall the custom node and restart ComfyUI.
Source install
Use this when you are developing the extension, or Manager is not available.
$ComfyRoot = "C:\path\to\ComfyUI"
Set-Location "$ComfyRoot\custom_nodes"
git clone https://github.com/Open-Bio/openbio-comfy-mcp.git
Set-Location .\openbio-comfy-mcp
npm cicd /path/to/ComfyUI/custom_nodes
git clone https://github.com/Open-Bio/openbio-comfy-mcp.git
cd openbio-comfy-mcp
npm ciTo keep the Git checkout outside ComfyUI, Junction or symlink it into custom_nodes, then run npm ci in the checkout. Do not expose the same checkout through more than one custom-node root.
For local MCP testing against that checkout, you can still launch node dist/openbio-comfy-mcp.mjs instead of npx.
npm ci
npm testPython relay tests, using the same interpreter as ComfyUI:
C:\path\to\ComfyUI\.venv\Scripts\python.exe `
-m pytest --rootdir=tests -c pyproject.toml tests -qThe standalone ComfyUI_frontend Vite server (pnpm dev, usually port 5173) does not load custom-node JavaScript. Open the UI that ComfyUI itself serves.
License
OpenBio Comfy MCP is released under the MIT License.
This project uses the official Model Context Protocol TypeScript SDK and ComfyUI's documented V3 and JavaScript extension APIs.
Available Tools
5 toolsapply_canvas_patchBDestructive
Apply one atomic, undoable batch of changes to a live ComfyUI canvas.
Inputs: canvas_id (required), operations (required), base_revision (required).
inspect_canvasBRead-only
Inspect a compact live ComfyUI canvas, or details for native node and group refs.
Inputs: refs, canvas_id.
inspect_node_typeBRead-only
Inspect the complete native ComfyUI schema for one installed node type.
Inputs: class_type (required).
present_canvasAIdempotent
Select and optionally fit native items on a live ComfyUI canvas without modifying the workflow.
Inputs: refs (required), fit_view (required), canvas_id (required), selection (required).
search_nodesCRead-only
Search the node types installed in ComfyUI.
Inputs: query (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct aspect: canvas inspection, canvas presentation, node search, node schema inspection, and canvas modification. No two tools overlap in purpose, making selection unambiguous.
All tool names follow a consistent verb_noun pattern (inspect_canvas, present_canvas, search_nodes, inspect_node_type, apply_canvas_patch) with uniform snake_case. The naming convention is predictable and clear.
With 5 tools, the server is well-scoped for ComfyUI canvas interaction. It covers inspection, navigation, searching, and modification without unnecessary bloat or missing essentials.
The surface covers reading (inspect), searching, schema inspection, visualization (present), and modification (apply_patch). Minor gaps like explicit node deletion or undo/redo history might exist, but the atomic undoable patch likely covers these needs.
Maintenance
Related MCP Connectors
Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Live, editable canvas for AI agents — author graphs via MCP, then watch and reroute runs live.
Related MCP Servers
- AlicenseAqualityBmaintenanceThe MCP server that drafts ComfyUI workflows a human can actually read. It lets coding agents build, repair, port, validate, and run ComfyUI workflows against your own ComfyUI instance, delivering clean, organized, fully-labeled workflows.29205 PyPI2MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to control a local ComfyUI instance for image generation, allowing workflow understanding, parameter modification, execution, and model discovery.3-
- AlicenseAqualityDmaintenanceA universal MCP server that lets agents discover ComfyUI nodes, build/edit/run API workflows, manage queues, retrieve outputs, and optionally render graphs on a ComfyUI canvas.236Apache 2.0
- AlicenseAqualityBmaintenanceAn 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.6416GPL 3.0