# io.github.artokun/comfyui-mcp (npm · comfyui-mcp)

MCP server + Claude Code plugin for ComfyUI: run workflows, generate images, manage models & VRAM.

- Trust score: 79/100 (medium)
- Change this week: +33
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `comfyui-mcp`: 79/100 (this document), [markdown](https://verifymcp.io/servers/artokun-comfyui-mcp/comfyui-mcp.md), [page](https://verifymcp.io/servers/artokun-comfyui-mcp/comfyui-mcp)

## Channel facts

- Registry: `npm`
- Package: `comfyui-mcp`
- Version: `0.4.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 81/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (132 of 136), so this covers what we could see, not the whole tree.
  - Runs a script at install time (postinstall) that we could not recognise. It may be perfectly ordinary, but we do not read the published tarball, so we cannot say what it does.
  - Only part of the dependency tree could be resolved (132 of 136), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to artokun/comfyui-mcp).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 0 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 81/100
  - AI-judged instruction clarity (excellent).
  - Tool/resource definitions use about 3924 tokens (~89/item across 44 items; 44 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add artokun-comfyui-mcp -- npx -y comfyui-mcp
```

### Codex

```bash
codex mcp add artokun-comfyui-mcp -- npx -y comfyui-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "artokun-comfyui-mcp": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "comfyui-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add artokun-comfyui-mcp --command npx --arg -y --arg comfyui-mcp
```

### Hermes

```yaml
mcp_servers:
  artokun-comfyui-mcp:
    command: "npx"
    args: ["-y", "comfyui-mcp"]
```

### Other

```json
{
  "mcpServers": {
    "artokun-comfyui-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "comfyui-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 79, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 78, +57)

- [security improvement] Known CVEs: unverified → partial
- [security improvement] Provenance: unverified → pass
- [security improvement] Install scripts: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] The scripts that run when this package is installed changed: postinstall
- [security] The attested source repository moved: artokun/comfyui-mcp
- [functional regression] Security disclosure: fail → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Schema quality: unverified → excellent
- [functional improvement] License: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Stability: unverified → 0.23
- [functional] First check of Schema quality: unverified
- [functional] Licence: MIT

### 2026-07-31 (score 21, −7)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-30 (score 28, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-27 (score 46)

First indexed and scored.

## MCP tools (44)

### `enqueue_workflow` (~95 tokens)

Submit a ComfyUI workflow for execution and return immediately with the prompt_id and queue position. Does not wait for completion. Use get_job_status to check progress later, or get_history to retrieve results and images after completion.

Input parameters:

- `disable_random_seed` (boolean): If true, do not randomize seed values
- `workflow` (object, required): ComfyUI workflow in API format (node ID -> {class_type, inputs})

### `get_system_stats` (~28 tokens)

Get ComfyUI system information including GPU, VRAM, Python version, and OS details.

### `visualize_workflow` (~113 tokens)

Convert a ComfyUI workflow JSON into a Mermaid flowchart diagram. Returns mermaid syntax showing nodes grouped by category (loading, conditioning, sampling, image, output) with connections labeled by data type.

Input parameters:

- `direction` (string): Flowchart direction: LR (left-to-right) or TB (top-to-bottom)
- `show_values` (boolean): Include widget values (seed, steps, cfg, etc.) in node labels
- `workflow` (required): ComfyUI workflow JSON (as a JSON string or object)

### `mermaid_to_workflow` (~130 tokens)

Convert a Mermaid flowchart diagram back into a ComfyUI workflow JSON. Parses node definitions, connections (with data type labels), and widget values from the mermaid syntax. Resolves node types and wires connections using ComfyUI's /object_info schemas. Fills missing inputs with defaults. Returns a valid, executable ComfyUI API workflow.

Input parameters:

- `mermaid` (string, required): Mermaid flowchart text (with or without ```mermaid code fence). Nodes should use ComfyUI class_type names as labels. Connections should be labeled with data types (e.g., -->|MODEL|).

### `visualize_workflow_hierarchical` (~221 tokens)

Visualize a large ComfyUI workflow as a hierarchical diagram. Detects logical sections using node categories from /object_info, resolves Get/Set virtual wires, and produces either a compact overview (sections as summary nodes), a detailed view of one section, or a text listing of all sections. Best for workflows with 20+ nodes.

Input parameters:

- `direction` (string): Flowchart direction (default: TB for overview, LR for detail)
- `section` (string): Section name to show in detail view (required when view=detail). Use view=list to see available section names.
- `show_values` (boolean): Include widget values in node labels (detail view only)
- `view` (string): overview: compact diagram with sections as summary nodes; detail: full diagram for one section; list: text summary of all sections; summary: structured text optimized for AI ingestion with node IDs,…
- `workflow` (required): ComfyUI workflow in API format or UI format (auto-detected)

### `create_workflow` (~118 tokens)

Create a ComfyUI workflow from a named template. Available templates: txt2img, img2img, upscale, inpaint. Returns the complete workflow JSON ready for execution or further modification.

Input parameters:

- `params` (object): Template parameters (e.g. checkpoint, positive_prompt, negative_prompt, width, height, steps, cfg, seed, sampler_name, scheduler, denoise, image_path, mask_path, upscale_model)
- `template` (string, required): Template name: txt2img, img2img, upscale, or inpaint

### `modify_workflow` (~103 tokens)

Apply modification operations to an existing ComfyUI workflow. Supports: set_input, add_node, remove_node, connect, insert_between. Returns the modified workflow JSON and IDs of any newly added nodes.

Input parameters:

- `operations` (array, required): Array of operations to apply in order. Each has an 'op' field: set_input, add_node, remove_node, connect, or insert_between
- `workflow` (required): ComfyUI workflow JSON (as a JSON string or object)

### `get_node_info` (~73 tokens)

Query ComfyUI's /object_info endpoint to get available node type definitions. Optionally filter by node type name (substring match). Returns node inputs, outputs, and descriptions.

Input parameters:

- `node_type` (string): Filter by node class_type name (case-insensitive substring match). Omit to list all available nodes.

### `validate_workflow` (~64 tokens)

Validate a ComfyUI workflow without executing it. Checks for missing node types, broken connections, invalid output indices, missing models, and other issues. Returns a list of errors and warnings.

Input parameters:

- `workflow` (required): ComfyUI workflow in API format (JSON string or object)

### `get_queue` (~22 tokens)

Get the current ComfyUI execution queue showing running and pending jobs.

### `get_job_status` (~40 tokens)

Check the execution status of a ComfyUI prompt/job by its ID.

Input parameters:

- `prompt_id` (string, required): The prompt ID returned by enqueue_workflow

### `cancel_job` (~55 tokens)

Interrupt/cancel the currently running ComfyUI job. Optionally target a specific running job by prompt_id.

Input parameters:

- `prompt_id` (string): Optional prompt_id to target a specific running job. If omitted, interrupts the current job.

### `cancel_queued_job` (~51 tokens)

Remove a specific pending job from the ComfyUI queue by prompt_id. Does not affect running jobs.

Input parameters:

- `prompt_id` (string, required): The prompt_id of the pending job to remove from the queue

### `clear_queue` (~27 tokens)

Clear all pending jobs from the ComfyUI queue. Does not affect the currently running job.

### `search_custom_nodes` (~65 tokens)

Search the ComfyUI Registry for custom node packs by keyword

Input parameters:

- `limit` (integer): Max results to return (default 10)
- `page` (integer): Page number for pagination (default 1)
- `query` (string, required): Search query for custom node packs

### `get_node_pack_details` (~46 tokens)

Get detailed information about a specific ComfyUI custom node pack from the Registry

Input parameters:

- `id` (string, required): Node pack ID (e.g. 'comfyui-impact-pack')

### `search_models` (~94 tokens)

Search HuggingFace for models compatible with ComfyUI (checkpoints, LoRAs, VAEs, etc.)

Input parameters:

- `filter` (string): HuggingFace tag filter (e.g. 'diffusers', 'text-to-image')
- `limit` (integer): Max results to return (default 10)
- `query` (string, required): Search query (e.g. 'SDXL', 'flux', 'controlnet')

### `download_model` (~94 tokens)

Download a model file to the ComfyUI models directory from a URL (HuggingFace or direct link)

Input parameters:

- `filename` (string): Override filename (auto-detected from URL if omitted)
- `target_subfolder` (string, required): Target subfolder under ComfyUI models/ (e.g. 'checkpoints', 'loras', 'vae')
- `url` (string, required): Direct download URL for the model file

### `list_local_models` (~51 tokens)

List model files installed in the local ComfyUI models directory

Input parameters:

- `model_type` (string): Filter by model type (e.g. 'checkpoints', 'loras'). Lists all types if omitted.

### `generate_node_skill` (~105 tokens)

Analyze a ComfyUI custom node pack and generate a Claude skill (.md) file describing all its nodes, inputs/outputs, and usage examples. Accepts a ComfyUI Registry ID or a GitHub repository URL as the source.

Input parameters:

- `install_in` (string): Optional directory path to save the generated SKILL.md file
- `source` (string, required): ComfyUI Registry node ID (e.g. 'comfyui-impact-pack') or GitHub repository URL

### `get_logs` (~90 tokens)

Get ComfyUI server runtime logs. Useful for debugging execution errors, model loading issues, missing nodes, and Python tracebacks.

Input parameters:

- `keyword` (string): Filter log lines containing this keyword (case-insensitive). Examples: 'error', 'warning', 'VRAM', a node name
- `max_lines` (integer): Maximum number of log lines to return from the end (default: 100)

### `get_history` (~80 tokens)

Get execution history for a ComfyUI prompt. Returns status, timing, cached nodes, output details, and full error information including Python tracebacks. Use after a failed enqueue_workflow to diagnose what went wrong.

Input parameters:

- `prompt_id` (string): Specific prompt ID to look up (returned by enqueue_workflow). If omitted, returns the most recent execution.

### `list_workflows` (~20 tokens)

List saved workflows from the ComfyUI user library.

### `get_workflow` (~152 tokens)

Load a saved workflow and return its raw JSON. Use analyze_workflow instead if you just need to understand the workflow — it returns a structured summary without flooding context with JSON. Use get_workflow only when you need the actual JSON for enqueue_workflow, modify_workflow, or save_workflow.

Input parameters:

- `filename` (string, required): Workflow filename (e.g. 'my_workflow.json'). Use list_workflows to see available files.
- `format` (string): Output format: 'api' (default, recommended) converts to compact API format with named inputs, connection references, and _meta.mode flags for muted/bypassed nodes. 'ui' returns the raw UI format with…

### `save_workflow` (~80 tokens)

Save a workflow to the ComfyUI user library so it appears in the web UI. Accepts either API format or UI format JSON.

Input parameters:

- `filename` (string, required): Filename to save as (e.g. 'my_workflow.json'). Will overwrite if it already exists.
- `workflow` (object, required): Workflow JSON to save (API or UI format)

### `analyze_workflow` (~222 tokens)

Load a saved workflow and return a structured analysis — sections, node settings, connections, and data flow. Use this to understand any workflow before modifying or executing it. Returns a concise text summary (not raw JSON) optimized for AI reasoning. Prefer this over get_workflow unless you need the raw JSON for enqueue_workflow or modify_workflow.

Input parameters:

- `filename` (string, required): Workflow filename (e.g. 'Scene Builder v3.json'). Use list_workflows to see available files.
- `section` (string): Section name for detail view. Use view='list' first to see available section names.
- `view` (string): summary (default): structured text with sections, node IDs, key settings, virtual wires, and full connection graph — best for AI understanding. overview: mermaid diagram showing sections as summary n…

### `stop_comfyui` (~45 tokens)

Stop the running ComfyUI process. Captures process info so it can be restarted with start_comfyui. Kills the process tree and resets the WebSocket client.

### `start_comfyui` (~50 tokens)

Start ComfyUI using process info saved from a previous stop_comfyui call. Supports both Desktop app and manual Python installs. Waits up to 60s for the API to become ready.

### `restart_comfyui` (~49 tokens)

Restart ComfyUI: stops the running process (capturing its config), waits for the port to free, relaunches with the same arguments, and waits for the API to become ready.

### `get_image` (~130 tokens)

Fetch a generated image from ComfyUI and return it as an inline image. Works with remote ComfyUI instances — does not require COMFYUI_PATH. Use get_history first to obtain the filename.

Input parameters:

- `filename` (string, required): Output image filename, e.g. PulID_Klein_00001_.png
- `save_dir` (string): Local directory to save the image file. Defaults to /tmp/comfyui-images/.
- `subfolder` (string): Subfolder within the directory, if any
- `type` (string): Image directory: output (default), input, or temp

### `upload_image` (~101 tokens)

Upload a local image file to ComfyUI's input/ directory so it can be referenced in LoadImage nodes. Tries HTTP upload first (works with remote ComfyUI), falls back to filesystem copy when COMFYUI_PATH is set.

Input parameters:

- `filename` (string): Override the filename in ComfyUI's input/ directory. Auto-detected from source path if omitted.
- `source_path` (string, required): Absolute path to the local image file to upload

### `workflow_from_image` (~75 tokens)

Extract embedded ComfyUI workflow metadata from a PNG file. ComfyUI stores the full workflow (API format) and prompt data in PNG tEXt chunks. Use this to reverse-engineer how any ComfyUI image was generated.

Input parameters:

- `image_path` (string, required): Absolute path to a ComfyUI-generated PNG file

### `list_output_images` (~86 tokens)

List recently generated images from ComfyUI's output directory. Returns filenames sorted newest-first. Requires COMFYUI_PATH. For remote ComfyUI, use get_history to find filenames, then get_image to fetch them.

Input parameters:

- `limit` (integer): Max images to return (default: 20)
- `pattern` (string): Filter by filename pattern (case-insensitive substring match)

### `clear_vram` (~94 tokens)

Free GPU VRAM by unloading cached models from ComfyUI. Use this between generation runs with different model families (e.g. switching from SDXL to Flux) or when running low on VRAM. Optionally unload only models or only memory.

Input parameters:

- `free_memory` (boolean): Free cached memory/intermediates (default: true)
- `unload_models` (boolean): Unload all cached models (default: true)

### `get_embeddings` (~34 tokens)

List installed textual inversion embeddings. These can be used in prompts with the syntax embedding:name (e.g. embedding:easynegative).

### `suggest_settings` (~141 tokens)

Suggest proven sampler/scheduler/steps/CFG settings based on local generation history. Query by model family, LoRA hash, or text search on model/LoRA names.

Input parameters:

- `limit` (integer): Max results (default 10)
- `lora_hash` (string): AutoV2 hash (10 chars) of a specific LoRA to find settings for
- `model_family` (string): Model family to query (e.g. 'qwen_image', 'sdxl', 'flux', 'illustrious')
- `search` (string): Full-text search on model/LoRA filenames (e.g. 'copax', 'lightning')

### `generation_stats` (~40 tokens)

Show local generation tracking statistics — total runs, unique combos, breakdown by model family.

Input parameters:

- `model_family` (string): Filter stats to a specific model family

### `view_image` (~97 tokens)

Fetch a registered asset's bytes and return them as an inline image so the agent can see the result. Use this after enqueue_workflow completes (asset_id is included in the completion notification) to inspect, critique, or compare generated images. Only supports image mime types (PNG/JPEG/WebP); audio/video assets must be saved to disk via get_image.

Input parameters:

- `asset_id` (string, required): Asset id returned by list_assets or job completion

### `list_assets` (~93 tokens)

List recently generated assets from the in-memory registry, newest-first. Assets are registered automatically when a workflow completes successfully. The registry is ephemeral and clears on server restart; records expire after COMFYUI_ASSET_TTL_HOURS (default 24h).

Input parameters:

- `limit` (integer): Max records to return (default: all)
- `since` (string): ISO timestamp — only return assets created at or after this time

### `get_asset_metadata` (~57 tokens)

Get full provenance for a registered asset including the workflow snapshot that produced it. Use this to inspect the parameters that generated an image before calling regenerate with overrides.

Input parameters:

- `asset_id` (string, required): Asset id returned by list_assets or job completion

### `regenerate` (~165 tokens)

Re-enqueue the workflow that produced an existing asset, optionally applying parameter overrides. Overrides are applied to any node input matching the key name (e.g. cfg, steps, sampler_name, scheduler, seed, denoise, text). Seeds are re-randomized by default so each regenerate yields a fresh image unless seed is explicitly passed in overrides.

Input parameters:

- `asset_id` (string, required): Asset id of the source generation
- `disable_random_seed` (boolean): If true, do not randomize seed fields. Combine with `overrides.seed` to reproduce the exact original image.
- `overrides` (object): Map of input-name → new value applied to every node that already has that input. Common keys: cfg, steps, sampler_name, scheduler, seed, denoise, text.

### `get_defaults` (~63 tokens)

Return the merged view of generation defaults with per-source attribution. Precedence (lowest → highest): config file → COMFYUI_DEFAULT_* env vars → runtime overrides via set_defaults. Per-call MCP tool args always win over these defaults when consumed by a workflow-construction tool.

### `set_defaults` (~115 tokens)

Update generation defaults. By default updates the in-memory runtime layer (lost on restart). Pass persist=true to also write the change into the config file (~/.config/comfyui-mcp/config.json by default). Use this to avoid repeating common values like width, height, steps, cfg, sampler, checkpoint.

Input parameters:

- `persist` (boolean): If true, write to the config file in addition to runtime.
- `values` (object, required): Key/value map of defaults to set. Keys are typically lowercase (e.g. width, steps).

### `generate_image` (~250 tokens)

Generate an image from a text prompt — the high-level entry point. Builds a txt2img workflow, filling any unspecified parameter from your configured defaults (set_defaults / COMFYUI_DEFAULT_* / config file), auto-selecting a local checkpoint when none is given. Returns the prompt_id immediately; the resulting asset_id arrives in the completion notification and can be passed to view_image or regenerate. For full control over the node graph, use create_workflow + enqueue_workflow instead.

Input parameters:

- `batch_size` (integer): Number of images to generate
- `cfg` (number): CFG scale
- `checkpoint` (string): Checkpoint filename; auto-selected from local models if omitted
- `height` (integer): Image height
- `negative_prompt` (string): Negative prompt (default: empty / from defaults)
- `prompt` (string, required): Positive text prompt
- `sampler` (string): Sampler name (e.g. euler, dpmpp_2m)
- `scheduler` (string): Scheduler (e.g. normal, karras)
- `seed` (integer): Seed (omit to randomize)
- `steps` (integer): Sampling steps
- `width` (integer): Image width

## Diagnostics

Captured diagnostic sections: Provenance, Install scripts, Dependencies. The full working is on the page: https://verifymcp.io/servers/artokun-comfyui-mcp/comfyui-mcp#diagnostics

## Score history

- 2026-08-03: 79
- 2026-08-02: 78
- 2026-08-01: 21
- 2026-07-31: 21
- 2026-07-30: 28
- 2026-07-28: 46
- 2026-07-27: 46

## Links

- npm package: https://www.npmjs.com/package/comfyui-mcp
- Socket report: https://socket.dev/npm/package/comfyui-mcp
- Repository: https://github.com/artokun/comfyui-mcp
- Changelog RSS feed: https://verifymcp.io/servers/artokun-comfyui-mcp/comfyui-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/artokun-comfyui-mcp/comfyui-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/artokun-comfyui-mcp/comfyui-mcp
