
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 分