@fre4x/comfyui 1.0.60 → 1.0.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +48 -30
  2. package/dist/index.js +951 -1337
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -4,18 +4,12 @@ An MCP server to interact with ComfyUI remotely. Probe server state, inspect nod
4
4
 
5
5
  ## Tools
6
6
 
7
- - `comfyui_get_system_info`: Get server hardware and software status.
8
- - `comfyui_list_object_info`: List available nodes and their schema (inputs/outputs).
9
- - `comfyui_execute_workflow`: Submit a workflow in API JSON format.
10
- - `comfyui_list_workflows`: List stored reusable workflows.
11
- - `comfyui_search_workflows`: Search stored workflows by name, tag, or description.
12
- - `comfyui_get_workflow`: Inspect a stored workflow and its editable inputs.
13
- - `comfyui_save_workflow`: Save a workflow for later reuse.
14
- - `comfyui_run_workflow`: Run a stored workflow with optional overrides.
15
- - `comfyui_get_history`: Retrieve job history and outputs.
7
+ - `comfyui_inspect_node`: List available nodes or inspect one node schema.
8
+ - `comfyui_discover_workflows`: Scan known workflow directories for stored JSON files.
9
+ - `comfyui_get_workflow`: Normalize a stored workflow and list its editable inputs.
10
+ - `comfyui_save_workflow`: Save a workflow into local `./workflows` with optional edits.
11
+ - `comfyui_workflow_run`: Run a stored workflow with optional overrides.
16
12
  - `comfyui_wait_for_workflow`: Wait for workflow completion with a timeout.
17
- - `comfyui_get_queue`: Check current server queue.
18
- - `comfyui_get_view_url`: Get a direct URL for a generated file.
19
13
 
20
14
  **Do not assume `structuredContent` is what the model actually sees.** Many MCP clients
21
15
  surface `content.text` to the model first and treat `structuredContent` as secondary
@@ -28,7 +22,6 @@ IDs, and recovery hints.
28
22
  ### Environment Variables
29
23
 
30
24
  - `COMFYUI_SERVER_URL`: The URL of your ComfyUI server (default: `http://localhost:8188`).
31
- - `COMFYUI_WORKFLOWS_DIR`: Directory used for saved workflow registry files (default: `~/.fre4x-comfyui/workflows`).
32
25
  - `MOCK`: Set to `true` to use mock data instead of a real server.
33
26
 
34
27
  ### Claude Desktop Configuration
@@ -57,35 +50,60 @@ MOCK=true npx @fre4x/comfyui
57
50
 
58
51
  ## Workflow API Format
59
52
 
60
- Note: To use `comfyui_execute_workflow`, you must use the **API Format** JSON. In ComfyUI, enable "Developer Mode" in settings, then click "Save (API Format)". This format differs from the standard workflow JSON.
53
+ `comfyui_workflow_run` and `comfyui_save_workflow` both normalize workflows into
54
+ ComfyUI **API Format** before execution or persistence. In ComfyUI, enable
55
+ "Developer Mode" in settings, then click "Save (API Format)" if you want the
56
+ raw graph JSON. Standard Web UI workflow JSON is also accepted and normalized
57
+ automatically.
61
58
 
62
59
  If you want a single call that submits and waits, pass `await: true` with a
63
- `timeout` value in seconds to `comfyui_execute_workflow`. For lower-level
64
- control, use `comfyui_wait_for_workflow` with `prompt_id`,
65
- `timeout_seconds`, and `poll_interval_ms`.
60
+ `timeout` value in seconds to `comfyui_workflow_run`. For lower-level control,
61
+ use `comfyui_wait_for_workflow` with `prompt_id` and `timeout`.
66
62
 
67
63
  ## Stored Workflow Reuse
68
64
 
69
- The workflow registry tools let you avoid re-sending large API JSON blobs.
65
+ The stored-workflow tools let you avoid re-sending large API JSON blobs and give
66
+ agents a stable local edit loop.
70
67
 
71
- 1. Save a workflow with `comfyui_save_workflow`
72
- 2. Inspect it with `comfyui_get_workflow`
73
- 3. Reuse it with `comfyui_run_workflow`
68
+ 1. Save a workflow with `comfyui_save_workflow` into local `./workflows`
69
+ 2. Inspect editable paths with `comfyui_get_workflow`
70
+ 3. Persist edits with `comfyui_save_workflow` overrides
71
+ 4. Reuse it with `comfyui_workflow_run`
74
72
 
75
- `comfyui_run_workflow` accepts structured overrides in this form:
73
+ `comfyui_workflow_run` and `comfyui_save_workflow` both accept dot-notation
74
+ overrides in this form:
76
75
 
77
76
  ```json
78
77
  {
79
78
  "workflow_id": "pony-portrait-v1",
80
- "overrides": [
81
- {
82
- "node_id": "2",
83
- "input_name": "seed",
84
- "value": 67890
85
- }
86
- ],
79
+ "overrides": {
80
+ "2.inputs.seed": 67890,
81
+ "6.inputs.text": "cinematic dragon portrait"
82
+ },
87
83
  "await": true,
88
- "timeout": 90,
89
- "require_images": true
84
+ "timeout": 90
85
+ }
86
+ ```
87
+
88
+ To inspect editable inputs and semantic hints for agent editing:
89
+
90
+ ```json
91
+ {
92
+ "workflow_id": "pony-portrait-v1",
93
+ "include_prompt": false
94
+ }
95
+ ```
96
+
97
+ To save a new or edited workflow locally:
98
+
99
+ ```json
100
+ {
101
+ "workflow_file_path": "pony-portrait-v1.json",
102
+ "overrides": {
103
+ "6.inputs.text": "studio lighting, ultra detailed",
104
+ "7.inputs.filename_prefix": "pony-portrait-agent"
105
+ },
106
+ "output_file_name": "pony-portrait-agent.json",
107
+ "overwrite": true
90
108
  }
91
109
  ```