{
  "markdown": "# RunComfy MCP\n\n[![Website](https://img.shields.io/badge/Website-www.runcomfy.com-6C47FF)](https://www.runcomfy.com)\n[![Docs](https://img.shields.io/badge/Docs-MCP-2965F1)](https://docs.runcomfy.com/mcp)\n\nMCP server for the [RunComfy Serverless API (ComfyUI)](https://docs.runcomfy.com/serverless/introduction). Manage deployments, run inference, and retrieve results from AI assistants like Claude, Cursor, and Windsurf.\n\n**Website**: [www.runcomfy.com](https://www.runcomfy.com)\n\n**Endpoint**: `https://mcp.runcomfy.com/mcp`\n\n**Docs**: [docs.runcomfy.com/mcp](https://docs.runcomfy.com/mcp)\n\n---\n\n## What it does\n\n10 tools that mirror [docs.runcomfy.com/serverless](https://docs.runcomfy.com/serverless) 1:1:\n\n| Category | Tools |\n| --- | --- |\n| **Deployment management** | `list_deployments`, `get_deployment`, `create_deployment`, `update_deployment`, `delete_deployment` |\n| **Inference** | `submit_request`, `get_request_status`, `get_request_result`, `cancel_request` |\n| **Advanced** | `call_instance_proxy` |\n\n---\n\n## Quick setup\n\n### Claude Code\n\n```bash\nclaude mcp add runcomfy \\\n  --transport streamable-http \\\n  https://mcp.runcomfy.com/mcp \\\n  --header \"Authorization: Bearer <YOUR_RUNCOMFY_TOKEN>\"\n```\n\n### Cursor\n\nAdd to `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"runcomfy\": {\n      \"url\": \"https://mcp.runcomfy.com/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <YOUR_RUNCOMFY_TOKEN>\"\n      }\n    }\n  }\n}\n```\n\n### Windsurf\n\nAdd to Windsurf Settings > MCP:\n\n```json\n{\n  \"mcpServers\": {\n    \"runcomfy\": {\n      \"serverUrl\": \"https://mcp.runcomfy.com/mcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer <YOUR_RUNCOMFY_TOKEN>\"\n      }\n    }\n  }\n}\n```\n\nGet your API token from your [Profile](https://www.runcomfy.com/profile) page.\n\n---\n\n## Architecture\n\n```\nMCP Client  ──Bearer token──>  Cloudflare Worker (/mcp)\n                                      │\n                                      ▼\n                              Cloudflare Container\n                              (Python FastMCP app)\n                                      │\n                                      ▼\n                              api.runcomfy.net\n                              (using caller's token)\n```\n\n- **Cloudflare Worker** (`src/index.ts`) — thin proxy: CORS, body size check, forwards the caller's token to the container. No auth logic — `api.runcomfy.net` handles authentication.\n- **Python container** (`server.py`) — FastMCP app with 10 tools. Uses the caller's token (forwarded via `x-runcomfy-user-token` header) for all outbound API calls. Each user sees only their own deployments.\n- **Cloudflare Container** auto-starts on first request, sleeps after 10 minutes idle.\n\n---\n\n## Project layout\n\n```\nsrc/index.ts          Cloudflare Worker entrypoint\nserver.py             MCP tool definitions (10 tools)\nruncomfy_client.py    RunComfy API client (serverless endpoints)\ncontainer_app.py      ASGI middleware (request IDs, token forwarding)\ncontainer_entrypoint.py  Uvicorn startup\ncontainer_runtime.py  Env validation, structured logging\nwrangler.jsonc        Cloudflare Worker + Container config\nDockerfile            Container image\n.env.example          Local dev config\n```\n\n---\n\n## Local development\n\n```bash\n# Python 3.11+\npython3.11 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\ncp .env.example .env\n# Set RUNCOMFY_API_KEY in .env\npython -m container_entrypoint\n```\n\nLocal endpoints:\n- `http://127.0.0.1:8000/healthz`\n- `http://127.0.0.1:8000/mcp`\n\nIn local mode (no Worker), the Python app uses `RUNCOMFY_API_KEY` from `.env` for all outbound calls.\n\n---\n\n## Deploy\n\nRequires Cloudflare Workers Paid plan with Containers enabled.\n\n```bash\nnpm install\n\n# Set the API key secret (one-time)\nnpx wrangler secret put RUNCOMFY_API_KEY\n\n# Deploy\nCLOUDFLARE_ACCOUNT_ID=<your-account-id> npx wrangler deploy\n```\n\nThe MCP endpoint goes live at `https://mcp.runcomfy.com/mcp` (custom domain configured in `wrangler.jsonc`).\n\n---\n\n## Environment variables\n\n### Worker secrets (set via `wrangler secret put`)\n\n| Name | Required | Description |\n| --- | :---: | --- |\n| `RUNCOMFY_API_KEY` | Yes | Fallback API key for the container |\n\n### Worker vars (in `wrangler.jsonc`)\n\n| Name | Default | Description |\n| --- | --- | --- |\n| `CONTAINER_INSTANCE_NAME` | `runcomfy-unified` | Durable Object instance name |\n| `CONTAINER_STARTUP_TIMEOUT_MS` | `15000` | Max wait for container start |\n| `CONTAINER_PORT_READY_TIMEOUT_MS` | `30000` | Max wait for port ready |\n| `MCP_MAX_BODY_BYTES` | `1048576` | Max request body size |\n| `RUNCOMFY_SERVERLESS_BASE_URL` | `https://api.runcomfy.net` | Serverless API base URL |\n\n### Local dev (`.env` file)\n\n| Name | Required | Description |\n| --- | :---: | --- |\n| `RUNCOMFY_API_KEY` | Yes | Your RunComfy API token |\n| `RUNCOMFY_SERVERLESS_BASE_URL` | No | Override base URL (default: `https://api.runcomfy.net`) |\n| `RUNCOMFY_MCP_MOUNT_PREFIX` | No | Path prefix for MCP mount (default: empty) |\n",
  "bytes": 4980,
  "sha": "5a47ab27fffa71c35cd61dae33931138296c2bfc5f8a62d65db2ab4cb71f9eb0",
  "repo_slug": "runcomfy-com/runcomfy-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_runcomfy_com_runcomfy_mcp_f78fadc4/readme"
}