Comfy Pilot - OpenCode Edition
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., "@Comfy Pilot - OpenCode Edition Create a character sprite with 3 expression variants"
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.
Comfy Pilot - OpenCode Edition
MCP server that lets OpenCode (or any MCP-compatible AI coding tool) directly control ComfyUI for AI image generation.
Forked from ConstantineB6/comfy-pilot and adapted for OpenCode compatibility.
What this does
Instead of manually clicking nodes in ComfyUI, you just tell your AI agent:
"Generate a 1920x1080 background of a dystopian room"
"Create a character sprite with 3 expression variants"
"Download this model and set up a workflow for it"
The agent uses MCP tools to manipulate your ComfyUI workflow, set prompts, and run generations — all programmatically.
Related MCP server: ComfyUI MCP
Features
Tool | Description |
| Get the full current workflow |
| Human-readable workflow summary |
| Search available node types |
| Get detailed info about a node |
| Queue status and system info |
| Run the workflow / interrupt |
| Batch create, delete, move, connect nodes |
| View outputs from image nodes |
| Search ComfyUI Manager registry |
| Install a custom node |
| Uninstall a custom node |
| Update a custom node |
| Download models from HF/CivitAI/URLs |
Quick Start
1. Install dependencies
pip install mcp httpx2. Start ComfyUI
Make sure ComfyUI is running on http://localhost:8188.
3. Configure OpenCode
Add to ~/.config/opencode/opencode.jsonc:
{
"mcp": {
"comfyui": {
"type": "local",
"command": ["python", "C:\\path\\to\\mcp_server.py"],
"enabled": true
}
}
}Or for Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"comfyui": {
"command": "python",
"args": ["/path/to/mcp_server.py"]
}
}
}4. Restart your AI tool
Restart OpenCode or Claude Code to pick up the new MCP server.
5. Start generating
Once connected, you can just talk naturally:
"Load the Counterfeit model, set prompt to a dark sci-fi room, 1920x1080, and run it."Requirements
Python 3.8+
ComfyUI (running on
localhost:8188)An MCP-compatible client (OpenCode, Claude Code, etc.)
How it works
┌──────────────┐ stdio/MCP ┌──────────────┐ HTTP REST ┌──────────┐
│ OpenCode │ ◄──────────────────────►│ MCP Server │ ◄────────────────────►│ ComfyUI │
│ (AI Agent) │ command/prompt │ (Python) │ localhost:8188 │ (Server) │
└──────────────┘ └──────────────┘ └──────────┘The MCP server translates natural language commands from the AI agent into ComfyUI API calls, then streams results back.
License
MIT — see LICENSE
Credits
Original project: ConstantineB6/comfy-pilot
Available Tools
14 toolscenter_on_nodeA
Center the user's viewport on a specific node. Useful after creating nodes to show the user where they were placed.
Inputs: node_id (required).
download_modelA
Download a model to the ComfyUI models folder. Supports Hugging Face, CivitAI, and direct URLs. For gated HF models, will return instructions to provide a token.
Inputs: url (required), model_type (required), filename, hf_token, +1 more.
edit_graphA
Edit workflow graph with batched operations. Actions: create, delete, move, resize, set, connect, disconnect. Operations execute in order; 'create' returns node_id for chaining.
Inputs: operations (required).
get_node_infoB
Get detailed info about a specific node in the workflow: type, properties, inputs, outputs, widget values.
Inputs: node_id (required).
get_node_typesA
Search available node types. Returns minimal info by default. Use 'fields' for more details.
Inputs: fields, search, category.
get_statusA
Get ComfyUI status: queue, system stats, and/or history. Returns lightweight summaries by default (counts, IDs). Use detail='full' for more info. History is always paginated.
Inputs: detail, include, history_limit, history_offset.
get_workflowA
Get the current workflow from ComfyUI. Returns full node graph with all nodes, connections, and widget values. Use summarize_workflow for a lighter overview.
Inputs: no named parameters.
install_custom_nodeA
Install a custom node via ComfyUI Manager. Requires restart to complete.
Inputs: node_id (required).
runC
Run workflow or interrupt current generation.
Inputs: action, node_ids.
search_custom_nodesA
Search for custom nodes in the ComfyUI Manager registry. Returns name, author, description, install status, and star count.
Inputs: limit, query, status, category.
summarize_workflowA
Get a concise summary of the current workflow: node IDs, types, titles, positions, and connections. Lighter than get_workflow.
Inputs: no named parameters.
uninstall_custom_nodeA
Uninstall a custom node via ComfyUI Manager. Requires restart to complete.
Inputs: node_id (required).
update_custom_nodeB
Update a custom node to the latest version via ComfyUI Manager. Requires restart to complete.
Inputs: node_id (required).
view_imageA
View an image from a Preview Image or Save Image node. Returns the image as base64 so you can see it. Run the workflow first to generate images.
Inputs: node_id, image_index.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool serves a distinct purpose: workflow editing, node inspection, custom node management, model downloading, execution, and image viewing. There is no overlap or ambiguity.
All tool names follow a consistent lowercase verb_noun pattern (e.g., download_model, get_workflow, search_custom_nodes), with clear verbs indicating the action.
14 tools is well-scoped for a ComfyUI interface, covering essential operations like editing, custom node management, model downloading, and execution without being excessive.
The tool set covers core workflows (edit, run, view) and custom node lifecycle, but lacks explicit workflow save/load and queue management, which are minor gaps.
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Flux AI image generation
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that bridges AI agents with a local ComfyUI instance to generate and iteratively refine images, audio, and video through conversational tool calls.30 npmMIT
- FlicenseNot gradedqualityDmaintenanceMCP server that connects local ComfyUI to AI agents, enabling natural language control of ComfyUI for creating workflows, generating images, and managing the queue.1-
- FlicenseNot gradedqualityDmaintenanceMCP server exposing a local (or LAN) ComfyUI instance's HTTP API as tools, so an LLM client can queue generations, inspect the queue/history, upload reference images, browse installed models/nodes, and pull back generated images.-
- 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.16 npm3Apache 2.0