comfyui-mcp 0.8.0 → 0.8.1

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,43 @@ All notable changes to this project are documented here. This project adheres to
4
4
  [Semantic Versioning](https://semver.org/) and the format follows
5
5
  [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
+ ## [0.8.1] - 2026-06-01
8
+
9
+ Bug-fix release picking up upstream contributions from
10
+ [@joaolvivas](https://github.com/joaolvivas)'s fork of comfyui-mcp.
11
+
12
+ ### Added
13
+
14
+ - **`health_check`** — single-call pre-flight diagnostic that reports
15
+ ComfyUI/Python/PyTorch versions, GPU + VRAM, queue depth, per-category
16
+ `/models` populations (catches empty-dropdown surprises from a
17
+ misconfigured `extra_model_paths.yaml`), and recent errors from
18
+ `/internal/logs`. Read-only. Useful before a long batch or when triaging an
19
+ unexplained failure. Originally contributed by
20
+ [@joaolvivas](https://github.com/joaolvivas) in
21
+ [`joaolvivas/comfyui-mcp-byjlucas@de82ecda`](https://github.com/joaolvivas/comfyui-mcp-byjlucas/commit/de82ecda).
22
+
23
+ ### Fixed
24
+
25
+ - **`search_custom_nodes`** — `api.comfy.org/nodes` accepts a `search` query
26
+ parameter but ignores it server-side, returning the same paginated default
27
+ list regardless of query. We now fetch a larger window (limit=100) and
28
+ rank-filter client-side by id / name / author / description with a
29
+ popularity boost, so query-relevant packs actually appear. Diagnosed and
30
+ patched by [@joaolvivas](https://github.com/joaolvivas) in
31
+ [`joaolvivas/comfyui-mcp-byjlucas@f066b597`](https://github.com/joaolvivas/comfyui-mcp-byjlucas/commit/f066b597);
32
+ port adds a guard so popularity no longer inflates non-matching packs.
33
+ - **`upload_image` / `upload_video` / `upload_audio`** — HTTP-only.
34
+ Previously these tools fell back to a local filesystem copy if HTTP upload
35
+ failed and `COMFYUI_PATH` was set. When `COMFYUI_PATH` was auto-detected to
36
+ an unrelated install (common for users targeting a remote `--comfyui-url`),
37
+ the fallback wrote the file to the wrong tree and reported success, while
38
+ the remote ComfyUI never received it — the next `LoadImage` then failed
39
+ mysteriously. Now HTTP-only against the connected ComfyUI's
40
+ `/upload/image` endpoint, which works for both local and remote. Diagnosed
41
+ and patched by [@joaolvivas](https://github.com/joaolvivas) in
42
+ [`joaolvivas/comfyui-mcp-byjlucas@089180ad`](https://github.com/joaolvivas/comfyui-mcp-byjlucas/commit/089180ad).
43
+
7
44
  ## [0.8.0] - 2026-05-26
8
45
 
9
46
  Completes the custom-node authoring lifecycle, adds cloud storage I/O and
@@ -171,6 +208,7 @@ subprocess fallback where the API can't do the job.
171
208
 
172
209
  Earlier releases predate this changelog.
173
210
 
211
+ [0.8.1]: https://github.com/artokun/comfyui-mcp/releases/tag/v0.8.1
174
212
  [0.8.0]: https://github.com/artokun/comfyui-mcp/releases/tag/v0.8.0
175
213
  [0.7.0]: https://github.com/artokun/comfyui-mcp/releases/tag/v0.7.0
176
214
  [0.6.1]: https://github.com/artokun/comfyui-mcp/releases/tag/v0.6.1
@@ -0,0 +1,137 @@
1
+ # Contributing to comfyui-mcp
2
+
3
+ Thanks for your interest in improving **comfyui-mcp** — an MCP server (and Claude Code plugin)
4
+ that lets an AI agent drive [ComfyUI](https://github.com/comfyanonymous/ComfyUI). This guide covers
5
+ the dev setup, project conventions, how to add a tool, and how releases work.
6
+
7
+ By contributing you agree your contributions are licensed under the project's [MIT License](./LICENSE).
8
+
9
+ ## Getting started
10
+
11
+ Requirements: **Node ≥ 22** and npm (the repo is committed with `package-lock.json`; npm is the
12
+ supported dev path).
13
+
14
+ ```bash
15
+ git clone https://github.com/artokun/comfyui-mcp
16
+ cd comfyui-mcp
17
+ npm install # builds native deps (better-sqlite3, sharp)
18
+ npm run build # tsc → dist/
19
+ npm test # vitest
20
+ ```
21
+
22
+ - **`npm run build`** — type-checks and compiles to `dist/` (`tsc`).
23
+ - **`npm run lint`** — type-check only (`tsc --noEmit`).
24
+ - **`npm test`** / **`npm run test:watch`** — the vitest suite.
25
+ - **`npm run dev`** — run the server from source via `tsx`.
26
+ - **`npm run docs:gen`** — regenerate the docs tool reference from the live schemas (see [Docs](#documentation)).
27
+
28
+ > **pnpm users:** pnpm 10 blocks dependency build scripts unless allow-listed. The native deps are
29
+ > already declared in `package.json` `pnpm.onlyBuiltDependencies` (`better-sqlite3`, `sharp`); if you
30
+ > add a dependency that needs a build step at runtime, add it there too.
31
+
32
+ Before opening a PR, make sure **`npm run build` and `npm test` both pass**.
33
+
34
+ ## Project layout
35
+
36
+ ```
37
+ src/
38
+ tools/ # thin MCP tool wrappers — one registerXxxTools(server) per file
39
+ index.ts # registers every tool group (the one shared wiring file)
40
+ services/ # the actual logic (network, subprocess, filesystem)
41
+ comfyui/ # ComfyUI client + workflow types
42
+ utils/ # errors, logger, shared helpers
43
+ __tests__/ # vitest tests, mirroring the source path
44
+ scripts/ # build/docs/util scripts (gen-tool-docs.ts, postinstall.mjs, …)
45
+ docs/ # Mintlify docs site (tool reference is GENERATED — see below)
46
+ plugin/ # the Claude Code plugin (skills, agents, slash commands, hooks)
47
+ ```
48
+
49
+ **Separation of concerns:** business logic lives in `src/services/<name>.ts`; the matching
50
+ `src/tools/<name>.ts` is a thin wrapper that defines the MCP tool and calls the service.
51
+
52
+ ## Conventions
53
+
54
+ - **ESM** — this is an ESM package; **relative imports must use the `.js` extension**
55
+ (`import { foo } from "./foo.js"`), even from `.ts` files.
56
+ - **Errors** — throw typed errors from `src/utils/errors.ts` (`ComfyUIError`, `ValidationError`,
57
+ `ProcessControlError`, …) and convert them at the tool boundary with `errorToToolResult(err)`.
58
+ - **Local vs remote** — comfyui-mcp can target a remote ComfyUI (`--comfyui-url`). Tools that need a
59
+ local install must read `config.comfyuiPath` and throw a clear error when it's undefined.
60
+ - **Security** (please respect these — they're enforced in review):
61
+ - Secrets (API tokens, registry keys, cloud credentials) travel in **headers or env**, never in
62
+ URLs, argv, or logs. Redact secrets from any logged URL.
63
+ - Validate filesystem paths against traversal/symlink escapes (resolve + contain to the intended root).
64
+ - Validate values that reach a subprocess argv (reject leading `-` / control chars; use
65
+ `--end-of-options` for git, etc.).
66
+
67
+ ## Adding a new MCP tool
68
+
69
+ Use `src/tools/registry-search.ts` and `src/tools/process-control.ts` as canonical examples.
70
+
71
+ 1. **Service** — add `src/services/<name>.ts` with the logic and an exported function. Keep network
72
+ in `fetch`, subprocess in `node:child_process`. Make I/O seams injectable so they're testable.
73
+ 2. **Tool** — add `src/tools/<name>.ts` exporting `registerXxxTools(server: McpServer): void`. Inside,
74
+ call `server.tool(name, description, zodShape, handler)`. Handlers return
75
+ `{ content: [{ type: "text" as const, text }] }` and wrap failures with `errorToToolResult(err)`.
76
+ 3. **Wire it** — add one import and one `registerXxxTools(server);` call in `src/tools/index.ts`,
77
+ **before** `await registerAutoloadedWorkflows(server);`.
78
+ 4. **Categorize for docs** — add the new tool name to the right category in
79
+ `scripts/gen-tool-docs.ts` (`CATEGORIES`), then run `npm run docs:gen` (it warns about any
80
+ uncategorized tool).
81
+ 5. **Test** — add `src/__tests__/…` mirroring the source path. Mock `global.fetch`,
82
+ `node:child_process`, and `node:fs` — **no real network, disk, or process side effects**.
83
+
84
+ ### Tool descriptions matter
85
+
86
+ Descriptions are the agent's only guide to a tool. Write them to answer three questions:
87
+ **what it does to the world** (read-only? mutates disk? requires a running server? irreversible?),
88
+ **when to use it vs. a sibling tool**, and **what each parameter means beyond its type**. Don't just
89
+ restate the schema. (This is graded by Glama's TDQS — see the [blog post](https://comfyui-mcp.artokun.io/docs/blog/comfyui-mcp-tdqs-case-study).)
90
+
91
+ ## Documentation
92
+
93
+ The hosted docs live in `docs/` (Mintlify). The **Tool Reference is generated** from the live tool
94
+ schemas — **do not hand-edit `docs/tools/*.mdx`**. After changing any tool (name, description,
95
+ params), run:
96
+
97
+ ```bash
98
+ npm run docs:gen
99
+ ```
100
+
101
+ and commit the regenerated MDX. Guide pages (`docs/*.mdx`) are hand-written; edit those directly.
102
+ Run `cd docs && npx mint broken-links` to validate links.
103
+
104
+ ## Optional / experimental dependencies
105
+
106
+ Cloud storage (`@aws-sdk/client-s3`, `@azure/storage-blob`) and the experimental agent-panel POC
107
+ (`ai`, `@ai-sdk/*`, `cloudflared`) power optional/flag-gated features. Keep new heavy or
108
+ feature-specific dependencies out of the core hot path, and prefer lazy/dynamic imports so a base
109
+ install stays lean.
110
+
111
+ ## Commits & pull requests
112
+
113
+ - **Branch** off `main` (`feat/…`, `fix/…`, `docs/…`).
114
+ - Use **Conventional Commit** prefixes (`feat:`, `fix:`, `docs:`, `chore:`, `test:`, `refactor:`).
115
+ - Keep PRs focused; include tests for behavior changes.
116
+ - **PR checklist:** `npm run build` ✓ · `npm test` ✓ · docs regenerated if tools changed ✓ ·
117
+ a clear description of what and why.
118
+
119
+ Open a GitHub issue first for large or potentially-breaking changes so we can align on the approach.
120
+
121
+ ## Releases (maintainers)
122
+
123
+ Releases are automated — **never `npm publish` manually**. Bump + tag, and pushing the `v*` tag
124
+ triggers the GitHub Actions workflow that publishes to npm with provenance (OIDC):
125
+
126
+ ```bash
127
+ npm run release # patch
128
+ npm run release:minor # minor
129
+ npm run release:major # major
130
+ ```
131
+
132
+ Each script runs `npm version <bump>` (creating the commit + tag) and `git push --follow-tags`.
133
+ Update `CHANGELOG.md` (Keep a Changelog) and regenerate docs before tagging.
134
+
135
+ ## Questions
136
+
137
+ Open a [GitHub issue](https://github.com/artokun/comfyui-mcp/issues) or start a discussion. Thanks for contributing! 🎨
package/README.md CHANGED
@@ -641,10 +641,11 @@ Use `/comfy:install <pack>` to install missing node packs from the registry. The
641
641
 
642
642
  ## Contributing
643
643
 
644
- 1. Fork the repository
645
- 2. Create a feature branch (`git checkout -b feat/my-feature`)
646
- 3. Make your changes and ensure `npm run lint` passes
647
- 4. Submit a pull request
644
+ Contributions are welcome! See **[CONTRIBUTING.md](./CONTRIBUTING.md)** for the dev setup, project
645
+ conventions, how to add an MCP tool, and the release process.
646
+
647
+ Quick version: fork branch (`feat/my-feature`) → make changes (ensure `npm run build` and
648
+ `npm test` pass; run `npm run docs:gen` if you touched tools) → open a PR.
648
649
 
649
650
  ---
650
651
 
@@ -0,0 +1,113 @@
1
+ # Design — Remote ComfyUI and Comfy Cloud modes
2
+
3
+ **Status:** Draft, 2026-06-01
4
+ **Beads:** `comfyui-mcp-m1p` (Comfy Cloud evaluation)
5
+ **Sources surveyed:**
6
+ - `picoSols/comfyui-cloud-mcp` — added Comfy Cloud (`cloud.comfy.org`) as a deployment target
7
+ - `joaolvivas/comfyui-mcp-byjlucas` — HTTP-first refactor of file-bound tools for remote setups
8
+
9
+ ## Why this doc
10
+
11
+ Today `comfyui-mcp` is **local-first**: many tools need `config.comfyuiPath` (process control, model removal, manifest, install, etc.) and the rest reach a "ComfyUI" identified by host:port. Two forks have independently pushed the project toward two related but distinct deployment shapes:
12
+
13
+ 1. **Remote ComfyUI** — user runs ComfyUI on a RunPod / server / VPS, reaches it via `--comfyui-url`. The HTTP API works; filesystem and process control do not. Today some of our "remote-friendly" tools still have local-filesystem fallbacks that hide failures.
14
+ 2. **Comfy Cloud** — `cloud.comfy.org` exposes a ComfyUI-shaped REST API (no WebSocket, no `/internal/logs`, no process control) authenticated with `X-API-Key`. Users in this mode don't have a "ComfyUI process" at all.
15
+
16
+ We have a strategic decision to make: do we want to be the canonical MCP for **all three** (local, remote, cloud), or stay opinionated about local-first?
17
+
18
+ ## Survey: picoSols Comfy Cloud fork
19
+
20
+ PR-equivalent: `picoSols/comfyui-cloud-mcp@7a812069` (feat: Comfy Cloud API support).
21
+
22
+ ### Architecture they shipped
23
+
24
+ - Added `comfyuiApiKey` + `comfyuiCloudUrl` to `configSchema`. New env vars: `COMFYUI_API_KEY`, `COMFYUI_CLOUD_URL` (defaults to `https://cloud.comfy.org`).
25
+ - `isCloudMode(): boolean` — returns `!!parsedConfig.comfyuiApiKey`. Acts as the dispatch switch.
26
+ - In cloud mode, **skip local port auto-detection** entirely (no `detectComfyUIPort` call).
27
+ - New file `src/comfyui/cloud-client.ts` (~346 LOC) — re-implements the surface area that `src/comfyui/client.ts` exposes (enqueue, history, system stats, queue, interrupt, view, object info, samplers/schedulers/checkpoints/loras/vaes/upscalers/logs) against `cloud.comfy.org` using `X-API-Key` headers and raw `fetch`.
28
+ - `src/comfyui/client.ts` becomes a **dispatcher**:
29
+ - Functions that have a cloud equivalent get an `if (isCloudMode()) return cloudClient.fn(...)` prologue.
30
+ - Functions that fundamentally can't work in cloud mode (`getClient`, `connectClient`, `ensureConnected` — anything WebSocket-bound) call `requireLocalMode("op")` that throws `ComfyUIError("CLOUD_UNSUPPORTED")`.
31
+ - `JobWatcher` gate: WebSocket attach is wrapped in `if (!isCloudMode())`. Cloud mode falls through to the existing HTTP-polling path that the local watcher already uses as a fallback.
32
+
33
+ ### What's missing / opinionated
34
+
35
+ - No model-management tools touched. In cloud mode, models are pre-provisioned by Comfy-Org — `download_model`, `remove_model`, `list_local_models` should either be no-ops or surface a cloud-specific listing endpoint.
36
+ - No `/internal/logs` equivalent in cloud — picoSols returns `[]`. Our `health_check` (just landed from João Lucas) would degrade gracefully there.
37
+ - No process control coverage — the fork doesn't say what happens, but our `requireLocalMode` shim would correctly reject `start_comfyui`/`stop_comfyui`/`restart_comfyui`/`install_comfyui`/`apply_manifest`/etc.
38
+
39
+ ## Survey: João Lucas remote-HTTP refactor
40
+
41
+ PR-equivalents:
42
+ - `joaolvivas/comfyui-mcp-byjlucas@089180ad` — `upload_image` HTTP-only (removed deceptive filesystem fallback)
43
+ - `joaolvivas/comfyui-mcp-byjlucas@e2ae39c8` — same pattern across `image-management.ts` + `model-resolver.ts`
44
+
45
+ ### The deceptive-fallback bug
46
+
47
+ Current `src/tools/image-management.ts:104-119` (and `upload_video` / `upload_audio` mirrors at L:208–230):
48
+
49
+ ```ts
50
+ try {
51
+ // HTTP first (works remote)
52
+ const result = await uploadImageAuto(...);
53
+ return success;
54
+ } catch (httpErr) {
55
+ // Fallback: filesystem copy if COMFYUI_PATH is set
56
+ const result = await uploadImage(...);
57
+ return success; // ← LIES when COMFYUI_PATH is auto-detected stale
58
+ }
59
+ ```
60
+
61
+ The auto-detection in `config.ts` happily resolves `~/ComfyUI` or `/opt/ComfyUI` even when the user is targeting a remote `--comfyui-url`. If HTTP fails (server down, wrong URL, network blip), the fallback writes the file into an **unrelated local install** and returns "success" — but the remote ComfyUI the agent will actually `enqueue` against never received the file. The next workflow run fails with "LoadImage: file not found" and the agent has no breadcrumb back to the upload step.
62
+
63
+ João's fix: drop the fallback entirely. HTTP-only, fail loud. His tool description updates to "Works with both local and remote ComfyUI instances" (because the local HTTP endpoint of course also works).
64
+
65
+ **Recommendation:** Pull this in, separately from cloud support, as a 0.8.1 fix. Affects three tools: `upload_image`, `upload_video`, `upload_audio`.
66
+
67
+ ### Other João changes in scope
68
+
69
+ - `model-resolver.ts` (+37/-7) — likely makes model-existence checks remote-friendly (instead of `existsSync(localPath)`, ask ComfyUI via `/object_info` or `/models/{cat}`). Worth a closer read before deciding whether to port.
70
+ - `client.ts` (+70/-1) — HTTP-first paths for things we currently do filesystem-first.
71
+ - Partner-node auto-inject `api_key_comfy_org` (4b989e47) — comparison vs our existing `COMFY_API_KEY → extra_data` mechanism from 0.6.0. Likely duplicative.
72
+
73
+ ## Proposed direction
74
+
75
+ ### Three modes, three roles
76
+
77
+ | Mode | How user opts in | Local FS? | Process control? | WebSocket? | Process tools should… |
78
+ |---|---|---|---|---|---|
79
+ | **Local** | `COMFYUI_PATH` set or auto-detected | yes | yes | yes | work |
80
+ | **Remote** | `--comfyui-url` and no FS path (or FS path explicitly cleared) | no | no | yes | throw "remote-only target" |
81
+ | **Cloud** | `COMFYUI_API_KEY` set | no | no | no | throw "cloud-only target" |
82
+
83
+ Today we conflate "local" and "remote" because auto-detection silently fills in a local `COMFYUI_PATH` that may not match the `--comfyui-url` target. That's the root cause of João's deceptive-fallback bug.
84
+
85
+ ### Phased adoption
86
+
87
+ **Phase 1 — Pull the bug fixes (no architecture change).** [0.8.1 patch]
88
+ - João's `upload_image`/`upload_video`/`upload_audio` HTTP-only fix.
89
+ - Read `model-resolver.ts` diff and decide on remote-aware model checks.
90
+ - Credit @joaolvivas in CHANGELOG.
91
+
92
+ **Phase 2 — Explicit remote mode.** [0.9.0]
93
+ - Add a `--remote-only` / `COMFYUI_REMOTE_ONLY=true` flag that suppresses `COMFYUI_PATH` auto-detection.
94
+ - All local-only tools (process control, install, manifest, model removal, model download cache materialization) check `config.comfyuiPath` and throw a clear `ProcessControlError("remote target — tool requires a local install path")` instead of silently degrading.
95
+ - Document the three modes explicitly in `docs/configuration.mdx`.
96
+
97
+ **Phase 3 — Comfy Cloud first-class.** [0.9.0 stretch or 0.10.0]
98
+ - Adopt picoSols's `isCloudMode()` + `cloud-client.ts` shape.
99
+ - Build the feature-parity matrix (which tools work in cloud? which throw?).
100
+ - Decide cloud-model-listing API (does `cloud.comfy.org` expose pre-provisioned model lists? if yes, wire `list_local_models` to it).
101
+ - Consider reaching out to Comfy-Org about a partnership listing.
102
+ - Credit @picoSols in CHANGELOG; consider co-authorship in commits.
103
+
104
+ ### Open questions for the maintainer
105
+
106
+ 1. Do we want to commit to cloud support? Strategic: it makes `comfyui-mcp` the right MCP for anyone using Comfy Cloud, which broadens the audience but also makes us a partner-of-record. If yes, an outreach to Comfy-Org alongside the implementation feels right.
107
+ 2. For Phase 2's explicit remote mode — do we silently fix the auto-detection (don't fill in `COMFYUI_PATH` if `--comfyui-url` is a non-loopback host) or require users to opt in?
108
+ 3. For the `upload_*` fix: ship as 0.8.1 patch alongside the search/health fixes from `df8050e`, or wait for the bigger 0.9.0 mode rework?
109
+
110
+ ## Attribution
111
+
112
+ - **Comfy Cloud architecture, dispatch pattern, cloud-client.ts shape:** [@picoSols](https://github.com/picoSols) — `picoSols/comfyui-cloud-mcp@7a812069` (2026-03-25).
113
+ - **HTTP-first refactor + deceptive-fallback diagnosis:** [@joaolvivas](https://github.com/joaolvivas) — `joaolvivas/comfyui-mcp-byjlucas@089180ad` and `@e2ae39c8` (2026-05-12).
@@ -0,0 +1,6 @@
1
+ export interface HealthCheckOptions {
2
+ modelCategories?: string[];
3
+ recentErrors?: number;
4
+ }
5
+ export declare function runHealthCheck(options?: HealthCheckOptions): Promise<string>;
6
+ //# sourceMappingURL=health-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-check.d.ts","sourceRoot":"","sources":["../../src/services/health-check.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,cAAc,CAClC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAgGjB"}
@@ -0,0 +1,103 @@
1
+ // Aggregate pre-flight health check for a connected ComfyUI instance.
2
+ //
3
+ // Originally contributed by João Lucas (github.com/joaolvivas) in
4
+ // joaolvivas/comfyui-mcp-byjlucas@de82ecda (2026-05-12). Refactored to
5
+ // match this repo's service/tool split.
6
+ import { ConnectionError } from "../utils/errors.js";
7
+ import { getClient, getQueue, getSystemStats } from "../comfyui/client.js";
8
+ const CRITICAL_MODEL_CATS = [
9
+ "checkpoints",
10
+ "diffusion_models",
11
+ "loras",
12
+ "vae",
13
+ "text_encoders",
14
+ "controlnet",
15
+ ];
16
+ export async function runHealthCheck(options = {}) {
17
+ const categories = options.modelCategories ?? [...CRITICAL_MODEL_CATS];
18
+ const recentErrors = options.recentErrors ?? 20;
19
+ const lines = ["## Health Check\n"];
20
+ try {
21
+ const stats = (await getSystemStats());
22
+ const sys = stats.system ?? {};
23
+ const dev = stats.devices?.[0] ?? {};
24
+ const vramTotalGB = dev.vram_total
25
+ ? (dev.vram_total / 1024 ** 3).toFixed(1)
26
+ : "?";
27
+ const vramFreeGB = dev.vram_free
28
+ ? (dev.vram_free / 1024 ** 3).toFixed(1)
29
+ : "?";
30
+ const ramFreeGB = sys.ram_free
31
+ ? (sys.ram_free / 1024 ** 3).toFixed(1)
32
+ : "?";
33
+ lines.push(`**ComfyUI**: ${sys.comfyui_version ?? "?"} | ` +
34
+ `Python ${(sys.python_version ?? "").split(" ")[0] || "?"} | ` +
35
+ `PyTorch ${sys.pytorch_version ?? "?"}`);
36
+ lines.push(`**GPU**: ${dev.name ?? "?"} | VRAM free ${vramFreeGB}/${vramTotalGB} GB | RAM free ${ramFreeGB} GB`);
37
+ }
38
+ catch (err) {
39
+ throw new ConnectionError(`ComfyUI unreachable: ${err instanceof Error ? err.message : err}`);
40
+ }
41
+ try {
42
+ const q = await getQueue();
43
+ const running = q.queue_running?.length ?? 0;
44
+ const pending = q.queue_pending?.length ?? 0;
45
+ lines.push(`**Queue**: ${running} running, ${pending} pending`);
46
+ }
47
+ catch (err) {
48
+ lines.push(`**Queue**: ERROR — ${err instanceof Error ? err.message : err}`);
49
+ }
50
+ const client = getClient();
51
+ const modelLines = [];
52
+ let totalModelsSeen = 0;
53
+ for (const cat of categories) {
54
+ try {
55
+ const res = await client.fetchApi(`/models/${cat}`);
56
+ if (!res.ok) {
57
+ modelLines.push(`- ${cat}: REST ${res.status}`);
58
+ continue;
59
+ }
60
+ const files = (await res.json());
61
+ const count = Array.isArray(files) ? files.length : 0;
62
+ totalModelsSeen += count;
63
+ if (count === 0) {
64
+ modelLines.push(`- ${cat}: **EMPTY** ⚠️ (check extra_model_paths.yaml)`);
65
+ }
66
+ else {
67
+ const preview = files.slice(0, 3).join(", ");
68
+ const more = count > 3 ? ` (+${count - 3} more)` : "";
69
+ modelLines.push(`- ${cat}: ${count} — ${preview}${more}`);
70
+ }
71
+ }
72
+ catch (err) {
73
+ modelLines.push(`- ${cat}: ERROR — ${err instanceof Error ? err.message : err}`);
74
+ }
75
+ }
76
+ lines.push(`\n**Models** (${totalModelsSeen} total across ${categories.length} categories):`);
77
+ lines.push(...modelLines);
78
+ // Recent custom-node errors from /internal/logs (best-effort; older
79
+ // ComfyUI versions and remote-only deployments may not expose it).
80
+ try {
81
+ const res = await client.fetchApi("/internal/logs");
82
+ if (res.ok) {
83
+ const text = await res.text();
84
+ const errLines = text
85
+ .split("\n")
86
+ .filter((l) => /traceback|error|exception/i.test(l))
87
+ .slice(-recentErrors);
88
+ if (errLines.length > 0) {
89
+ lines.push(`\n**Recent errors** (last ${errLines.length}):`);
90
+ for (const e of errLines)
91
+ lines.push(` ${e.trim()}`);
92
+ }
93
+ else {
94
+ lines.push(`\n**Recent errors**: none in /internal/logs`);
95
+ }
96
+ }
97
+ }
98
+ catch {
99
+ // Logs endpoint unavailable — silent.
100
+ }
101
+ return lines.join("\n");
102
+ }
103
+ //# sourceMappingURL=health-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-check.js","sourceRoot":"","sources":["../../src/services/health-check.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,EAAE;AACF,kEAAkE;AAClE,uEAAuE;AACvE,wCAAwC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3E,MAAM,mBAAmB,GAAG;IAC1B,aAAa;IACb,kBAAkB;IAClB,OAAO;IACP,KAAK;IACL,eAAe;IACf,YAAY;CACJ,CAAC;AAOX,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,UAA8B,EAAE;IAEhC,MAAM,UAAU,GAAG,OAAO,CAAC,eAAe,IAAI,CAAC,GAAG,mBAAmB,CAAC,CAAC;IACvE,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;IAChD,MAAM,KAAK,GAAa,CAAC,mBAAmB,CAAC,CAAC;IAE9C,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,CAAC,MAAM,cAAc,EAAE,CAAmC,CAAC;QACzE,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CA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AC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,KAAK,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,sCAAsC;IACxC,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"registry-client.d.ts","sourceRoot":"","sources":["../../src/services/registry-client.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D,QAAQ,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAiBD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAgBjC;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,eAAe,CAAC,CAI1B"}
1
+ {"version":3,"file":"registry-client.d.ts","sourceRoot":"","sources":["../../src/services/registry-client.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,oBAAoB;IAC3D,QAAQ,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAiBD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,oBAAoB,EAAE,CAAC,CA2DjC;AAED,wBAAsB,kBAAkB,CACtC,EAAE,EAAE,MAAM,GACT,OAAO,CAAC,eAAe,CAAC,CAI1B"}
@@ -13,16 +13,62 @@ async function registryFetch(path) {
13
13
  }
14
14
  export async function searchNodes(query, options = {}) {
15
15
  const { page = 1, limit = 10 } = options;
16
+ // Upstream bug: api.comfy.org/nodes accepts a `search` query param but
17
+ // ignores it server-side, always returning the default paginated list.
18
+ // Workaround: fetch a larger window and rank-filter client-side by query
19
+ // against id / name / description / author, boosting by total_install so
20
+ // canonical packs win over obscure substring matches.
21
+ // Originally diagnosed and patched by João Lucas (github.com/joaolvivas)
22
+ // in joaolvivas/comfyui-mcp-byjlucas@f066b597 (2026-05-12).
23
+ const fetchLimit = 100;
24
+ const lowerQuery = query.trim().toLowerCase();
16
25
  const params = new URLSearchParams({
17
- search: query,
18
- page: String(page),
19
- limit: String(limit),
26
+ page: "1",
27
+ limit: String(fetchLimit),
20
28
  });
29
+ // Still pass the param in case upstream fixes the filter eventually.
30
+ if (lowerQuery)
31
+ params.set("search", query);
21
32
  const data = await registryFetch(`/nodes?${params}`);
22
- // The API may wrap results in a `nodes` array or return them directly
23
- const results = Array.isArray(data) ? data : (data.nodes ?? []);
24
- logger.info(`Registry search for "${query}" returned ${results.length} results`);
25
- return results;
33
+ const allNodes = Array.isArray(data) ? data : (data.nodes ?? []);
34
+ const matchScore = (n) => {
35
+ if (!lowerQuery)
36
+ return 0;
37
+ const id = (n.id ?? "").toLowerCase();
38
+ const name = (n.name ?? "").toLowerCase();
39
+ const desc = (n.description ?? "").toLowerCase();
40
+ const author = (n.author ?? "").toLowerCase();
41
+ let score = 0;
42
+ if (id === lowerQuery)
43
+ score += 1000;
44
+ else if (id.includes(lowerQuery))
45
+ score += 500;
46
+ if (name === lowerQuery)
47
+ score += 800;
48
+ else if (name.includes(lowerQuery))
49
+ score += 300;
50
+ if (author.includes(lowerQuery))
51
+ score += 200;
52
+ if (desc.includes(lowerQuery))
53
+ score += 100;
54
+ if (score === 0)
55
+ return 0; // no textual match — drop, do NOT inflate via popularity
56
+ if (typeof n.total_install === "number" && n.total_install > 0) {
57
+ score += Math.min(50, Math.floor(Math.log10(n.total_install + 1) * 10));
58
+ }
59
+ return score;
60
+ };
61
+ const filtered = lowerQuery
62
+ ? allNodes
63
+ .map((n) => ({ node: n, score: matchScore(n) }))
64
+ .filter(({ score }) => score > 0)
65
+ .sort((a, b) => b.score - a.score)
66
+ .map(({ node }) => node)
67
+ : allNodes;
68
+ const start = (page - 1) * limit;
69
+ const paged = filtered.slice(start, start + limit);
70
+ logger.info(`Registry search "${query}": fetched ${allNodes.length}, matched ${filtered.length}, returning ${paged.length} (page ${page}, limit ${limit})`);
71
+ return paged;
26
72
  }
27
73
  export async function getNodePackDetails(id) {
28
74
  const data = await registryFetch(`/nodes/${encodeURIComponent(id)}`);
@@ -1 +1 @@
1
- {"version":3,"file":"registry-client.js","sourceRoot":"","sources":["../../src/services/registry-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,aAAa,GAAG,uBAAuB,CAAC;AA2B9C,KAAK,UAAU,aAAa,CAAI,IAAY;IAC1C,MAAM,GAAG,GAAG,GAAG,aAAa,GAAG,IAAI,EAAE,CAAC;IACtC,MAAM,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAE9C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9C,MAAM,IAAI,aAAa,CACrB,gBAAgB,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,EAC/C,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,CAClC,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,EAAgB,CAAC;AAClC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,KAAa,EACb,UAA8B,EAAE;IAEhC,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE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js";
2
+ export declare function registerHealthCheckTools(server: McpServer): void;
3
+ //# sourceMappingURL=health-check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-check.d.ts","sourceRoot":"","sources":["../../src/tools/health-check.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIzE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiChE"}
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import { errorToToolResult } from "../utils/errors.js";
3
+ import { runHealthCheck } from "../services/health-check.js";
4
+ export function registerHealthCheckTools(server) {
5
+ server.tool("health_check", "Pre-flight diagnostic for the connected ComfyUI: one call that aggregates the signals an agent should check before dispatching a batch. Reports ComfyUI version/Python/PyTorch, GPU name + VRAM free/total, system RAM free, queue depth (running + pending), per-category /models populations (catches empty dropdowns from a misconfigured extra_model_paths.yaml), and recent errors from /internal/logs. Read-only — no mutation. Use this when a job fails for an unexpected reason, before a long batch run, or to confirm a remote ComfyUI is healthy. Originally contributed by github.com/joaolvivas.", {
6
+ model_categories: z
7
+ .array(z.string())
8
+ .optional()
9
+ .describe("Override the model categories to poll (defaults to checkpoints, diffusion_models, loras, vae, text_encoders, controlnet)."),
10
+ recent_errors: z
11
+ .number()
12
+ .int()
13
+ .min(0)
14
+ .max(200)
15
+ .optional()
16
+ .describe("How many recent error/traceback lines to include from /internal/logs (default 20, max 200)."),
17
+ }, async (args) => {
18
+ try {
19
+ const text = await runHealthCheck({
20
+ modelCategories: args.model_categories,
21
+ recentErrors: args.recent_errors,
22
+ });
23
+ return { content: [{ type: "text", text }] };
24
+ }
25
+ catch (err) {
26
+ return errorToToolResult(err);
27
+ }
28
+ });
29
+ }
30
+ //# sourceMappingURL=health-check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health-check.js","sourceRoot":"","sources":["../../src/tools/health-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,MAAM,CAAC,IAAI,CACT,cAAc,EACd,glBAAglB,EAChlB;QACE,gBAAgB,EAAE,CAAC;aAChB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,2HAA2H,CAC5H;QACH,aAAa,EAAE,CAAC;aACb,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,6FAA6F,CAC9F;KACJ,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC;gBAChC,eAAe,EAAE,IAAI,CAAC,gBAAgB;gBACtC,YAAY,EAAE,IAAI,CAAC,aAAa;aACjC,CAAC,CAAC;YACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QACxD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"image-management.d.ts","sourceRoot":"","sources":["../../src/tools/image-management.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAczE,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsTpE"}
1
+ {"version":3,"file":"image-management.d.ts","sourceRoot":"","sources":["../../src/tools/image-management.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAWzE,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAiPpE"}
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { writeFile, mkdir } from "node:fs/promises";
3
3
  import { join, basename } from "node:path";
4
- import { uploadImage, extractWorkflowFromImage, listOutputImages, getOutputImage, uploadImageAuto, uploadVideoAuto, uploadVideoLocal, uploadAudioAuto, uploadAudioLocal, } from "../services/image-management.js";
4
+ import { extractWorkflowFromImage, listOutputImages, getOutputImage, uploadImageAuto, uploadVideoAuto, uploadAudioAuto, } from "../services/image-management.js";
5
5
  import { errorToToolResult } from "../utils/errors.js";
6
6
  export function registerImageManagementTools(server) {
7
7
  // ── get_image ────────────────────────────────────────────────────────────
@@ -54,59 +54,14 @@ export function registerImageManagementTools(server) {
54
54
  return errorToToolResult(err);
55
55
  }
56
56
  });
57
- // ── upload_image ─────────────────────────────────────────────────────────
58
- // Tries HTTP upload first (works remote), falls back to filesystem copy.
59
- server.tool("upload_image", "Upload a local image file to ComfyUI's input/ directory so it can be " +
60
- "referenced in LoadImage nodes. Tries HTTP upload first (works with " +
61
- "remote ComfyUI), falls back to filesystem copy when COMFYUI_PATH is set.", {
62
- source_path: z
63
- .string()
64
- .describe("Absolute path to the local image file to upload"),
65
- filename: z
66
- .string()
67
- .optional()
68
- .describe("Override the filename in ComfyUI's input/ directory. " +
69
- "Auto-detected from source path if omitted."),
70
- }, async (args) => {
71
- try {
72
- // Try HTTP upload first (works for remote ComfyUI)
73
- const result = await uploadImageAuto(args.source_path, args.filename);
74
- return {
75
- content: [
76
- {
77
- type: "text",
78
- text: `Image uploaded successfully via HTTP.\n\n` +
79
- `Filename: ${result.filename}\n\n` +
80
- `Use "${result.filename}" as the \`image\` input in LoadImage nodes.`,
81
- },
82
- ],
83
- };
84
- }
85
- catch (httpErr) {
86
- // Fall back to filesystem copy if HTTP fails and COMFYUI_PATH is set
87
- try {
88
- const result = await uploadImage(args.source_path, args.filename);
89
- return {
90
- content: [
91
- {
92
- type: "text",
93
- text: `Image uploaded successfully via filesystem.\n\n` +
94
- `Filename: ${result.filename}\nPath: ${result.path}\n\n` +
95
- `Use "${result.filename}" as the \`image\` input in LoadImage nodes.`,
96
- },
97
- ],
98
- };
99
- }
100
- catch (fsErr) {
101
- // Both failed — report both errors
102
- return errorToToolResult(new Error(`HTTP upload failed: ${httpErr instanceof Error ? httpErr.message : httpErr}\n` +
103
- `Filesystem fallback also failed: ${fsErr instanceof Error ? fsErr.message : fsErr}`));
104
- }
105
- }
106
- });
107
- // ── upload_video / upload_audio ────────────────────────────────────────────
108
- // Same HTTP-first, filesystem-fallback mechanism as upload_image.
109
- const registerMediaUpload = (name, description, autoFn, localFn, nodeHint) => {
57
+ // ── upload_image / upload_video / upload_audio ────────────────────────────
58
+ // HTTP-only (works for both local and remote ComfyUI via /upload/image).
59
+ // Previous filesystem fallback was deceptive when COMFYUI_PATH auto-detected
60
+ // an unrelated local install files would land in the wrong tree and the
61
+ // tool reported success while the remote ComfyUI never received them.
62
+ // Originally diagnosed by João Lucas (github.com/joaolvivas) in
63
+ // joaolvivas/comfyui-mcp-byjlucas@089180ad (2026-05-12).
64
+ const registerMediaUpload = (name, description, autoFn, nodeHint) => {
110
65
  server.tool(name, description, {
111
66
  source_path: z
112
67
  .string()
@@ -123,43 +78,32 @@ export function registerImageManagementTools(server) {
123
78
  content: [
124
79
  {
125
80
  type: "text",
126
- text: `Uploaded successfully via HTTP.\n\nFilename: ${result.filename}\n\n` +
81
+ text: `Uploaded via HTTP.\n\nFilename: ${result.filename}\n\n` +
127
82
  `Use "${result.filename}" ${nodeHint}.`,
128
83
  },
129
84
  ],
130
85
  };
131
86
  }
132
- catch (httpErr) {
133
- try {
134
- const result = await localFn(args.source_path, args.filename);
135
- return {
136
- content: [
137
- {
138
- type: "text",
139
- text: `Uploaded successfully via filesystem.\n\nFilename: ${result.filename}\nPath: ${result.path}\n\n` +
140
- `Use "${result.filename}" ${nodeHint}.`,
141
- },
142
- ],
143
- };
144
- }
145
- catch (fsErr) {
146
- return errorToToolResult(new Error(`HTTP upload failed: ${httpErr instanceof Error ? httpErr.message : httpErr}\n` +
147
- `Filesystem fallback also failed: ${fsErr instanceof Error ? fsErr.message : fsErr}`));
148
- }
87
+ catch (err) {
88
+ return errorToToolResult(err);
149
89
  }
150
90
  });
151
91
  };
152
- registerMediaUpload("upload_video", "Upload a local video file (.mp4, .mov, .webm, .avi, .mkv, .m4v) to the connected " +
153
- "ComfyUI's input/ directory for use in video-loading nodes such as VHS_LoadVideo " +
154
- "(ComfyUI-VideoHelperSuite). Tries an HTTP multipart upload first (works against a " +
155
- "remote --comfyui-url instance), then falls back to a local filesystem copy when " +
156
- "COMFYUI_PATH is set. Returns the stored filename. Use upload_image for images or " +
157
- "upload_audio for audio.", uploadVideoAuto, uploadVideoLocal, "as the video file input in VHS_LoadVideo (or similar) nodes");
158
- registerMediaUpload("upload_audio", "Upload a local audio file (.wav, .mp3, .flac, .ogg, .m4a, .aac) to the connected " +
159
- "ComfyUI's input/ directory for use in audio-conditioned workflows (e.g. LoadAudio). " +
160
- "Tries an HTTP multipart upload first (works against a remote --comfyui-url instance), " +
161
- "then falls back to a local filesystem copy when COMFYUI_PATH is set. Returns the stored " +
162
- "filename. Use upload_image for images or upload_video for video.", uploadAudioAuto, uploadAudioLocal, "as the audio file input in LoadAudio (or similar) nodes");
92
+ registerMediaUpload("upload_image", "Upload a local image file to the connected ComfyUI's input/ directory " +
93
+ "via the HTTP /upload/image endpoint so it can be referenced in LoadImage " +
94
+ "nodes. Works for both local and remote ComfyUI. Returns the stored " +
95
+ "filename.", uploadImageAuto, "as the `image` input in LoadImage nodes");
96
+ registerMediaUpload("upload_video", "Upload a local video file (.mp4, .mov, .webm, .avi, .mkv, .m4v) to the " +
97
+ "connected ComfyUI's input/ directory via the HTTP /upload/image endpoint " +
98
+ "for use in video-loading nodes such as VHS_LoadVideo " +
99
+ "(ComfyUI-VideoHelperSuite). Works for both local and remote ComfyUI. " +
100
+ "Returns the stored filename. Use upload_image for images or " +
101
+ "upload_audio for audio.", uploadVideoAuto, "as the video file input in VHS_LoadVideo (or similar) nodes");
102
+ registerMediaUpload("upload_audio", "Upload a local audio file (.wav, .mp3, .flac, .ogg, .m4a, .aac) to the " +
103
+ "connected ComfyUI's input/ directory via the HTTP /upload/image endpoint " +
104
+ "for use in audio-conditioned workflows (e.g. LoadAudio). Works for both " +
105
+ "local and remote ComfyUI. Returns the stored filename. Use upload_image " +
106
+ "for images or upload_video for video.", uploadAudioAuto, "as the audio file input in LoadAudio (or similar) nodes");
163
107
  // ── workflow_from_image ───────────────────────────────────────────────────
164
108
  server.tool("workflow_from_image", "Extract embedded ComfyUI workflow metadata from a PNG file. " +
165
109
  "ComfyUI stores the full workflow (API format) and prompt data in PNG tEXt chunks. " +
@@ -1 +1 @@
1
- {"version":3,"file":"image-management.js","sourceRoot":"","sources":["../../src/tools/image-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,UAAU,4BAA4B,CAAC,MAAiB;IAC5D,4EAA4E;IAC5E,yDAAyD;IACzD,wDAAwD;IACxD,MAAM,CAAC,IAAI,CACT,WAAW,EACX,yEAAyE;QACvE,uEAAuE;QACvE,+CAA+C,EACjD;QACE,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QA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EAAE,CAAC;gBACxB,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,IAAI,CAAC,OAAO;gCAChB,CAAC,CAAC,oCAAoC,IAAI,CAAC,OAAO,IAAI;gCACtD,CAAC,CAAC,yBAAyB;yBAC9B;qBACF;iBACF,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;gBAClC,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,cAAc,EAAE,CAAC;gBACrD,OAAO,GAAG,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,QAAQ,OAAO,MAAM,UAAU,IAAI,EAAE,CAAC;YAClE,CAAC,CAAC,CAAC;YACH,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;qBAChE;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"image-management.js","sourceRoot":"","sources":["../../src/tools/image-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EACL,wBAAwB,EACxB,gBA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,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;gBAClC,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBACnD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,cAAc,EAAE,CAAC;gBACrD,OAAO,GAAG,CAAC,GAAG,CAAC,OAAO,GAAG,CAAC,QAAQ,OAAO,MAAM,UAAU,IAAI,EAAE,CAAC;YAClE,CAAC,CAAC,CAAC;YACH,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,SAAS,MAAM,CAAC,MAAM,iBAAiB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;qBAChE;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsCzE,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCvE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuCzE,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCvE"}
@@ -33,6 +33,7 @@ import { registerManagerConfigTools } from "./manager-config.js";
33
33
  import { registerManifestTools } from "./manifest.js";
34
34
  import { registerImageConvertTools } from "./image-convert.js";
35
35
  import { registerStorageUploadTools } from "./storage-upload.js";
36
+ import { registerHealthCheckTools } from "./health-check.js";
36
37
  import { DefaultsManager } from "../services/defaults-manager.js";
37
38
  export async function registerAllTools(server) {
38
39
  // Hydrate persisted defaults before any tool registration so subsequent
@@ -72,6 +73,7 @@ export async function registerAllTools(server) {
72
73
  registerManifestTools(server);
73
74
  registerImageConvertTools(server);
74
75
  registerStorageUploadTools(server);
76
+ registerHealthCheckTools(server);
75
77
  await registerAutoloadedWorkflows(server);
76
78
  }
77
79
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;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AAC5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comfyui-mcp",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "mcpName": "io.github.artokun/comfyui-mcp",
5
5
  "description": "MCP server for ComfyUI — workflow execution, visualization, composition, registry, and skill generation",
6
6
  "homepage": "https://comfyui-mcp.artokun.io/docs",
@@ -67,5 +67,11 @@
67
67
  "license": "MIT",
68
68
  "engines": {
69
69
  "node": ">=22.0.0"
70
+ },
71
+ "pnpm": {
72
+ "onlyBuiltDependencies": [
73
+ "better-sqlite3",
74
+ "sharp"
75
+ ]
70
76
  }
71
77
  }
@@ -86,6 +86,7 @@ const CATEGORIES: Array<{
86
86
  tools: [
87
87
  "enqueue_workflow", "get_system_stats", "get_queue", "get_job_status",
88
88
  "cancel_job", "cancel_queued_job", "clear_queue", "get_history", "get_logs",
89
+ "health_check",
89
90
  ],
90
91
  },
91
92
  {