Comfy MCP Server

MCP Server for ComfyUI text to image Workflow

Remote serverstreamable-httpPython

What is the Comfy MCP server?

If you already use Comfy, the comfy mcp server is the piece that lets your assistant work with it directly. MCP Server for ComfyUI text to image Workflow.

What the server does

This script sets up a server using the FastMCP framework to generate images based on prompts using a specified workflow. It interacts with a remote Comfy server to submit prompts and retrieve generated images.

Installation

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

Credentials and setup notes

Configuration is passed through the environment: COMFY_URL, COMFY_WORKFLOW_JSON_FILE, PROMPT_NODE_ID, OUTPUT_NODE_ID, OUTPUT_MODE. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • uv package and project manager for Python. - Workflow file exported from Comfy UI. This code includes a sample Flux-Dev-ComfyUI-Workflow.json which is only used here as reference. You will need to export from your workflow and set the environment variables accordingly. You can install the required packages for local development:

Worth knowing first

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

How to install the Comfy MCP server

### Example Claude Desktop Config

```json
{
  "mcpServers": {
    "Comfy MCP Server": {
      "command": "/path/to/uvx",
      "args": [
        "comfy-mcp-server"
      ],
      "env": {
        "COMFY_URL": "http://your-comfy-server-url:port",
        "COMFY_WORKFLOW_JSON_FILE": "/path/to/the/comfyui_workflow_export.json",
        "PROMPT_NODE_ID": "6",
        "OUTPUT_NODE_ID": "9",
        "OUTPUT_MODE": "file",
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • uv package and project manager for Python. - Workflow file exported from Comfy UI. This code includes a sample Flux-Dev-ComfyUI-Workflow.json which is only used here as reference. You will need to export from your workflow and set the environment variables accordingly. You can install the required packages for local development:
VariableDescriptionRequired
COMFY_URLEndpoint or connection string the server talks to.Yes
COMFY_WORKFLOW_JSON_FILEConfiguration value read at startup.Optional
PROMPT_NODE_IDConfiguration value read at startup.Optional
OUTPUT_NODE_IDConfiguration value read at startup.Optional
OUTPUT_MODEConfiguration value read at startup.Optional

Frequently asked questions

It connects Comfy to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Comfy directly.