comfyui-mcp 0.52.201 → 0.52.203

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/README.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # comfyui-mcp — drive ComfyUI with ANY LLM
2
2
 
3
+ > [!IMPORTANT]
4
+ > **This project is no longer maintained.**
5
+ >
6
+ > ComfyUI now ships official agent and MCP tooling — **[Comfy Agent](https://comfy.org/agent)** and
7
+ > **[Comfy MCP](https://comfy.org/mcp)** — built and supported by the Comfy-Org team with deeper
8
+ > integration than a community project can match. If you’re looking for an MCP server or AI agent
9
+ > for ComfyUI, use the official tooling.
10
+ >
11
+ > This repo will remain public as a reference, but no new features, bug fixes, or dependency
12
+ > updates will be made. **Issues and pull requests close when the repo is archived on 2026-10-09.**
13
+ > The community Discord goes read-only the same day, with its threads left up as a searchable
14
+ > archive.
15
+ >
16
+ > Thanks to everyone who used, starred, forked, and contributed to this project.
17
+ > It was a good run. :rocket:
18
+ >
19
+ > The full story is in the [goodbye post](https://comfyui-mcp.artokun.io/docs/blog/goodbye).
20
+ >
21
+ > Looking for a ComfyUI or generative-AI integration expert? I take on custom solutions — reach me by
22
+ > email at **art.longbottom.jr@gmail.com** or on [LinkedIn](https://www.linkedin.com/in/alongbottom/).
23
+
3
24
  <p align="center">
4
25
  <a href="https://comfyui-mcp.artokun.io/docs">
5
26
  <img src="docs/images/demo-poster.jpg" width="760"
@@ -255,10 +276,6 @@ New tools that give every backend the same expertise and a cost guardrail:
255
276
  | `panel_load_workflow` | (panel tool) Load a full workflow onto the live canvas in one shot — by bundled `pack` name (read server-side, never shuttled through chat) or by graph JSON |
256
277
  | `panel_strip_workflow` / `panel_slice_workflow` | (panel tools) De-virtualize a tangled graph (Get/Set buses, Reroutes, subgraphs, bypass → real connections) or carve one rgthree-toggled pipeline out of a monolith — by `pack`, server-side `path`, or inline graph; for understanding/rebuilding expert workflows without hand-tracing |
257
278
 
258
- See the design doc, [design/agent-backend-injection.md](design/agent-backend-injection.md),
259
- for the port, the capability matrix, and the per-provider "clink" points, and the
260
- [panel docs](https://comfyui-mcp.artokun.io/docs/panel) for the full sidebar UX.
261
-
262
279
  ---
263
280
 
264
281
  ## MCP Tools
@@ -281,6 +281,39 @@ function classifyConsentReply(reply) {
281
281
  return "decline";
282
282
  return "unclear";
283
283
  }
284
+ /**
285
+ * Recover only the command this process can prove it was launched with. The
286
+ * self-restart path uses this same `execPath` + `argv.slice(1)` pair; a panel
287
+ * route's package-manager suggestion is not evidence about this process.
288
+ */
289
+ function currentOrchestratorRestartEvidence() {
290
+ const executable = process.execPath;
291
+ const argv = process.argv;
292
+ if (!executable || !Array.isArray(argv) || argv.length < 2)
293
+ return undefined;
294
+ const launchArgs = argv.slice(1);
295
+ if ([executable, ...launchArgs].some((token) => typeof token !== "string" || /[\u0000\r\n]/.test(token))) {
296
+ return undefined;
297
+ }
298
+ // Never copy a shared secret from a launch command into an MCP reply.
299
+ if (launchArgs.some((token) => token === "--token" || token.startsWith("--token="))) {
300
+ return undefined;
301
+ }
302
+ return {
303
+ command: [executable, ...launchArgs].map(quoteRestartArg).join(" "),
304
+ evidence: "current_process_argv",
305
+ };
306
+ }
307
+ /** Quote one observed argv token without inventing or dropping its boundaries. */
308
+ function quoteRestartArg(token) {
309
+ if (/^[A-Za-z0-9_./:@%+=,-]+$/.test(token))
310
+ return token;
311
+ if (process.platform === "win32") {
312
+ // CommandLineToArgvW-compatible escaping for quotes and trailing slashes.
313
+ return `"${token.replace(/(\\*)"/g, "$1$1\\\"").replace(/(\\+)$/g, "$1$1")}"`;
314
+ }
315
+ return `'${token.replace(/'/g, "'\\''")}'`;
316
+ }
284
317
  function ok(value) {
285
318
  return {
286
319
  content: [
@@ -19893,7 +19926,7 @@ export function buildPanelToolDefs() {
19893
19926
  markPanelSchemaReady(panelSchemaKey(ctx));
19894
19927
  return res;
19895
19928
  }),
19896
- def("panel_reload", "Soft-reload yourself to pick up code changes WITHOUT restarting ComfyUI — your chat session resumes automatically and you'll be nudged to continue. This ENDS the current turn. What each scope actually reloads: 'orchestrator' (default) respawns your agent and its comfyui tool server, so agent config, MCP servers (panel_add_mcp/panel_remove_mcp), the system prompt, and the code behind the comfyui server's tools all reload from the comfyui-mcp build on disk; 'frontend' re-fetches the panel UI (web JS/CSS). What it does NOT reload: the long-lived orchestrator process that serves every panel_* tool (including this one) and the services those tools use — that process keeps the code it started with, and only the user can restart it (the panel prints the exact restart command when this runs). So after editing orchestrator/panel-tool code, do NOT claim the change is live after this call — say the orchestrator process must be restarted. For custom-node or model changes that need a full ComfyUI restart, use panel_restart_comfyui instead. Only call this when code has actually changed and needs to take effect now.", {
19929
+ def("panel_reload", "Soft-reload yourself to pick up code changes WITHOUT restarting ComfyUI — your chat session resumes automatically and you'll be nudged to continue. This ENDS the current turn. What each scope actually reloads: 'orchestrator' (default) respawns your agent and its comfyui tool server, so agent config, MCP servers (panel_add_mcp/panel_remove_mcp), the system prompt, and the code behind the comfyui server's tools all reload from the comfyui-mcp build on disk; 'frontend' re-fetches the panel UI (web JS/CSS). What it does NOT reload: the long-lived orchestrator process that serves every panel_* tool (including this one) and the services those tools use — that process keeps the code it started with, and only the user can restart it. The result includes this process's exact launch command when it can be recovered, otherwise it gives launcher-specific fallback guidance. So after editing orchestrator/panel-tool code, do NOT claim the change is live after this call — say the orchestrator process must be restarted. For custom-node or model changes that need a full ComfyUI restart, use panel_restart_comfyui instead. Only call this when code has actually changed and needs to take effect now.", {
19897
19930
  scope: z
19898
19931
  .enum(["orchestrator", "frontend"])
19899
19932
  .optional()
@@ -19977,8 +20010,27 @@ export function buildPanelToolDefs() {
19977
20010
  "started with. If the change you were picking up touched " +
19978
20011
  "orchestrator/panel-tool code (e.g. a service a panel_* tool " +
19979
20012
  "imports), it is NOT in effect: tell the user the orchestrator " +
19980
- "process must be restarted (the panel shows the exact restart " +
19981
- "command).";
20013
+ "process must be restarted. ";
20014
+ const restart = currentOrchestratorRestartEvidence();
20015
+ if (restart) {
20016
+ text.text +=
20017
+ "The exact restart command observed from this process's launch " +
20018
+ `argv is: ${restart.command}.`;
20019
+ res.structuredContent = {
20020
+ ...(res.structuredContent ?? {}),
20021
+ manual_restart: {
20022
+ command: restart.command,
20023
+ evidence: restart.evidence,
20024
+ },
20025
+ };
20026
+ }
20027
+ else {
20028
+ text.text +=
20029
+ "The exact restart command could not be recovered from this " +
20030
+ "process's launch argv. Stop and restart the terminal or launcher " +
20031
+ "that owns this orchestrator using its existing command; do not " +
20032
+ "substitute a package-manager command.";
20033
+ }
19982
20034
  }
19983
20035
  }
19984
20036
  return res;