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 MCPAdd 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.
| Name | Required | Description | Default |
|---|---|---|---|
| canvas_id | Yes | ||
| operations | Yes | ||
| base_revision | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations (destructiveHint=true, readOnlyHint=false), the description discloses that changes are atomic (all-or-nothing), undoable, and applied to a live canvas. This adds meaningful behavioral context about failure semantics and reversibility, though it doesn't address concurrency conflicts or the role of base_revision.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no filler. Every word ('atomic', 'undoable', 'live', 'batch') earns its place by conveying behavioral and semantic constraints.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the destructive, non-idempotent nature and a complex operations schema with no output schema, an agent needs more context about conflict behavior, base_revision semantics, and typical use cases. The compact description covers a few key properties but leaves major gaps for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not compensate by explaining canvas_id, base_revision, or the operations array. It only says 'batch of changes,' which maps vaguely to operations but adds no meaning to any specific parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific action ('apply'), a precise resource ('changes to a live ComfyUI canvas'), and adds defining qualifiers ('atomic, undoable batch') that set it apart from the sibling read/search tools. It tells an agent immediately that this is the mutating patch tool for canvas edits.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to use this tool versus alternatives such as inspect_canvas, present_canvas, search_nodes, or inspect_node_type. The phrase 'apply ... batch of changes' implies mutating use, but it does not state prerequisites, when not to use it, or which sibling might be preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_canvasBRead-only
Inspect a compact live ComfyUI canvas, or details for native node and group refs.
| Name | Required | Description | Default |
|---|---|---|---|
| refs | No | ||
| canvas_id | No | Opaque canvas identity returned by an earlier inspection. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the read-only safety profile is covered. The description adds 'compact live' and 'native' context, which suggests the output is a condensed current-state view, but it does not disclose return format or behavior when no parameters are provided. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence with no wasted words. 'Compact live' and 'native' are dense but meaningful qualifiers, though they could be clearer.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With two optional parameters, no required fields, no output schema, and no usage guidance, the description does not sufficiently equip an agent to invoke the tool correctly. Missing details include the meaning of an all-empty call, the relationship between canvas_id and refs, and when to prefer sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already describes canvas_id and the refs kind/id shape. The description adds that refs target 'native node and group' details, which gives some meaning beyond the schema. However, it does not clarify whether canvas_id and refs are alternatives, complementary, or what happens when both are absent, leaving a partial gap at 50% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a clear action ('Inspect') and resource ('compact live ComfyUI canvas', 'node and group refs'), which distinguishes it from mutating or presenting siblings. The phrase 'or details for native node and group refs' is slightly ambiguous about the exact object of inspection, but the core purpose is understandable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance for when to use this tool versus search_nodes or inspect_node_type. It weakly implies that this tool is for reading canvas/ref state, but it does not state conditions, exclusions, or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inspect_node_typeBRead-only
Inspect the complete native ComfyUI schema for one installed node type.
| Name | Required | Description | Default |
|---|---|---|---|
| class_type | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=true and openWorldHint=false, and the description's 'Inspect' verb aligns with a safe read operation - no contradiction. The phrase 'complete native ComfyUI schema' adds modest context about the scope of what is returned. However, it doesn't describe output volume, error behavior for invalid class types, or whether the full schema is returned as structured JSON, so the value added beyond annotations is limited.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, tightly worded sentence with zero waste. The action and object are front-loaded with no filler or redundancy. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter, read-only inspection tool with no output schema, the definition is borderline adequate. It clearly states what it does and the annotation covers the safety profile, but it leaves the agent to guess what class_type should contain and offers no usage guidance. Given the tool's low complexity and the sibling overlap, this is a minimum-viable definition that could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the full burden of explaining the parameter. The phrase 'one installed node type' weakly hints that class_type names a node type, but it never explicitly maps class_type to that concept, states its expected format, or notes that it must be an installed node type identifier. The description insufficiently compensates for the zero coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Inspect') and identifies a clear resource ('the complete native ComfyUI schema for one installed node type'). This distinguishes it from siblings like inspect_canvas (canvas vs node type) and search_nodes (search vs inspect), though it doesn't name them explicitly. A 5 would require explicit sibling differentiation, so 4 is appropriate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like search_nodes or inspect_canvas, and no prerequisites or exclusions are stated. The usage context is only implied by the purpose clause, so the agent receives no routing help.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
present_canvasAIdempotent
Select and optionally fit native items on a live ComfyUI canvas without modifying the workflow.
| Name | Required | Description | Default |
|---|---|---|---|
| refs | Yes | ||
| fit_view | Yes | ||
| canvas_id | Yes | ||
| selection | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide destructiveHint=false and idempotentHint=true; the description adds that the workflow is not modified and that the operation targets live canvas state. However, it does not disclose how the selection is changed (replace vs add), what happens with invalid refs, or the effect of fit_view.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence with no filler. It front-loads the action and includes a useful constraint about not modifying the workflow. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is adequate for a relatively simple 4-parameter tool with strong safety annotations, but it leaves some semantics implicit, especially selection behavior and fit_view. Without an output schema, the description also does not indicate what the agent should expect after invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the burden of explaining parameters. It only provides the overall intent and does not map canvas_id, refs, selection, or fit_view to concrete meanings. The enum values 'replace' and 'add' are left for the agent to infer from their names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific action ('Select and optionally fit native items') and a specific resource ('live ComfyUI canvas'), and it explicitly scopes the operation as not modifying the workflow. This clearly distinguishes it from siblings like apply_canvas_patch (which modifies) and inspect_canvas (which reads).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys when to use the tool: for selection and view-fitting on a live canvas while keeping the workflow unchanged. It gives a clear exclusion ('without modifying the workflow'), but it does not explicitly name sibling alternatives or state cases where inspect_canvas or apply_canvas_patch should be preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_nodesCRead-only
Search the node types installed in ComfyUI.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=false, so the description's job is to add context beyond that. It adds little beyond restating the read-only search behavior, though for a simple search tool there is limited behavior to disclose. No contradiction with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with zero wasted words, and the core action is front-loaded. It is efficient, though it borders on under-specification rather than true concision.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool with no output schema and a sibling (inspect_node_type) that overlaps in domain, the description should clarify scope and the meaning of the limit parameter. It does neither, leaving an agent to guess about result behavior and when this tool is the right choice.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must compensate for explaining the parameters. The description implies 'query' is a search term for node types, but it does not clarify the 'limit' parameter's semantics (pagination, result cap, or default behavior) at all. With two parameters undocumented, the description is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('search') and a specific resource ('node types installed in ComfyUI'), making the core purpose clear. It does not explicitly distinguish itself from its siblings (especially inspect_node_type), but the verb choice implies a broad search versus targeted inspection, giving partial differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus its siblings, no exclusions, and no named alternatives. An agent cannot tell from the description whether to use search_nodes or inspect_node_type for a given task, leaving the routing decision entirely to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
apply_canvas_patch - First observed
inspect_canvas - First observed
inspect_node_type - First observed
present_canvas - First observed
search_nodes
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…
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseAqualityAmaintenanceThe 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.292MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to control a local ComfyUI instance for image generation, allowing workflow understanding, parameter modification, execution, and model discovery.17 npm3Apache 2.0
- AlicenseAqualityCmaintenanceA 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.232Apache 2.0
- FlicenseNot gradedqualityCmaintenanceWindows-native MCP server for a local ComfyUI portable package. It enables listing, validating, and running ComfyUI workflows via the loopback HTTP API.-