
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.
概覽
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 或透過簽章位址上傳。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Runcomfy Mcp,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
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
Model API — hosted catalog models, on demand
Docs: docs.runcomfy.com/model-apis
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
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
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):
Or browser OAuth — omit the header, then run /mcp inside Claude Code and pick
Authenticate:
--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:
VS Code (Copilot)
.vscode/mcp.json:
Windsurf
Settings → MCP:
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
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
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 asAuthorization: Beareris revalidated againstapi.runcomfy.neton 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 registerscursor://anysphere.cursor-mcp/oauth/callback,https://www.cursor.com/agents/mcp/oauth/callback, andhttp://localhost:8787/callbacktogether; 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
Local development
Local endpoints:
http://127.0.0.1:8000/healthzhttp://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:
To deploy by hand (requires Cloudflare Workers Paid plan with Containers enabled):
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)
Local Python dev (.env file)
來源:README.md,提交 27683fb
工具
0版本歷史
1- v1.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分