diff --git a/cloud/mcp.mdx b/cloud/mcp.mdx new file mode 100644 index 000000000..3c3ecd4b3 --- /dev/null +++ b/cloud/mcp.mdx @@ -0,0 +1,135 @@ +--- +title: "Connect to Claude (MCP)" +description: "Use Comfy Cloud from Claude Code and Claude Desktop through the Comfy Cloud MCP server — generate images, video, audio, and 3D, search models and nodes, and run workflows." +--- + +import CloudFeature from '/snippets/cloud-feature.mdx' + + + +## Overview + +The **Comfy Cloud MCP server** connects AI agents to [Comfy Cloud](https://cloud.comfy.org) over the [Model Context Protocol](https://modelcontextprotocol.io). Once connected, you can generate images, video, audio, and 3D, search models, nodes, and templates, and run ComfyUI workflows — all from a chat with your agent. + +Support is currently scoped to **Claude Code** and **Claude Desktop**, which sign in with **OAuth** — a one-time browser sign-in. Support for more clients is coming. + +## Install + +Pick your client: + + + + Install the plugin — connection and commands in one step. + + + Add a custom connector in the app, then sign in. + + + +### Claude Code + +Install the **comfy-cloud** plugin — it adds the MCP connection and the slash commands in one step. + + + + ``` + /plugin marketplace add Comfy-Org/comfy-skills + ``` + + + ``` + /plugin install comfy-cloud@comfy-skills + ``` + + + Run `/mcp`, select **comfy-cloud** → **Authenticate**. Your browser opens to sign in, and tokens refresh automatically. + + + +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 | +| `/comfy-cloud:generate-3d` | Generate a 3D model | +| `/comfy-cloud:remove-background` | Remove the background from an image | +| `/comfy-cloud:upscale-image` | Upscale an image | +| `/comfy-cloud:search-models` | Search available models | +| `/comfy-cloud:search-nodes` | Search for nodes | +| `/comfy-cloud:search-templates` | Find pre-built workflows | +| `/comfy-cloud:help` | See what you can do | + + + Add the server directly (no slash commands): + + ```bash + 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. + + +### Claude Desktop + +Claude Desktop adds Comfy Cloud as a **custom connector** through its UI, then runs the OAuth sign-in. + + + + In Claude Desktop, open **Customize**, then choose **Connectors**. + + ![Claude Desktop Connectors](/images/cloud/mcp/desktop-connectors.png) + + + Click the **+** button, then choose **Add custom connector**. + + ![Add custom connector](/images/cloud/mcp/desktop-add-custom-connector.png) + + + Name it anything (for example, *Comfy Cloud*) and set the **Remote MCP server URL** to: + + ``` + https://cloud.comfy.org/mcp + ``` + + ![Connector details](/images/cloud/mcp/desktop-connector-url.png) + + + Click **Add**, then sign in through Claude Desktop when prompted. You are connected. + + ![Sign in through Claude Desktop](/images/cloud/mcp/desktop-signin.png) + + + +### Headless / CI (API key) + +Claude Code and Claude Desktop use OAuth, so you do not need an API key. For **headless or CI** setups where no browser is available, authenticate with an API key instead: + + + + Go to [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys), click **New API Key**, and copy it (it starts with `comfyui-`). + + + ```bash + claude mcp add --transport http comfy-cloud https://cloud.comfy.org/mcp -H "X-API-Key: comfyui-…" + ``` + + + +## FAQ + + + + Claude Code and Claude Desktop today, both signing in with OAuth. Support for more clients is coming. + + + Not for Claude Code or Claude Desktop — they use OAuth. An API key is only needed for headless or CI setups with no browser. + + + No. The slash commands ship in the Claude Code plugin. Claude Desktop connects to the same MCP server (so the tools work — just ask in plain language), but it doesn't support Claude Code plugins or slash commands. + + + In Claude Code, run `/mcp`, select **comfy-cloud**, and choose **Authenticate**. In Claude Desktop, reopen the connector from **Customize → Connectors** and trigger sign-in. + + diff --git a/development/cloud/mcp-server.mdx b/development/cloud/mcp-server.mdx index 4c0d1c4bf..6d64ff064 100644 --- a/development/cloud/mcp-server.mdx +++ b/development/cloud/mcp-server.mdx @@ -23,7 +23,15 @@ Comfy Cloud MCP connects AI assistants — including Claude Desktop, Claude Code **OAuth (no API key to paste)** — In **Claude Code** or **Claude Desktop**, add the remote server `https://cloud.comfy.org/mcp` and use the client’s **Authenticate** control to sign in with your Comfy account. Partner generation and workflows use the same tools once connected. -**API key** — Still fully supported. Use the one-click installer or manual setup below if your client does not offer OAuth, or if you prefer a key. +For **Claude web & Desktop**, the fastest way to add the server is the one-click Connectors link — no config file to edit: + + + + Opens Claude’s **Add custom connector** dialog with the Comfy Cloud server URL (`https://cloud.comfy.org/mcp`) pre-filled. Click **Add**, then **Connect** to sign in with OAuth. Custom connectors require a paid Claude plan (Pro, Max, Team, or Enterprise). OAuth sign-in is still rolling out (see the note below) — until it works for you, use an API key. + + + +**API key** — Still fully supported. Use the manual setup below if your client does not offer OAuth, or if you prefer a key. **OAuth rollout.** The MCP server already accepts OAuth on production, but sign-in may not work end-to-end for everyone until the next Comfy Cloud production deployment finishes (the discovery endpoint must catch up). Until OAuth works for you, use an API key — existing API-key setups are unchanged. @@ -37,24 +45,6 @@ If you use an API key and do not have one yet, see the guide to get one: -### Install & Connect (API key) - -The one-click installer detects your MCP client (Claude Code, Cursor, Amp), asks for your Comfy API key, and configures the remote MCP server — no Node.js or other dependencies required. - - - - ```bash - curl -fsSL https://raw.githubusercontent.com/Comfy-Org/comfy-cloud-mcp/main/install.sh | bash - ``` - - - - ```powershell - irm https://raw.githubusercontent.com/Comfy-Org/comfy-cloud-mcp/main/install.ps1 | iex - ``` - - - ### Manual setup with API key Comfy Cloud MCP is hosted at `https://cloud.comfy.org/mcp`. Point your MCP client at that URL with your API key: diff --git a/docs.json b/docs.json index a30c5bcb5..da11b2cca 100644 --- a/docs.json +++ b/docs.json @@ -115,7 +115,8 @@ "icon": "cloud", "pages": [ "cloud/share-workflow", - "cloud/import-models" + "cloud/import-models", + "cloud/mcp" ] } ] diff --git a/images/cloud/mcp/desktop-add-custom-connector.png b/images/cloud/mcp/desktop-add-custom-connector.png new file mode 100644 index 000000000..293f2f5ae Binary files /dev/null and b/images/cloud/mcp/desktop-add-custom-connector.png differ diff --git a/images/cloud/mcp/desktop-connector-url.png b/images/cloud/mcp/desktop-connector-url.png new file mode 100644 index 000000000..7fa6fb267 Binary files /dev/null and b/images/cloud/mcp/desktop-connector-url.png differ diff --git a/images/cloud/mcp/desktop-connectors.png b/images/cloud/mcp/desktop-connectors.png new file mode 100644 index 000000000..174baec24 Binary files /dev/null and b/images/cloud/mcp/desktop-connectors.png differ diff --git a/images/cloud/mcp/desktop-signin.png b/images/cloud/mcp/desktop-signin.png new file mode 100644 index 000000000..7ed36a9c9 Binary files /dev/null and b/images/cloud/mcp/desktop-signin.png differ diff --git a/ja/development/cloud/mcp-server.mdx b/ja/development/cloud/mcp-server.mdx index 2577afc19..339de4cc8 100644 --- a/ja/development/cloud/mcp-server.mdx +++ b/ja/development/cloud/mcp-server.mdx @@ -23,7 +23,15 @@ Comfy Cloud MCPは、[モデルコンテキストプロトコル(MCP)](https **OAuth(API キーの貼り付け不要)** — **Claude Code** または **Claude Desktop** でリモートサーバー `https://cloud.comfy.org/mcp` を追加し、クライアントの **Authenticate** から Comfy アカウントでサインインします。接続後はパートナー生成もワークフローも同じツールで利用できます。 -**API キー** — 引き続き完全にサポートされています。OAuth に未対応のクライアント、またはキーを使いたい場合は、下記のワンクリックインストールまたは手動設定をご利用ください。 +**Claude(Web・Desktop)** では、ワンクリックの Connectors リンクが最速です。設定ファイルの編集は不要です: + + + + Claude の **カスタムコネクタを追加** ダイアログを、Comfy Cloud のサーバー URL(`https://cloud.comfy.org/mcp`)が事前入力された状態で開きます。**追加** をクリックし、**接続** で OAuth サインインします。カスタムコネクタには有料の Claude プラン(Pro、Max、Team、Enterprise)が必要です。OAuth サインインは段階的に展開中です(下記の注意を参照)。利用できるようになるまでは API キーをご利用ください。 + + + +**API キー** — 引き続き完全にサポートされています。OAuth に未対応のクライアント、またはキーを使いたい場合は、下記の手動設定をご利用ください。 **OAuth の段階的ロールアウト。** MCP サーバーは本番で OAuth を受け付けますが、次の Comfy Cloud 本番デプロイが完了するまで(ディスカバリーエンドポイントの同期が必要)、一部のユーザーでは端到端のサインインがまだ動作しない場合があります。OAuth が使えない間は API キーをご利用ください。既存の API キー設定に変更はありません。 @@ -37,24 +45,6 @@ API キーを使用する場合で、まだお持ちでない場合は以下の -### インストールと接続(API キー) - -ワンクリックインストーラは MCP クライアント(Claude Code、Cursor、Amp)を自動検出し、Comfy API キーを確認してリモート MCP サーバーを設定します。Node.js やその他の依存関係は不要です。 - - - - ```bash - curl -fsSL https://raw.githubusercontent.com/Comfy-Org/comfy-cloud-mcp/main/install.sh | bash - ``` - - - - ```powershell - irm https://raw.githubusercontent.com/Comfy-Org/comfy-cloud-mcp/main/install.ps1 | iex - ``` - - - ### API キーで手動設定 Comfy Cloud MCPは `https://cloud.comfy.org/mcp` でホストされています。MCP クライアントをその URL に向け、API キーを設定します: diff --git a/zh/development/cloud/mcp-server.mdx b/zh/development/cloud/mcp-server.mdx index e4649ca8c..e9fdda6f1 100644 --- a/zh/development/cloud/mcp-server.mdx +++ b/zh/development/cloud/mcp-server.mdx @@ -23,7 +23,15 @@ Comfy Cloud MCP通过[模型上下文协议(MCP)](https://modelcontextprotoc **OAuth(无需粘贴 API 密钥)** — 在 **Claude Code** 或 **Claude Desktop** 中添加远程服务器 `https://cloud.comfy.org/mcp`,使用客户端的 **Authenticate** 通过 Comfy 账号登录。连接成功后,合作节点生成与工作流工具用法相同。 -**API 密钥** — 仍完全支持。若客户端不支持 OAuth,或你更习惯使用密钥,请使用下方的一键安装或手动配置。 +对于 **Claude(网页版与桌面版)**,最快的添加方式是一键 Connectors 链接——无需编辑配置文件: + + + + 打开 Claude 的 **添加自定义连接器** 对话框,并预填 Comfy Cloud 服务器 URL(`https://cloud.comfy.org/mcp`)。点击 **添加**,然后点击 **连接** 通过 OAuth 登录。自定义连接器需要付费的 Claude 套餐(Pro、Max、Team 或 Enterprise)。OAuth 登录仍在逐步开放(见下方说明)——在可用之前请使用 API 密钥。 + + + +**API 密钥** — 仍完全支持。若客户端不支持 OAuth,或你更习惯使用密钥,请使用下方的手动配置。 **OAuth 逐步开放。** MCP 服务端已在生产环境支持 OAuth,但在下一次 Comfy Cloud 生产部署完成前(发现端点需同步更新),部分用户可能还无法完成端到端登录。若 OAuth 暂时不可用,请继续使用 API 密钥——现有 API 密钥配置不受影响。 @@ -37,24 +45,6 @@ Comfy Cloud MCP通过[模型上下文协议(MCP)](https://modelcontextprotoc -### 安装与连接(API 密钥) - -一键安装脚本会自动检测你的 MCP 客户端(Claude Code、Cursor、Amp),询问 Comfy API 密钥并配置远程 MCP 服务器——无需 Node.js 或其他依赖。 - - - - ```bash - curl -fsSL https://raw.githubusercontent.com/Comfy-Org/comfy-cloud-mcp/main/install.sh | bash - ``` - - - - ```powershell - irm https://raw.githubusercontent.com/Comfy-Org/comfy-cloud-mcp/main/install.ps1 | iex - ``` - - - ### 使用 API 密钥手动配置 Comfy Cloud MCP 托管在 `https://cloud.comfy.org/mcp`。将 MCP 客户端指向该 URL 并提供 API 密钥: