Runcomfy Mcp

io.github.runcomfy-com由 GitHub 账号 runcomfy-com 发布v1.1.0更新于 Oct 24, 2026

Remote MCP for RunComfy: ComfyUI deployments, hosted models, LoRA training. 31 tools.

已验证Streamable HTTP可网页运行云端与基础设施媒体与设计AI 与机器学习

概览

AI 生成的概览

RunComfy 远程 MCP 服务器,让助手管理 ComfyUI 部署、运行托管模型、训练 LoRA 并查询账户余额。

可以做什么
管理 ComfyUI 部署:列出、查看、创建、更新和删除专用端点,提交并跟踪推理请求,调用实例代理。浏览并运行托管目录模型:列出模型和分类,读取模型输入结构,运行模型,轮询状态并获取或取消结果。处理训练数据集:创建、列出、查看状态、删除,并通过 URL、内联文本或签名上传地址上传文件。提交、监控、恢复、编辑和取消 LoRA 训练任务并获取检查点。以美元或微美元查询共享账户余额。
适用场景
适合让助手端到端驱动 RunComfy 的图像、视频和 LoRA 工作流:部署 ComfyUI 端点、用托管模型生成媒体,或准备数据集并训练 LoRA,而无需离开对话。
运行要求
远程 Streamable HTTP 端点,无需本地安装。需要 RunComfy 账户及 Profile 页面获取的 API 令牌,通过 Authorization Bearer 请求头发送,或对支持的客户端使用浏览器 OAuth 2.1。需要访问 RunComfy API 的网络。服务器无法读取本地文件,输入须为公开 HTTPS URL 或通过签名地址上传。
安装前请注意
所有工具都作用于付费 RunComfy 账户:部署、模型运行和训练任务均按请求从同一钱包计费,助手操作可能产生费用。工具会创建、更新、删除部署和数据集,提交和取消任务,并上传文件。Authorization 令牌拥有完整账户权限;重新生成令牌会撤销访问。上传的媒体和说明文字会发送到 RunComfy 服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Runcomfy Mcp,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.runcomfy-com%2Fruncomfy-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "runcomfy": {
      "type": "http",
      "url": "https://mcp.runcomfy.com/mcp"
    }
  }
}

README

RunComfy MCP

MCP server for the RunComfy platform — Serverless API (ComfyUI), Model API, and Trainer API. Manage deployments, run hosted models, train LoRAs, and retrieve results from AI assistants like Claude, Cursor, and Windsurf.

Endpoint: https://mcp.runcomfy.com/mcp

Docs: docs.runcomfy.com/mcp


What it does

31 tools mirroring the RunComfy docs 1:1, across three products plus your account balance.

Serverless API (ComfyUI) — your own workflows on dedicated endpoints

Docs: docs.runcomfy.com/serverless

CategoryTools
Deployment managementlist_deployments, get_deployment, create_deployment, update_deployment, delete_deployment
Inferencesubmit_request, get_request_status, get_request_result, cancel_request
Advancedcall_instance_proxy

Model API — hosted catalog models, on demand

Docs: docs.runcomfy.com/model-apis

CategoryTools
Cataloglist_models, get_model, list_model_categories
Inferencerun_model, get_model_request_status, get_model_request_result, cancel_model_request

No deployment to manage and per-request billing. list_models browses the catalog by keyword or capability (category=image-to-video), get_model returns one model's input schema — property types, defaults, enums, and ranges — and run_model runs it. So an assistant can go from "make me a video" to a valid request without leaving the tools or guessing a parameter.

Entries also carry description, base_price_usd per price_unit, and a model_url to the model's page.

model_id is the identifier shown on the model's page at runcomfy.com/models, slashes included — e.g. blackforestlabs/flux-1-kontext/pro/edit. File inputs must be public HTTPS URLs.

Trainer API — datasets and AI Toolkit LoRA training

Docs: docs.runcomfy.com/trainer-apis

CategoryTools
Datasetscreate_dataset, list_datasets, get_dataset_status, delete_dataset
Dataset uploadsupload_dataset_file_from_url, upload_dataset_text_file, get_dataset_upload_urls
Training jobssubmit_training_job, get_training_job_status, get_training_job_result, cancel_training_job, resume_training_job, edit_training_job

Typical flow: create a dataset → upload media and matching .txt captions → poll until READY → submit a job with an AI Toolkit YAML config → poll status → pull checkpoints from the result.

Because the server runs remotely it cannot read local files. Upload media it can reach over HTTP with upload_dataset_file_from_url, write captions inline with upload_dataset_text_file, and for local or >150 MB files use get_dataset_upload_urls and PUT the bytes to the signed URL yourself.

Account

CategoryTools
Balanceget_balance

One wallet funds all three products. get_balance reports what is left, in balance_usd for reading and balance_microdollars (millionths of a dollar) for exact threshold checks. It is served from api.runcomfy.net rather than mirrored per product, because there is only one figure to report.

Crossing between them

A trained LoRA runs without any deployment: pass its base model's model_id to run_model and the LoRA as an input, e.g. {"lora": {"path": "my_first_lora_3000.safetensors"}} — either a name from your LoRA Assets or a public URL such as a checkpoint from get_training_job_result. For a dedicated endpoint with chosen hardware, deploy it and use the Serverless tools instead.


Quick setup

Every client authenticates with a RunComfy API token from your Profile page. Two ways to supply it:

  • API token header — works in any Streamable HTTP client. Simplest, and the only option for clients without a browser OAuth flow.
  • Browser OAuth — no token in a config file. Supported by Claude.ai, Cursor, and local clients that register a loopback callback, such as Claude Code.

Claude Code

Token header (one command, nothing else to do):

bash
claude mcp add --transport http runcomfy https://mcp.runcomfy.com/mcp --header "Authorization: Bearer YOUR_RUNCOMFY_TOKEN"

Or browser OAuth — omit the header, then run /mcp inside Claude Code and pick Authenticate:

bash
claude mcp add --transport http runcomfy https://mcp.runcomfy.com/mcp

--transport http is the Streamable HTTP transport. streamable-http is not a value Claude Code accepts, and single-dash -transport / -header are not either — both forms fail before the server is ever contacted.

Check it with claude mcp list, which should show runcomfy: connected.

Claude.ai

Add https://mcp.runcomfy.com/mcp in Settings → Connectors → Add custom connector, then select Connect. Claude discovers RunComfy's OAuth 2.1 endpoints, opens a RunComfy consent page, and asks for one of the API tokens shown in your RunComfy Profile. The token is validated by RunComfy and encrypted inside the MCP authorization grant; it is never returned to Claude.

Cursor

.cursor/mcp.json:

json
{  "mcpServers": {    "runcomfy": {      "url": "https://mcp.runcomfy.com/mcp",      "headers": { "Authorization": "Bearer YOUR_RUNCOMFY_TOKEN" }    }  }}

VS Code (Copilot)

.vscode/mcp.json:

json
{  "servers": {    "runcomfy": {      "type": "http",      "url": "https://mcp.runcomfy.com/mcp",      "headers": { "Authorization": "Bearer YOUR_RUNCOMFY_TOKEN" }    }  }}

Windsurf

Settings → MCP:

json
{  "mcpServers": {    "runcomfy": {      "serverUrl": "https://mcp.runcomfy.com/mcp",      "headers": { "Authorization": "Bearer YOUR_RUNCOMFY_TOKEN" }    }  }}

Any other client

  • URL: https://mcp.runcomfy.com/mcp
  • Transport: Streamable HTTP
  • Auth: Authorization: Bearer <token> on every request, or OAuth 2.1 with a loopback redirect URI or an exact supported client callback

Troubleshooting

SymptomCause
401 with RunComfy rejected this API tokenThe token is wrong, expired, or truncated on copy. Generate a new one in Profile — the response body names the fix.
401 with no error_descriptionNo Authorization header reached the server. Check the header is quoted as one argument: --header "Authorization: Bearer ...".
invalid_client_metadata during OAuthThe client registered a callback outside the loopback and exact client allowlist. Use a supported callback or the token header.
invalid_target during OAuthThe configured URL must be exactly https://mcp.runcomfy.com/mcp — no trailing slash. RFC 8707 binds the token to that exact resource.
503 with Retry-AfterRunComfy's API could not be reached to verify the token. Retry.
429More than 600 token-authenticated requests a minute from one IP.

Revoke access by regenerating the token in your RunComfy Profile. That invalidates the token header and any OAuth grant built on it, because every MCP request revalidates the token upstream.


Architecture

MCP Client ──RunComfy API token──┐                                 │   Cloudflare Worker (/mcp)MCP Client ──MCP OAuth token─────┤   validates the credential, resolves                                 │   it to one user's RunComfy token                                 ▼                         Cloudflare Container                         (Python FastMCP app)                                 │ request-scoped RunComfy credential                 ┌───────────────┼───────────────┐                 ▼               ▼               ▼        api.runcomfy.net  model-api.       trainer-api.         (Serverless)     runcomfy.net     runcomfy.net                            (Model)          (Trainer)

One RunComfy token authenticates all three products, so the same credential resolution covers every tool.

Both credential kinds converge on the same request-scoped identity header before the container is reached. They are told apart by shape: OAuth access tokens are always userId:grantId:secret, and a RunComfy API token never contains a colon.

  • Cloudflare Worker (src/index.ts) — OAuth 2.1 authorization server and protected-resource boundary. Missing, invalid, expired, or wrong-audience credentials are rejected before MCP initialization or tool discovery.
  • Direct API token (src/index.ts) — a RunComfy Profile token presented as Authorization: Bearer is revalidated against api.runcomfy.net on every request, rate-limited per source IP, and never forwarded as-is.
  • OAuth consent (src/oauth-bridge.ts) — validates an existing RunComfy Profile token, stores it only in encrypted OAuth grant data, and issues a separate audience-bound MCP access token. Dynamic client registration accepts loopback callbacks (Claude Code and other local clients), an exact allowlist of hosted client callbacks, and Cursor's exact legacy app callback. Cursor registers cursor://anysphere.cursor-mcp/oauth/callback, https://www.cursor.com/agents/mcp/oauth/callback, and http://localhost:8787/callback together; all three must be accepted even when the active redirect uses localhost. Arbitrary custom protocols and callback variants remain rejected, and S256 PKCE is required.
  • Python container (server.py) — FastMCP app with 31 tools across the Serverless, Model, and Trainer APIs. It has no shared/operator credential and fails closed unless the authenticated edge supplies the current user's request-scoped RunComfy token.
  • Cloudflare Container auto-starts on first request, sleeps after 10 minutes idle.

Project layout

.github/workflows/deploy.yml  CI: typecheck, test, deploy to Cloudflaresrc/index.ts          Cloudflare Worker entrypointsrc/oauth-bridge.ts   OAuth consent and RunComfy token validationserver.py             MCP tool definitions (31 tools)runcomfy_client.py    RunComfy API clients (serverless, model, trainer)container_app.py      ASGI middleware (request IDs, token forwarding)container_entrypoint.py  Uvicorn startupcontainer_runtime.py  Env validation, structured loggingwrangler.jsonc        Cloudflare Worker + Container configDockerfile            Container image.env.example          Local dev config

Local development

bash
# Python 3.11+python3.11 -m venv .venvsource .venv/bin/activatepip install -r requirements.txtcp .env.example .envpython -m container_entrypoint

Local endpoints:

  • http://127.0.0.1:8000/healthz
  • http://127.0.0.1:8000/mcp

The local Python endpoint intentionally has no shared fallback credential. Protected tool calls must go through the authenticated Worker boundary.


Deploy

Pushing to main deploys automatically via .github/workflows/deploy.yml: typecheck, Worker tests, and container tests must pass, then wrangler deploy --containers-rollout immediate ships the Worker and the Python container together. Pull requests run the same checks without deploying. The workflow can also be run by hand from the Actions tab.

One repository secret is required:

SecretPurpose
CLOUDFLARE_API_TOKENA token with Edit Cloudflare Workers permission on the account in wrangler.jsonc
CLOUDFLARE_ACCOUNT_IDOptional. account_id is already committed in wrangler.jsonc; set this only to deploy under a different account.

To deploy by hand (requires Cloudflare Workers Paid plan with Containers enabled):

bash
npm installnpm run checknpm testnpx wrangler deploy --containers-rollout immediate

The MCP endpoint goes live at https://mcp.runcomfy.com/mcp (custom domain configured in wrangler.jsonc).


Environment variables and bindings

There is deliberately no shared RunComfy API-key secret. OAuth state is kept in the OAUTH_KV binding and every upstream request is tied to the user who authorized the OAuth grant.

Worker vars (in wrangler.jsonc)

NameDefaultDescription
CONTAINER_INSTANCE_NAMEruncomfy-unifiedDurable Object instance name
CONTAINER_STARTUP_TIMEOUT_MS15000Max wait for container start
CONTAINER_PORT_READY_TIMEOUT_MS30000Max wait for port ready
MCP_MAX_BODY_BYTES1048576Max request body size
OPENAI_APPS_CHALLENGECurrent submission tokenPublic OpenAI domain-verification token, served verbatim at GET /.well-known/openai-apps-challenge; unset or empty returns 404. Verify ownership of any existing token before replacing it.
MCP_DIRECT_TOKEN_RATE_LIMITER600 / 60sPer-IP cap on API-token-authenticated /mcp requests
RUNCOMFY_SERVERLESS_BASE_URLhttps://api.runcomfy.netServerless API base URL
RUNCOMFY_MODEL_API_BASE_URLhttps://model-api.runcomfy.netModel API base URL
RUNCOMFY_TRAINER_API_BASE_URLhttps://trainer-api.runcomfy.netTrainer API base URL

Local Python dev (.env file)

NameRequiredDescription
RUNCOMFY_SERVERLESS_BASE_URLNoOverride Serverless base URL (default: https://api.runcomfy.net)
RUNCOMFY_MODEL_API_BASE_URLNoOverride Model API base URL (default: https://model-api.runcomfy.net)
RUNCOMFY_TRAINER_API_BASE_URLNoOverride Trainer API base URL (default: https://trainer-api.runcomfy.net)
RUNCOMFY_MCP_MOUNT_PREFIXNoPath prefix for MCP mount (default: empty)

来源:README.md,提交 27683fb

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v1.1.0最新Sep 16, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分