comfy command, so comfy-cli is the engine and there is no code shared with the Comfy Cloud MCP.
Unlike the cloud and partner servers, it talks to the ComfyUI running on your own machine — so it can run your workflows and inspect the nodes, custom nodes, and models your install actually has.
Requirements
- Python 3.10+
- comfy-cli on your
PATH(pip install comfy-cli) — the engine every tool wraps - A ComfyUI workspace — create one with
comfy installif you don’t have one (an existing checkout works viacomfy set-default <path>) - A running ComfyUI — start it with
comfy launchbefore using the tools; nothing here launches ComfyUI implicitly
Installation
From a checkout of the repository:comfy-local-mcp console script on your PATH — that command is the MCP server (it speaks MCP over stdio). Point your AI client at it below.
COMFY_BIN (optional). MCP clients launch the server with their own environment, which often does not include your shell’s PATH. If comfy lives in a virtualenv or a non-standard location, set COMFY_BIN to its absolute path (for example /path/to/venv/bin/comfy). Every client example below shows where it goes; drop it if comfy is already on the environment your client launches the server with.Configure your AI client
All clients speak the same MCP stdio contract: run thecomfy-local-mcp command as a server. Pick your client.
Claude Code
One command registers the server:.mcp.json at the repo root:
Claude Desktop
Editclaude_desktop_config.json (Settings → Developer → Edit Config; on macOS it lives at ~/Library/Application Support/Claude/claude_desktop_config.json), add the server, then restart Claude Desktop:
Cursor
Add the server to~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
Quickstart
Zero to a generated image:Add the server to your client
Use the snippet for your client above, then restart / reload it so the tools appear.
Ask your agent to run a workflow
For example:
“Confirm my local ComfyUI is running, then run the workflow at ~/workflows/txt2img.json and show me the image.”
Under the hood the agent calls server_info to confirm ComfyUI is up, run_workflow to execute the workflow JSON, and fetch_outputs to collect the result.Tools
Each tool maps onto acomfy-cli command, run with --where local. Highlights:
| Tool | Purpose |
|---|---|
server_info() | Is a local ComfyUI running, where, and which workspace. Call first. |
run_workflow(workflow_path, wait=True) | Run a workflow JSON; wait=False submits async and returns a prompt_id. |
job_status / wait_for_job / watch_job | Poll, wait on, or stream a submitted job. |
fetch_outputs(prompt_id, out_dir) | Copy a finished job’s outputs into out_dir. |
launch_comfyui / stop_comfyui | Start or stop the local ComfyUI. |
search_templates / fetch_template | Find a built-in template and write its runnable workflow JSON. |
search_nodes / get_node / list_nodes | Inspect the node classes in your live local install (custom nodes included). |
search_models | List the model files on disk. |
validate_workflow | Pre-flight a workflow against the live object_info before a slow run. |
Related
- Comfy Cloud MCP — hosted MCP server, no local install or GPU needed
- Comfy Partner MCP — local server for 30+ partner providers via the Comfy API
- Comfy CLI — drive local ComfyUI and partner generation from the terminal
- comfy-local-mcp on GitHub — source, install, and tool reference