Comfy Cloud MCP
Comfy Cloud için resmi MCP sunucusu - görüntü, video, ses ve 3D oluşturun, ComfyUI iş akışlarını çalıştırın ve Claude ile diğer AI ajanlarından doğrudan modeller arayın.
Dokümantasyon
Comfy MCP
**Public beta.** Comfy MCP is in public beta. APIs, tools, and behavior may change while we iterate. See [Feedback](#feedback) to report issues or share suggestions.Connect any AI agent to ComfyUI on Comfy Cloud GPUs or on your own machine. Generate images, video, audio and 3D, search models, nodes and templates, and run real workflows.
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](https://cloud.comfy.org) account before connecting. [Sign up](https://cloud.comfy.org) 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:
https://cloud.comfy.org/mcp
Pick your client:
Claude Desktop adds Comfy Cloud as a **custom connector** through its UI, then runs the OAuth sign-in.<video controls className="w-full aspect-video rounded-xl" src="https://mintcdn.com/dripart/UM6LYOmx4pqCW3H7/images/agent_tools/Claude_desktop.mp4?fit=max&auto=format&n=UM6LYOmx4pqCW3H7&q=85&s=6bb8cfd8fcf2c004809bf23f7a42ee41" data-path="images/agent_tools/Claude_desktop.mp4" />
<Steps>
<Step title="Open Customize">
In the sidebar, click **Customize** (labeled **1**).
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/claude_desktop_mcp_setup_step1.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=3ecfb670bf79af89d160544ed2352e3c" alt="Claude Desktop — open Customize" width="712" height="842" data-path="images/agent_tools/claude_desktop_mcp_setup_step1.png" />
</Step>
<Step title="Open Connectors">
Click **Connectors** (labeled **2**).
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/claude_desktop_mcp_setup_step2.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=b38a899b51042ea6142dc4bf34c23582" alt="Claude Desktop — open Connectors" width="856" height="811" data-path="images/agent_tools/claude_desktop_mcp_setup_step2.png" />
</Step>
<Step title="Add a custom connector">
1. Click the **+** button (labeled **3**) in the Connectors header.
2. Choose **Add custom connector** (labeled **4**).
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/claude_desktop_mcp_setup_step3.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=fc8a799aa218a2cf10de4cbd9d6d060f" alt="Claude Desktop — add custom connector" width="1314" height="792" data-path="images/agent_tools/claude_desktop_mcp_setup_step3.png" />
</Step>
<Step title="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**).
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/claude_desktop_mcp_setup_step4.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=7b3f175799b8a02ecdbd1e73feb37831" alt="Claude Desktop — connector details" width="1535" height="955" data-path="images/agent_tools/claude_desktop_mcp_setup_step4.png" />
</Step>
<Step title="Sign in">
1. When the browser opens, choose your workspace (for example **Personal Workspace**).
2. Click **Continue** to authorize the connector. You are connected.
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/auth.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=a98bd22924e6fcaf791f72e02dc0bd5c" alt="Comfy Cloud MCP authorization" width="2718" height="1480" data-path="images/agent_tools/auth.png" />
</Step>
</Steps>
Install the **comfy-cloud** plugin. It adds the MCP connection and slash commands in one step. The plugin is published through the [Comfy Skills](https://github.com/Comfy-Org/comfy-skills/) repository, which hosts Claude Code plugins and community agent skills for Comfy.
<Steps>
<Step title="Add the marketplace">
Register the Comfy Skills marketplace (one-time):
```
/plugin marketplace add Comfy-Org/comfy-skills
```
</Step>
<Step title="Install the plugin">
```
/plugin install comfy-cloud@comfy-skills
```
</Step>
<Step title="Sign in">
Run `/mcp`, select **comfy-cloud** → **Authenticate**. Your browser opens to sign in, and tokens refresh automatically.
</Step>
</Steps>
The plugin adds these slash commands:
| Command | What it does |
| -------------------------------- | ------------------------------------------------------------------- |
| `/comfy-cloud:generate-image` | Generate, edit, or modify an image |
| `/comfy-cloud:generate-video` | Generate, edit, or extend a video |
| `/comfy-cloud:generate-audio` | Generate audio, music, or sound effects |
| `/comfy-cloud:generate-3d` | Generate a 3D model from text or an image |
| `/comfy-cloud:remove-background` | Remove the background from an image |
| `/comfy-cloud:upscale-image` | Upscale an image to higher resolution |
| `/comfy-cloud:search-templates` | Find pre-built workflow templates on [comfy.org](https://comfy.org) |
| `/comfy-cloud:search-models` | Search for available models |
| `/comfy-cloud:search-nodes` | Search for nodes and get wiring suggestions |
| `/comfy-cloud:help` | See what you can do with ComfyUI Cloud |
<Accordion title="Prefer just the connection, without the plugin?">
Add the server directly:
```bash theme={null}
claude mcp add --transport http comfy-cloud https://cloud.comfy.org/mcp
```
Then run `/mcp`, select **comfy-cloud** → **Authenticate**. Add `-s user` to make it available in all your projects.
This path still exposes the same workflows as MCP prompts: `/mcp__comfy-cloud__generate-image`, `/mcp__comfy-cloud__search-models`, and so on (the `/mcp__<name>__` prefix uses the name you passed to `claude mcp add`). The plugin above is recommended because it wraps these as the friendlier `/comfy-cloud:*` commands.
</Accordion>
Cursor connects to remote MCP servers over HTTP. Cursor does **not** support MCP OAuth today. Add Comfy Cloud with a Comfy Cloud API key in your MCP config.
<Steps>
<Step title="Open Cursor Settings">
Click the **Settings** gear in the top-right corner (labeled **1**).
<img src="https://mintcdn.com/dripart/mACqBeflyHg8jsn0/images/agent_tools/cursor_mcp_setup_step1.png?fit=max&auto=format&n=mACqBeflyHg8jsn0&q=85&s=29b7a2b1e73d952bdd243730c876319b" alt="Cursor — open Settings" width="2150" height="1516" data-path="images/agent_tools/cursor_mcp_setup_step1.png" />
</Step>
<Step title="Open Tools & MCP">
1. In the sidebar, click **Tools & MCPs** (labeled **2**).
2. Click **+ New MCP Server** (labeled **3**) → **Add a Custom MCP Server**.
<img src="https://mintcdn.com/dripart/mACqBeflyHg8jsn0/images/agent_tools/cursor_mcp_setup_step2.png?fit=max&auto=format&n=mACqBeflyHg8jsn0&q=85&s=286ee00e070b36f5f6c741f38171b13e" alt="Cursor — Tools & MCPs" width="2150" height="1516" data-path="images/agent_tools/cursor_mcp_setup_step2.png" />
</Step>
<Step title="Add your API key">
Edit `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project). Set the server URL and pass your Comfy Cloud API key in the `X-API-Key` header. Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) (starts with `comfyui-`):
```json theme={null}
{
"mcpServers": {
"comfy-cloud": {
"url": "https://cloud.comfy.org/mcp",
"headers": {
"X-API-Key": "${env:COMFY_API_KEY}"
}
}
}
}
```
Set `COMFY_API_KEY` in your shell or system environment. Prefer `${env:COMFY_API_KEY}` over hardcoding the key in a file you might commit to Git.
<img src="https://mintcdn.com/dripart/mACqBeflyHg8jsn0/images/agent_tools/cursor_mcp_setup_step3.png?fit=max&auto=format&n=mACqBeflyHg8jsn0&q=85&s=8e39c284d270a2035b438e10175c256e" alt="Cursor — mcp.json with API key" width="2150" height="1516" data-path="images/agent_tools/cursor_mcp_setup_step3.png" />
</Step>
<Step title="Start generating">
Ask in plain language ("generate an image of a cat astronaut", "find a Wan 2.2 video template"). Cursor invokes the MCP tools on your behalf.
</Step>
</Steps>
[Codex](https://developers.openai.com/codex/cli) connects to Comfy Cloud over Streamable HTTP. Add the server in Settings, then sign in with OAuth.
<video controls className="w-full aspect-video rounded-xl" src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/CodeX_Oauth_mcp.mp4?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=c09f1520aadfb3f325d7a166a56ba5a7" data-path="images/agent_tools/CodeX_Oauth_mcp.mp4" />
<Steps>
<Step title="Open the settings panel">
1. Click **Settings** (labeled **1**) under *Logged in with API key*.
2. Click **Settings** (labeled **2**) to open the full settings panel.
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/codex_mcp_setup_step1.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=da14a7540351620e759010debe90dab8" alt="Codex settings panel — step 1" width="1868" height="1278" data-path="images/agent_tools/codex_mcp_setup_step1.png" />
</Step>
<Step title="Open MCP server settings">
1. Click **MCP servers** (labeled **3**) in the settings list.
2. Click **+ Add server** (labeled **4**) to add a new MCP server.
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/codex_mcp_setup_step2.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=1ea1244dd7f937a81b8fa058775872bf" alt="Codex MCP servers — step 2" width="1888" height="1364" data-path="images/agent_tools/codex_mcp_setup_step2.png" />
</Step>
<Step title="Connect to Comfy Cloud">
1. Choose **Streamable HTTP** as the connection type.
2. Enter a name such as **Comfy Cloud MCP** in the **Name** field (labeled **5**).
3. Enter the URL `https://cloud.comfy.org/mcp` in the **URL** field (labeled **6**).
4. Click **Save** (labeled **7**).
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/codex_mcp_setup_step3.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=f704ee542861064b3dd0e373babeea02" alt="Codex add MCP server — step 3" width="1888" height="1364" data-path="images/agent_tools/codex_mcp_setup_step3.png" />
</Step>
<Step title="Authenticate">
1. Click **Authenticate** (labeled **8**) on the saved server entry.
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/codex_mcp_setup_step4.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=1afe7051207daa053cbadba8e620aa72" alt="Codex authenticate MCP server — step 4" width="1888" height="1364" data-path="images/agent_tools/codex_mcp_setup_step4.png" />
2. In the browser popup, choose your workspace and click **Continue** to finish signing in. You are connected.
<img src="https://mintcdn.com/dripart/oeEoB3PP1mIk3aIP/images/agent_tools/auth.png?fit=max&auto=format&n=oeEoB3PP1mIk3aIP&q=85&s=a98bd22924e6fcaf791f72e02dc0bd5c" alt="Comfy Cloud MCP authorization" width="2718" height="1480" data-path="images/agent_tools/auth.png" />
</Step>
</Steps>
Ask in plain language ("generate an image of a cat astronaut", "find a Wan 2.2 video template"). Codex invokes the MCP tools on your behalf.
<Accordion title="Prefer the CLI instead?">
Register and sign in from the terminal:
```bash theme={null}
codex mcp add comfy-cloud --url https://cloud.comfy.org/mcp
codex mcp login comfy-cloud
```
This writes an entry to `~/.codex/config.toml` (or `.codex/config.toml` in a trusted project).
</Accordion>
<Accordion title="API key instead of OAuth (headless or CI)">
When no browser is available, add the server with a header pulled from an environment variable. Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) (starts with `comfyui-`), then add to `~/.codex/config.toml`:
```toml theme={null}
[mcp_servers.comfy-cloud]
url = "https://cloud.comfy.org/mcp"
env_http_headers = { "X-API-Key" = "COMFY_API_KEY" }
```
Set `COMFY_API_KEY` in your shell or system environment. Do not commit the key to version control.
</Accordion>
Install the **Comfy Cloud** skill from [ClawHub](https://clawhub.ai/comfy-org/skills/comfy). It connects OpenClaw to the hosted MCP server (`cloud.comfy.org/mcp`). Cloud only: it does not drive a local ComfyUI install.
<Steps>
<Step title="Install the skill">
```bash theme={null}
openclaw skills install @comfy-org/comfy
```
Skill page: [clawhub.ai/comfy-org/skills/comfy](https://clawhub.ai/comfy-org/skills/comfy).
</Step>
<Step title="Connect with OAuth (recommended)">
Register the MCP server and sign in with your Comfy account:
```bash theme={null}
openclaw mcp set comfy '{"url":"https://cloud.comfy.org/mcp","transport":"streamable-http","auth":"oauth"}'
openclaw mcp login comfy
openclaw gateway restart
```
`openclaw mcp login` prints an authorization URL. Open it, sign in, and finish the flow as the CLI directs (it may ask you to rerun with a `--code` value). Verify with `openclaw mcp status --verbose`.
<Note>
When `auth: "oauth"` is set, OpenClaw ignores static `headers` on that server entry. Do not combine OAuth with a hardcoded API key header.
</Note>
</Step>
<Step title="Start generating">
Ask in plain language ("generate an image of a cat astronaut", "find a Wan 2.2 video template"). OpenClaw invokes the MCP tools on your behalf.
</Step>
</Steps>
<Accordion title="API key instead of OAuth (headless or CI)">
Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) (starts with `comfyui-`), export it, then register the server:
```bash theme={null}
export COMFY_API_KEY="comfyui-..."
openclaw mcp set comfy '{"url":"https://cloud.comfy.org/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer ${COMFY_API_KEY}"}}'
openclaw gateway restart
```
Prefer `Authorization: Bearer` over a custom `X-API-Key` header for OpenClaw. Some OpenClaw builds drop custom headers on streamable-http transports; Bearer survives proxies more reliably. Put `COMFY_API_KEY` in your shell profile or OpenClaw env. Do not commit the key.
</Accordion>
Any MCP client that supports **remote HTTP** transport can connect to Comfy Cloud. The server URL is always `https://cloud.comfy.org/mcp`.
<Steps>
<Step title="Add the server URL">
Add a remote MCP entry pointing at `https://cloud.comfy.org/mcp`. Most clients use a JSON config with a `url` field:
```json theme={null}
{
"mcpServers": {
"comfy-cloud": {
"url": "https://cloud.comfy.org/mcp"
}
}
}
```
**Windsurf** uses `serverUrl` instead of `url`. **Amp** uses the same `mcpServers` shape in **Settings → MCP Servers** or `~/.config/amp/settings.json`.
</Step>
<Step title="Authenticate">
If your client supports MCP OAuth, sign in through the browser when prompted. Otherwise, add an API key header (see below).
</Step>
<Step title="Restart and verify">
Restart your client. You should see Comfy Cloud tools (`search_templates`, `submit_workflow`, `get_output`, and others) registered under the **comfy-cloud** server.
</Step>
</Steps>
**Headless / CI (API key):** when OAuth is not available, create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) and pass it as the `X-API-Key` header:
```json theme={null}
{
"mcpServers": {
"comfy-cloud": {
"url": "https://cloud.comfy.org/mcp",
"headers": {
"X-API-Key": "comfyui-…"
}
}
}
}
```
For Claude Code from the terminal:
```bash theme={null}
claude mcp add --transport http comfy-cloud https://cloud.comfy.org/mcp -H "X-API-Key: comfyui-…"
```
Prefer `${env:COMFY_API_KEY}` or your client's secret interpolation instead of hardcoding keys in config files you commit to Git.
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:
- Discover what is available (
search_templates,search_models,search_nodes, orcqlfor graph-style questions). - Run a generation:
run_templatefor a matching pre-built template,submit_workflowfor a custom workflow (withupload_filewhen an input image is needed), orpartner_generatefor partner models like Flux, Grok, Gemini, OpenAI, Ideogram, and Seedance. - Wait and retrieve outputs (
wait_for_job, thenget_outputreturns 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
| Tool | Description |
|---|---|
search_templates | Search pre-built workflow templates from comfy.org by text, tag, media type, or model |
get_template | Fetch a template's full workflow JSON for inspection or hand-editing |
get_template_schema | See which of a template's parameters can be overridden at run time |
search_models | Search the model catalog by text, type, base model, or source |
search_nodes | Search available nodes by text, category, or input/output types. Also surfaces subgraph blueprints (pre-wired node groups like Text to Image or Remove Background) |
get_node | Get the complete input spec for specific nodes, including full option lists |
cql | Run a CQL graph query for structural questions (for example, which nodes produce images, or paths between node types). Use search_nodes when you need full input specs for a specific node |
get_prompting_guide | Prompt style and recommended settings (steps, cfg, sampler, resolution) per model family |
Generation
| Tool | Description |
|---|---|
run_template | Run a pre-built template by name, with optional parameter overrides — the preferred path when a template matches |
submit_workflow | Submit a ComfyUI API-format workflow for execution on Comfy Cloud |
partner_generate | Generate with partner-API models (Flux/BFL, Grok, Gemini, OpenAI, Ideogram, Seedream/Seedance, and more) |
upload_file | Upload an input image or file for use in workflows (for example, with LoadImage) |
apply_slots | Apply parameter overrides to a workflow's interior values and return the modified workflow |
Jobs and batches
| Tool | Description |
|---|---|
get_job_status | Poll execution status of a submitted workflow |
wait_for_job | Wait until a job finishes instead of polling repeatedly |
get_output | Retrieve output images, videos, or audio from a completed workflow |
use_previous_output | Chain workflows by reusing output from one run as input to another |
cancel_job | Cancel a pending or running job |
get_queue | Check how many jobs are running and pending |
submit_batch, get_batch_status, get_batch_output, wait_for_batch | Submit many generations in one call and collect them together later — the batch ID stays valid across sessions |
Saved workflows
| Tool | Description |
|---|---|
list_saved_workflows | Browse your saved workflows from Comfy Cloud |
get_saved_workflow | Inspect a saved workflow's nodes, inputs, and customizable settings |
save_workflow | Save a workflow to your Comfy Cloud account |
update_workflow | Update an existing workflow in place as a new version (earlier versions stay recoverable) |
run_saved_workflow | Run a saved workflow by filename — the server converts it from editor format to executable format automatically |
Sharing workflows
| Tool | Description |
|---|---|
share_workflow | Publish a saved workflow and return a ?share=<id> URL anyone can open |
import_shared_workflow | Resolve a share URL or bare share ID into workflow JSON, optionally saving it to your account |
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
| Tool | Description |
|---|---|
create_app | Turn a saved workflow into an App Mode app — a simplified "run this workflow" view with chosen inputs and outputs |
get_app_mode_url | Get the stable link that opens a workflow as a runnable app |
get_workflow_canvas_url | Get a link that opens a workflow directly on the Comfy Cloud canvas, ready to view, edit, or run |
Account and session
| Tool | Description |
|---|---|
get_billing_status | Check your credit balance, subscription tier, and billing link |
get_server_info | Confirm which server the agent reached: environment, host, version, and auth state |
submit_feedback | Get the beta feedback survey link |
report_session_summary | Share an anonymized session summary with the Comfy team — only with your explicit consent; the agent must ask first, and no prompts, file paths, or personal information are included |
Prompts (Claude Desktop)
Claude Desktop does not support Claude Code slash commands. Instead, open the prompt picker for the same workflows:
| Prompt | Description |
|---|---|
generate-image | Generate an image from a text description |
generate-video | Generate a video from text or an image |
generate-audio | Generate audio, music, or sound effects |
generate-3d | Generate a 3D model from text or an image |
upscale-image | Upscale an image to higher resolution |
remove-background | Remove the background from an image |
search-templates | Find pre-built workflow templates |
search-models | Search for models (checkpoints, LoRAs, VAEs) |
search-nodes | Search nodes and get wiring suggestions |
help | See what you can do with ComfyUI Cloud |
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:
- A temporary signed download URL (valid for a short window).
- A ready-to-run shell command (
curlon macOS and Linux,curl.exeon 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_workflowmay 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-Keyheader 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 installif you don't have one (an existing checkout works viacomfy set-default <path>) - A running ComfyUI for execution tools. Start it with
comfy launch, or calllaunch_comfyui. The server does not launch ComfyUI implicitly.
Installation
From PyPI:
pip install comfy-mcp
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.)
Manual configuration
All clients speak the same MCP stdio contract: run the comfy-mcp command as a server. Pick your client:
```json theme={null}
{
"mcpServers": {
"comfy-mcp": {
"command": "comfy-mcp",
"env": { "COMFY_BIN": "/path/to/venv/bin/comfy" }
}
}
}
```
One command registers the server:
```bash theme={null}
claude mcp add comfy-mcp -e COMFY_BIN=/path/to/venv/bin/comfy -- comfy-mcp
```
Or check it into a project with a `.mcp.json` at the repo root:
```json theme={null}
{
"mcpServers": {
"comfy-mcp": {
"command": "comfy-mcp",
"env": { "COMFY_BIN": "/path/to/venv/bin/comfy" }
}
}
}
```
Add the server to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project):
```json theme={null}
{
"mcpServers": {
"comfy-mcp": {
"command": "comfy-mcp",
"env": { "COMFY_BIN": "/path/to/venv/bin/comfy" }
}
}
}
```
Quickstart
Zero to a generated image:
```bash theme={null} pip install "comfy-cli>=1.14.0" # the engine comfy install # create a ComfyUI workspace (skip if you have one) pip install comfy-mcp # this MCP server → the `comfy-mcp` command ``` ```bash theme={null} comfy launch ``` Use the snippet for your client above, then restart / reload it so the tools appear. 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:
| 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. |
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.
Related resources
| Resource | What it's for |
|---|---|
| Comfy Skills | Claude Code plugin marketplace and community skill library. The comfy-cloud plugin used above is distributed here; browse or contribute additional skills for Comfy workflows. |
| Comfy Cloud on ClawHub | OpenClaw skill (openclaw skills install @comfy-org/comfy) for the hosted Comfy Cloud MCP server. |
| Comfy CLI | Command-line tool for local ComfyUI install/launch and for calling hosted partner nodes from scripts or CI (comfy generate, in beta). Complements MCP when you need terminal or automation workflows. |
| Share a workflow on Comfy Cloud | Share workflows from the Comfy Cloud UI (the MCP share_workflow tool does this from an agent session). |
Related: Comfy In-App Agent
Want the agent experience inside Comfy Cloud (chat that builds and edits your graph), not an external MCP client?
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:
- Feedback survey: report bugs, request features, or share general impressions.
- Discord: #comfy-mcp-and-cli on the Comfy Discord for questions and discussion.
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](https://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](#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](#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](#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](#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](#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](#set-up-the-cloud-connection) or the [Local Comfy MCP Connection](#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.