Skip to main content
Public beta. Comfy MCP is in public beta. APIs, tools, and behavior may change while we iterate. See Feedback to report issues or share suggestions.

Overview

Comfy MCP connects AI agents to ComfyUI over the Model Context Protocol. Once connected, you can generate images, video, audio and 3D, search models, nodes and templates, and run real ComfyUI workflows from a chat with your agent. It comes with two connections: a Comfy Cloud connection and a local ComfyUI connection, with the local one fully open source.
Stuck on anything below? The best way is to hand this page to your agent and ask for help.

Which connection do I want?

For new users, we recommend starting with the cloud connection — it is the simplest setup. If you use claude.ai, ChatGPT, or the Claude Desktop chat app, the cloud connection is also the more compatible choice. If you already run ComfyUI locally or in your own deployed environment, or you work mostly in a coding agent like Claude Code, Cursor, or Codex, start with the local connection.
For Mac users, if you plan to run open-source models, we recommend the cloud connection. Today’s open-weight models — the local versions of MiniMax H3, LTX-2.3, and similar — are large, and will not run at a workable speed on the Apple GPU.
Running both at once is normal, and most clients host two MCP servers happily. They sign in to the same Comfy account, but separately — one sign-in does not cover the other.

Comfy Cloud MCP Connection

The hosted connection, linking your agent to your Comfy Cloud account. Nothing to install, and workflows run on Comfy Cloud GPUs. To learn more about Comfy Cloud, see Comfy Cloud.

Set up the cloud connection

You need a Comfy Cloud account before connecting. Sign up if you do not have one yet; new users get 5 free runs to try it out. OAuth sign-in during setup uses your Comfy account.
Comfy Cloud MCP runs at:
Pick your client:
Claude Desktop adds Comfy Cloud as a custom connector through its UI, then runs the OAuth sign-in.
1

Open Customize

In the sidebar, click Customize (labeled 1).Claude Desktop — open Customize
2

Open Connectors

Click Connectors (labeled 2).Claude Desktop — open Connectors
3

Add a custom connector

  1. Click the + button (labeled 3) in the Connectors header.
  2. Choose Add custom connector (labeled 4). Claude Desktop — add custom connector
4

Enter server details

  1. Enter a name such as Comfy Cloud MCP in the Name field (labeled 5).
  2. Set the Remote MCP server URL to https://cloud.comfy.org/mcp (labeled 6).
  3. Click Add (labeled 7). Claude Desktop — connector details
5

Sign in

  1. When the browser opens, choose your workspace (for example Personal Workspace).
  2. Click Continue to authorize the connector. You are connected. Comfy Cloud MCP authorization

What your agent can do

You do not call MCP tools yourself. Your agent picks the right tool based on what you ask for. Slash commands and prompts (below) are shortcuts that steer the agent toward common tasks, but plain language works too (“generate an image of a cat astronaut”, “upscale this photo”, “find a Wan 2.2 video template”). Typical flow:
  1. Discover what is available (search_templates, search_models, search_nodes, or cql for graph-style questions).
  2. Run a generation: run_template for a matching pre-built template, submit_workflow for a custom workflow (with upload_file when an input image is needed), or partner_generate for partner models like Flux, Grok, Gemini, OpenAI, Ideogram, and Seedance.
  3. Wait and retrieve outputs (wait_for_job, then get_output returns a download command your agent runs in your shell).
The server prefers matching pre-built templates before building a workflow from scratch, which tends to produce better results faster.

Cloud MCP tools

These are the tools your agent has access to once connected. Names match what appears in MCP client logs and debugging output. Discovery Generation Jobs and batches Saved workflows Sharing workflows Hub URL share IDs: the trailing hyphen-delimited hex token in a comfy.org/workflows/<slug>-<hex> hub URL is the share ID. For example, comfy.org/workflows/topaz-starlight-upscale-1c77e82713b7 has share ID 1c77e82713b7. Pass that token to import_shared_workflow as share_id. The share_url parameter only accepts ?share=<id> query URLs like https://cloud.comfy.org/?share=..., not hub page URLs. Apps and links Account and session Prompts (Claude Desktop) Claude Desktop does not support Claude Code slash commands. Instead, open the prompt picker for the same workflows: You can also skip prompts and ask in plain language. The MCP tools work the same way.

Credits and spending

Discovery is free: search_templates, search_models, and search_nodes work with just a Comfy account. Running generations requires an active Comfy Cloud subscription. A credit or top-up balance alone does not grant access: you need an active subscription to run generations, even if you have unused credits.

Uploads and downloads

The MCP server runs in the cloud and the MCP itself doesn’t write files to your machine. When a generation completes, your agent calls get_output, which returns:
  1. A temporary signed download URL (valid for a short window).
  2. A ready-to-run shell command (curl on macOS and Linux, curl.exe on Windows).
Your agent should run that command in your shell. The command includes the destination path and filename.
Run the returned command verbatim. Do not re-encode or edit the signed URL. The signature lives in the query string and breaks if the URL is modified.
If your MCP client cannot run shell commands (some GUI-only setups), copy the command and run it yourself in a terminal. Asset upload and download depend on the client’s file access. If Claude Desktop or another agent client has trouble handling asset uploads or downloads, it may be related to the agent’s access to your local file directories. For Claude users we recommend Claude Code (desktop app or terminal), which has more capabilities. Similarly, for other agent families, the coding agent is usually better than the web chat version.

Known limitations

Comfy Cloud MCP is an early release. These limitations are known and being worked on: Workflows
  • Assets generated via submit_workflow may not embed workflow metadata. They might not reopen the originating workflow when opened in ComfyUI.
  • Workflow building depends on agent accuracy. Complex multi-node workflows may need a retry or refinement.
File handling
  • Outputs require a shell download step. See Uploads and downloads.
  • Upload size limits may apply depending on your MCP client. Some clients impose their own limits on file uploads.
Authentication
  • OAuth or API key. Claude Code and Claude Desktop use a one-time browser OAuth flow. Cursor requires a Comfy Cloud API key in your MCP config (no OAuth). Other headless clients can pass a Comfy Cloud API key via the X-API-Key header instead. A device-code OAuth flow for clients that cannot open a browser is planned.

Local Comfy MCP Connection

The open-source connection: your client launches the server on your machine and it drives the ComfyUI installed there. comfy-mcp is Comfy’s first-party local MCP server — the official way to drive a local ComfyUI install from AI agents (Claude Code, Claude Desktop, Cursor, and other MCP clients). 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.
The fastest setup: hand it to your agent. Paste https://docs.comfy.org/agent-tools/mcp#installation into your AI client and ask it to set up the local connection for you.

Requirements

  • Python 3.10+
  • comfy-cli on your PATH (pip install "comfy-cli>=1.14.0") — the engine every tool wraps
  • A ComfyUI workspace — create one with comfy install if you don’t have one (an existing checkout works via comfy set-default <path>)
  • A running ComfyUI for execution tools. Start it with comfy launch, or call launch_comfyui. The server does not launch ComfyUI implicitly.

Installation

From PyPI:
This puts a comfy-mcp console script on your PATH — that command is the MCP server (it speaks MCP over stdio). Point your AI client at it below. (Hacking on the server itself? pip install -e . from a checkout of the repository instead.)
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.

Manual configuration

All clients speak the same MCP stdio contract: run the comfy-mcp command as a server. Pick your client:
Edit claude_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:

Quickstart

Zero to a generated image:
1

Install the pieces

2

Launch ComfyUI and leave it running

3

Add the server to your client

Use the snippet for your client above, then restart / reload it so the tools appear.
4

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 a comfy-cli command, run with --where local. Highlights: Node introspection and model search read your live install — custom nodes included — which is the local differentiator from the cloud connection. See the repository for the full tool list and reference.
Want the agent experience inside Comfy Cloud (chat that builds and edits your graph), not an external MCP client?

Comfy In-App Agent

Private alpha on Comfy Cloud. Join the waitlist to request access.

Feedback

Comfy MCP is in public beta. Please try it out and tell us what works and what doesn’t:

FAQ

Getting started

Any MCP-compatible client.The cloud connection needs remote HTTP support. Claude Code, Claude Desktop, Cursor, Codex and OpenClaw have first-class setup above; Windsurf, Amp and others use the same URL with OAuth or an API key.The local connection needs a client that can launch a local stdio server as a subprocess. That rules out browser-based clients. claude.ai and ChatGPT accept remote connectors only.
The cloud connection runs at https://cloud.comfy.org/mcp.The local connection has no URL. Your client launches the comfy-mcp command directly and talks to it over stdio.
Yes. That is the Local Comfy MCP Connection. It drives the ComfyUI installed on your own machine, so your agent sees the models, LoRAs and custom nodes you actually have, and runs on your GPU.
Yes, and we recommend it if you run ComfyUI locally. Most clients host two MCP servers happily, and your agent keeps them straight. Each connection runs its own workflows and returns its own results.The two sign-ins are separate, though. Signing in on one does not sign you in on the other, even though it is the same Comfy account.
Ask your agent. It reads your hardware before starting anything heavy.On a Mac, use the cloud connection for generating: today’s open-weight models are too large to run at a workable speed on the Apple GPU. On a PC with a dedicated graphics card, 24 GB or more of VRAM handles most things including video; 8–24 GB is fine for images but video will be slow or will not fit; under 8 GB, use cloud.
The cloud connection is in public beta. APIs, tools and behavior may change while we iterate. The local connection is available for local ComfyUI installations. See Feedback to report issues.

Cost and access

Discovery is free on both connections: searching templates, models and nodes needs only a Comfy account.On the cloud connection, running generations requires an active Comfy Cloud subscription; new users get 5 free runs. On the local connection, runs are free because they happen on your hardware, with one exception: partner models execute on partner infrastructure and spend credits.
Not for interactive clients that support OAuth, including Claude Code, Claude Desktop, Codex and OpenClaw.Cursor requires a Comfy Cloud API key in your MCP config; there is no MCP OAuth there yet. Headless and CI setups with no browser need one too. See the Cursor and Other clients tabs under Set up the cloud connection.

Using it

You do not call MCP tools yourself — your agent picks them based on what you ask for. Typically it discovers what is available (search_templates, search_models, search_nodes), runs a generation, then waits and retrieves the output. See What your agent can do.
On the cloud connection, the server never writes to your machine: get_output returns a temporary signed URL and a ready-to-run download command for your agent to execute in your shell. See Uploads and downloads.On the local connection, ComfyUI writes into your workspace’s output/ directory, and fetch_outputs(prompt_id, out_dir) copies a finished job’s files anywhere you name.
Nothing to undo — add the second connection alongside the first.Going local → cloud (you need Cloud GPUs or partner models): ask your agent to sign you in, then add https://cloud.comfy.org/mcp to your client.Going cloud → local (you want your own models and custom nodes): install ComfyUI and the local server, then point your client at it. Your agent can do most of this for you.
Just ask your agent. With both connections added, say where you want a job to run — “run this one on Comfy Cloud”, “do this locally” — and it uses the right connection. There is no mode to toggle and nothing to reconfigure between runs.If a workflow turns out to be too heavy for your machine, your agent can tell you and offer to run it on Comfy Cloud instead. And if only one connection is set up, ask it to add the other — see Set up the cloud connection or the Local Comfy MCP Connection.
On the cloud connection, nothing to do — it is hosted, so you are always on the current version.On the local connection, ask your agent to handle it. Afterwards, restart your client or start a new session: MCP servers load when a session starts, so a running one keeps serving the old version until you do.

Troubleshooting

No. Slash commands ship in the Claude Code plugin. Claude Desktop connects to the same MCP server — the tools work if you ask in plain language or use the prompt picker — but it does not support Claude Code plugins or slash commands.
There is no /comfy or /cloud command. Commands appear under one of two prefixes depending on how you connected:
  • Plugin (recommended): /comfy-cloud:generate-image, /comfy-cloud:generate-video, … — type /comfy-cloud: to see them all.
  • Direct connection (no plugin): /mcp__comfy-cloud__generate-image, … — type /mcp__ to see them.
Either way you can just ask in plain language (“generate an image of …”). The MCP tools are model-invoked and do not require a slash command.
In Claude Code, run /mcp, select comfy-cloud, and choose Authenticate. In Claude Desktop, reopen the connector from Customize → Connectors and trigger sign-in.