@fre4x/comfyui 1.0.57 → 1.0.59

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 +44 -0
  2. package/dist/index.js +1121 -131
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,15 +7,28 @@ An MCP server to interact with ComfyUI remotely. Probe server state, inspect nod
7
7
  - `comfyui_get_system_info`: Get server hardware and software status.
8
8
  - `comfyui_list_object_info`: List available nodes and their schema (inputs/outputs).
9
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.
10
15
  - `comfyui_get_history`: Retrieve job history and outputs.
16
+ - `comfyui_wait_for_workflow`: Wait for workflow completion with a timeout.
11
17
  - `comfyui_get_queue`: Check current server queue.
12
18
  - `comfyui_get_view_url`: Get a direct URL for a generated file.
13
19
 
20
+ **Do not assume `structuredContent` is what the model actually sees.** Many MCP clients
21
+ surface `content.text` to the model first and treat `structuredContent` as secondary
22
+ machine-readable metadata. Every actionable detail that an agent needs for its next step
23
+ must therefore appear in `content.text` as well: node options, filenames, URLs, prompt
24
+ IDs, and recovery hints.
25
+
14
26
  ## Setup
15
27
 
16
28
  ### Environment Variables
17
29
 
18
30
  - `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`).
19
32
  - `MOCK`: Set to `true` to use mock data instead of a real server.
20
33
 
21
34
  ### Claude Desktop Configuration
@@ -45,3 +58,34 @@ MOCK=true npx @fre4x/comfyui
45
58
  ## Workflow API Format
46
59
 
47
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.
61
+
62
+ 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`.
66
+
67
+ ## Stored Workflow Reuse
68
+
69
+ The workflow registry tools let you avoid re-sending large API JSON blobs.
70
+
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`
74
+
75
+ `comfyui_run_workflow` accepts structured overrides in this form:
76
+
77
+ ```json
78
+ {
79
+ "workflow_id": "pony-portrait-v1",
80
+ "overrides": [
81
+ {
82
+ "node_id": "2",
83
+ "input_name": "seed",
84
+ "value": 67890
85
+ }
86
+ ],
87
+ "await": true,
88
+ "timeout": 90,
89
+ "require_images": true
90
+ }
91
+ ```