ComfyUI Light MCP

v0.3.0-rc.2.1
io.github.yuchen-ya/comfyui-light-mcp Checked 2 days ago Published 22 days ago

Workflow-first, Batch-native, Context-light.

Values you need

VariableWhat it is
COMFYUI_URLrequired Required installation choice: your trusted running ComfyUI HTTP(S) endpoint. No credentials, query or fragment.
WORKFLOWS_DIRrequired Required absolute existing directory containing your reviewed workflow API JSON and manifest pairs.
DATA_DIRrequired Required absolute writable SQLite state directory. Use a separate directory per MCP process.
OUTPUT_DIRrequired Required absolute writable output/download/index directory.
AUTO_SAVE_OUTPUTSoptional Application default: true. Download outputs on completion; false defers downloads to result queries. Default: true
MAX_IN_FLIGHToptional Application default: 1. Integer 1-64; includes uncertain submissions. Default: 1
MAX_QUEUED_JOBSoptional Application default: 1. Integer 1-64, no greater than MAX_IN_FLIGHT. Default: 1
JOB_TIMEOUT_MSoptional Application default: 600000. Integer 10000-86400000 milliseconds. Default: 600000

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add comfyui-light-mcp -e 'COMFYUI_URL=<COMFYUI_URL>' -e 'DATA_DIR=<DATA_DIR>' -e 'OUTPUT_DIR=<OUTPUT_DIR>' -e 'WORKFLOWS_DIR=<WORKFLOWS_DIR>' -- npx -y comfyui-light-mcp@0.3.0-rc.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "comfyui-light-mcp": {
      "args": [
        "-y",
        "comfyui-light-mcp@0.3.0-rc.2"
      ],
      "command": "npx",
      "env": {
        "COMFYUI_URL": "<COMFYUI_URL>",
        "DATA_DIR": "<DATA_DIR>",
        "OUTPUT_DIR": "<OUTPUT_DIR>",
        "WORKFLOWS_DIR": "<WORKFLOWS_DIR>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "comfyui-light-mcp": {
      "args": [
        "-y",
        "comfyui-light-mcp@0.3.0-rc.2"
      ],
      "command": "npx",
      "env": {
        "COMFYUI_URL": "<COMFYUI_URL>",
        "DATA_DIR": "<DATA_DIR>",
        "OUTPUT_DIR": "<OUTPUT_DIR>",
        "WORKFLOWS_DIR": "<WORKFLOWS_DIR>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "COMFYUI_URL",
      "id": "comfyui-url",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "DATA_DIR",
      "id": "data-dir",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "OUTPUT_DIR",
      "id": "output-dir",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "WORKFLOWS_DIR",
      "id": "workflows-dir",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "comfyui-light-mcp": {
      "args": [
        "-y",
        "comfyui-light-mcp@0.3.0-rc.2"
      ],
      "command": "npx",
      "env": {
        "COMFYUI_URL": "${input:comfyui-url}",
        "DATA_DIR": "${input:data-dir}",
        "OUTPUT_DIR": "${input:output-dir}",
        "WORKFLOWS_DIR": "${input:workflows-dir}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.comfyui-light-mcp]
command = "npx"
args = ["-y", "comfyui-light-mcp@0.3.0-rc.2"]
env = { "COMFYUI_URL" = "<COMFYUI_URL>", "DATA_DIR" = "<DATA_DIR>", "OUTPUT_DIR" = "<OUTPUT_DIR>", "WORKFLOWS_DIR" = "<WORKFLOWS_DIR>" }

For AI agents

  1. Ask the user for: COMFYUI_URL, WORKFLOWS_DIR, DATA_DIR, OUTPUT_DIR. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: list_workflows, run_workflow, get_result, get_batch.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json