Runcomfy Mcp

io.github.runcomfy-comPublished by GitHub account runcomfy-comv1.1.0Updated Oct 24, 2026

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

VerifiedStreamable HTTPWeb executableCloud & InfrastructureMedia & DesignAI & ML

Overview

AI-generated overview

Remote RunComfy MCP server that lets an assistant manage ComfyUI deployments, run hosted models, train LoRAs and check account balance.

What you can do
Manage ComfyUI deployments: list, inspect, create, update and delete dedicated endpoints, submit and track inference requests, and call instance proxies. Browse and run hosted catalog models: list models and categories, read a model's input schema, run it, poll status and fetch or cancel results. Handle trainer datasets: create, list, check status, delete, and upload files by URL, inline text or signed upload URLs. Submit, monitor, resume, edit and cancel LoRA training jobs and retrieve checkpoints. Check the shared account balance in dollars or microdollars.
When to use it
Useful when you want an assistant to drive RunComfy's image, video and LoRA workflows end to end — deploying ComfyUI endpoints, generating media with hosted models, or preparing datasets and training LoRAs — without leaving the chat.
Requirements
A remote Streamable HTTP endpoint; no local install. A RunComfy account and API token from the Profile page, sent as an Authorization Bearer header, or browser OAuth 2.1 for clients that support it. Network access to RunComfy's APIs. The server cannot read local files, so inputs must be public HTTPS URLs or uploaded via signed URLs.
Before you install
Every tool acts on a paid RunComfy account: deployments, model runs and training jobs are billed per request from one wallet, so assistant actions can spend money. Tools create, update, delete deployments and datasets, submit and cancel jobs, and upload files. The Authorization token grants full account access; regenerating it revokes access. Uploaded media and captions go to RunComfy's servers.

Installation

In SourceWeft

  1. Open Runcomfy Mcp in the dashboard and add it to a workspace.
  2. Connect the required credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.runcomfy-com%2Fruncomfy-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.

{
  "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)

Source: README.md at commit 27683fb

Tools

0
This server asks you to sign in, so SourceWeft could not read its tools without an account and has not indexed them. What a connected account sees can depend on that account and its permissions.

Version history

1
  1. v1.1.0LatestSep 16, 2026

Score

85% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts