bambu-printer-mcp 1.1.66 → 1.1.67

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
@@ -1254,6 +1254,18 @@ Blender. Set the command to your full `uvx` path and the argument array to
1254
1254
  `["blender-mcp"]`. The Claude Desktop extension also offers these two optional
1255
1255
  settings. Printer tools work without Blender configured.
1256
1256
 
1257
+ `blender_mcp_setup` checks the MCP for Blender add-on that the configured
1258
+ package needs, when the bridge is that package run with `uvx`: which add-on file
1259
+ Blender loads (for the running Blender's version), its protocol and the one the
1260
+ package expects, whether Blender is listening, and the running add-on's own
1261
+ `get_addon_status`. It changes nothing. With `{"update": true}` it stages the
1262
+ add-on with the package's own installer (`mcp-for-blender install-addon`) at the
1263
+ inspected version, checks that the installed and staged files are both regular
1264
+ MCP for Blender add-ons and that the staged one carries the expected protocol,
1265
+ keeps the old file as a backup next to it, and renames the new one into place.
1266
+ It never starts, stops or edits Blender: re-enable the add-on or restart Blender
1267
+ to load it. Another bridge reports `supported: false` and keeps its own installer.
1268
+
1257
1269
  1. Call `blender_mcp_status` with `{"connect": true}` to initialize the server
1258
1270
  and discover its tools and input schemas. A connected MCP server does not
1259
1271
  by itself prove that the Blender addon is running.
@@ -1318,14 +1330,36 @@ Design a part from scratch in Autodesk Fusion through
1318
1330
  free personal-use licence, are yours: this server never installs or requires
1319
1331
  Fusion, and printer tools work without it.
1320
1332
 
1321
- Install exactly commit `19b9f1e95192`. Copy the repository's `addon/` folder at
1322
- that commit to `~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns/Fusion360MCP`,
1323
- set the add-in to **Run on Startup**, and add these settings next to the Blender
1324
- ones in your env file:
1333
+ The bridge and its setup pin [DMontgomery40/fusion360-mcp-server](https://github.com/DMontgomery40/fusion360-mcp-server) at commit
1334
+ `86a3016a5a5b`: faust-machines' server and add-in with document binding, which
1335
+ `fusion_mcp_new_design`'s `bind_document` needs, while that change is reviewed
1336
+ upstream.
1337
+
1338
+ On macOS, `fusion_mcp_setup` sets it up. Without arguments it reports, changing
1339
+ nothing: whether Fusion is installed, whether the add-in in
1340
+ `~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns/Fusion360MCP`
1341
+ is at the pin and runs on startup, whether the login item that gives Fusion
1342
+ `FUSION_MCP_PORT` is installed, and whether this server has its Fusion settings.
1343
+ With `{"install": true}` it installs what is missing:
1344
+
1345
+ - the add-in from the pinned commit's archive, after checking every file against
1346
+ its SHA-256 (a symlink, an extra file or a changed byte installs nothing), set
1347
+ to **Run on Startup**. An add-in already at the pin is left in place;
1348
+ - a login LaunchAgent, `com.scantomake.mac.fusion-port`, that runs
1349
+ `launchctl setenv FUSION_MCP_PORT 9877` at login, because Fusion opened from the
1350
+ Dock never reads this server's env file;
1351
+ - the settings this server is missing, added to its own `.env` after a copy of
1352
+ the file. A configured `FUSION_MCP_COMMAND` is kept with its arguments, so a
1353
+ reviewed local runtime isn't replaced. The running server uses them at once.
1354
+
1355
+ It never starts or quits Fusion; `fusion_mcp_status` checks the connection. On
1356
+ other systems, or by hand: copy the repository's `addon/` folder at that commit
1357
+ to the AddIns folder above, set it to **Run on Startup**, and add these settings
1358
+ next to the Blender ones in your env file:
1325
1359
 
1326
1360
  ```bash
1327
1361
  FUSION_MCP_COMMAND=uvx
1328
- FUSION_MCP_ARGS='["--from","git+https://github.com/faust-machines/fusion360-mcp-server@19b9f1e95192","fusion360-mcp-server","--mode","socket"]'
1362
+ FUSION_MCP_ARGS='["--from","git+https://github.com/DMontgomery40/fusion360-mcp-server@86a3016a5a5b","fusion360-mcp-server","--mode","socket"]'
1329
1363
  FUSION_MCP_TIMEOUT_MS=180000
1330
1364
  FUSION_MCP_HOST=localhost
1331
1365
  # The default here; Blender's MCP add-on holds the add-in's own default, 9876.
@@ -18,6 +18,8 @@ export const REMOTE_SCOPES = {
18
18
  counterpart_printer_info: "read",
19
19
  counterpart_print_progress: "read",
20
20
  fusion_mcp_status: "read",
21
+ blender_mcp_setup: "read", // checks only; update raises it
22
+ fusion_mcp_setup: "read", // checks only; install raises it
21
23
  // design
22
24
  slice_stl: "design",
23
25
  lay_flat: "design",
@@ -69,6 +71,8 @@ export const REMOTE_SCOPES = {
69
71
  const RAISED_BY = {
70
72
  fusion_mcp_status: { launch: "design" }, // starts Fusion on this computer
71
73
  blender_mcp_status: { connect: "design" }, // connects to Blender
74
+ blender_mcp_setup: { update: "raw" }, // replaces the add-on in the person's Blender
75
+ fusion_mcp_setup: { install: "raw" }, // installs into the person's Fusion, a login item and this server's .env
72
76
  };
73
77
  /**
74
78
  * Overrides of a server's own configuration (both printer MCPs use the same names): the printer it targets, its
@@ -0,0 +1,384 @@
1
+ /** What these tools reach outside the server: tests replace every field. */
2
+ export type SetupSystem = {
3
+ platform: NodeJS.Platform;
4
+ home: string;
5
+ /** Where staged downloads and installer output go before they are checked. */
6
+ tmp: string;
7
+ uid: number;
8
+ /** The working directory dotenv read `.env` from when the server started. */
9
+ cwd: string;
10
+ run(file: string, args: string[], options?: {
11
+ env?: NodeJS.ProcessEnv;
12
+ timeoutMs?: number;
13
+ cwd?: string;
14
+ signal?: AbortSignal;
15
+ }): Promise<{
16
+ stdout: string;
17
+ }>;
18
+ download(url: string, signal?: AbortSignal): Promise<Buffer>;
19
+ /** Whether something accepts a TCP connection on host:port within a second. */
20
+ listening(host: string, port: number): Promise<boolean>;
21
+ /** Installed Autodesk Fusion apps found by bundle identifier (Spotlight). */
22
+ fusionByBundleId(): Promise<string[]>;
23
+ };
24
+ /**
25
+ * What a setup subprocess (uvx and the Blender package it runs, tar, launchctl) may see: the basic login
26
+ * environment, uv's own settings and the Blender bridge's, never printer access codes or other server secrets,
27
+ * as the Blender bridge's own environment.
28
+ */
29
+ export declare function setupEnvironment(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
30
+ export declare const defaultSetupSystem: SetupSystem;
31
+ /** The add-on's own default port; BLENDER_HOST and BLENDER_PORT move it, as they do for the Blender MCP server. */
32
+ export declare const BLENDER_ADDON_DEFAULT_PORT = 9876;
33
+ /** The running add-on's answer to get_addon_status, as far as setup needs it. */
34
+ export type BlenderAddonHandshake = {
35
+ up_to_date?: boolean;
36
+ protocol_version?: number | null;
37
+ expected_protocol_version?: number;
38
+ blender_version?: string | null;
39
+ };
40
+ /** get_addon_status's result, structured or as JSON text; a failed call throws with the add-on's own words. */
41
+ export declare function parseAddonHandshake(reply: {
42
+ isError?: boolean;
43
+ structuredContent?: unknown;
44
+ content?: {
45
+ type: string;
46
+ text?: string;
47
+ }[];
48
+ }): BlenderAddonHandshake | undefined;
49
+ export type BlenderSetupReport = {
50
+ /** False when the configured bridge isn't the upstream MCP for Blender package run with uvx; see reason. */
51
+ supported: boolean;
52
+ reason?: "not-configured" | "custom-command" | "custom-package";
53
+ package?: string;
54
+ package_version?: string;
55
+ /** The add-on protocol the configured package needs. */
56
+ expected_protocol?: number;
57
+ /** Something answers on the add-on's port: Blender is running with the add-on started. */
58
+ listening: boolean;
59
+ /** The running add-on's handshake; null when it doesn't report one or couldn't be read (see live_error). Only read while listening. */
60
+ live?: BlenderAddonHandshake | null;
61
+ /** Why the running add-on's handshake couldn't be read. */
62
+ live_error?: string;
63
+ /** The add-on file Blender loads, and its protocol (null when the file has none). */
64
+ target?: {
65
+ path: string;
66
+ protocol: number | null;
67
+ } | null;
68
+ /** Why there is no target. */
69
+ target_problem?: "not-installed" | "several-modules";
70
+ /** What the person can do, in plain words, when the add-on can't be checked or updated here (reason, target_problem). */
71
+ message?: string;
72
+ /** The installed file's protocol is what the package expects. */
73
+ current?: boolean;
74
+ /** Set by update. */
75
+ replaced?: boolean;
76
+ backup?: string;
77
+ };
78
+ /** One add-on module per Blender version folder; other versions are separate installs. */
79
+ export declare function selectBlenderAddonTarget(files: {
80
+ path?: unknown;
81
+ protocol?: unknown;
82
+ }[], blenderVersion?: string | null): {
83
+ target: {
84
+ path: string;
85
+ protocol: number | null;
86
+ };
87
+ } | {
88
+ problem: "not-installed" | "several-modules";
89
+ };
90
+ export declare class BlenderAddonSetup {
91
+ /** The running add-on's get_addon_status through this server's Blender bridge; undefined when it has none. */
92
+ private readonly handshake;
93
+ private readonly system;
94
+ private readonly env;
95
+ constructor(
96
+ /** The running add-on's get_addon_status through this server's Blender bridge; undefined when it has none. */
97
+ handshake: () => Promise<BlenderAddonHandshake | undefined>, system?: SetupSystem, env?: NodeJS.ProcessEnv);
98
+ private inspect;
99
+ /** What is installed, what the package expects, and what the running add-on says. Changes nothing. */
100
+ check(): Promise<BlenderSetupReport>;
101
+ /**
102
+ * Replaces the installed add-on file with the one the configured package's own installer stages, pinned to the
103
+ * inspected version. The existing file must be a regular local MCP for Blender add-on; the staged one must carry
104
+ * the expected protocol. The old file is kept as a backup next to it, and the new one is renamed into place.
105
+ * Blender keeps running the add-on it loaded until it is re-enabled or restarted.
106
+ */
107
+ /** `signal` ends the request: the installer is stopped and nothing is replaced once it is aborted. */
108
+ update(signal?: AbortSignal): Promise<BlenderSetupReport>;
109
+ private readonly serial;
110
+ private replace;
111
+ }
112
+ export declare const BLENDER_SETUP_OUTPUT_SCHEMA: {
113
+ readonly type: "object";
114
+ readonly properties: {
115
+ readonly supported: {
116
+ readonly type: "boolean";
117
+ readonly description: "The configured bridge is the upstream MCP for Blender package run with uvx, so this tool can check and update its add-on.";
118
+ };
119
+ readonly reason: {
120
+ readonly type: "string";
121
+ readonly enum: readonly ["not-configured", "custom-command", "custom-package"];
122
+ };
123
+ readonly package: {
124
+ readonly type: "string";
125
+ readonly description: "The package as BLENDER_MCP_ARGS names it.";
126
+ };
127
+ readonly package_version: {
128
+ readonly type: "string";
129
+ };
130
+ readonly expected_protocol: {
131
+ readonly type: "integer";
132
+ readonly description: "The add-on protocol the package needs.";
133
+ };
134
+ readonly listening: {
135
+ readonly type: "boolean";
136
+ readonly description: "The add-on answers on BLENDER_HOST:BLENDER_PORT (default localhost:9876): Blender is running with it started.";
137
+ };
138
+ readonly live: {
139
+ readonly type: readonly ["object", "null"];
140
+ readonly description: "The running add-on's get_addon_status (up_to_date, protocol_version, expected_protocol_version, blender_version); null when it has none or it couldn't be read. Only while listening.";
141
+ };
142
+ readonly live_error: {
143
+ readonly type: "string";
144
+ readonly description: "Why the running add-on's handshake couldn't be read.";
145
+ };
146
+ readonly target: {
147
+ readonly type: readonly ["object", "null"];
148
+ readonly properties: {
149
+ readonly path: {
150
+ readonly type: "string";
151
+ };
152
+ readonly protocol: {
153
+ readonly type: readonly ["integer", "null"];
154
+ };
155
+ };
156
+ readonly required: readonly ["path", "protocol"];
157
+ readonly description: "The add-on file Blender loads (for the running Blender's version, when it reports one).";
158
+ };
159
+ readonly target_problem: {
160
+ readonly type: "string";
161
+ readonly enum: readonly ["not-installed", "several-modules"];
162
+ };
163
+ readonly message: {
164
+ readonly type: "string";
165
+ readonly description: "What the person can do, in plain words, when the add-on can't be checked or updated here (with reason or target_problem). Clients show it as it is.";
166
+ };
167
+ readonly current: {
168
+ readonly type: "boolean";
169
+ readonly description: "The installed file carries the expected protocol. A running Blender may still have the old add-on loaded: see live.";
170
+ };
171
+ readonly replaced: {
172
+ readonly type: "boolean";
173
+ readonly description: "update: the file was replaced. Blender runs the new add-on once it is re-enabled or Blender restarts.";
174
+ };
175
+ readonly backup: {
176
+ readonly type: "string";
177
+ readonly description: "update: the previous add-on file, kept next to it.";
178
+ };
179
+ };
180
+ readonly required: readonly ["supported", "listening"];
181
+ };
182
+ /** The add-in and server commit Counterpart's Fusion design passes were accepted on (document binding, PRD §8.9). */
183
+ export declare const FUSION_ADDIN_REPOSITORY = "DMontgomery40/fusion360-mcp-server";
184
+ export declare const FUSION_ADDIN_COMMIT = "86a3016a5a5b4a705228acc2f3b75aff7dcfd758";
185
+ /** SHA-256 of every file in the add-in (`addon/`) at that commit. Setup installs nothing else. */
186
+ export declare const FUSION_ADDIN_FILES: Readonly<Record<string, string>>;
187
+ export type FusionAddinPin = {
188
+ repository: string;
189
+ commit: string;
190
+ files: Readonly<Record<string, string>>;
191
+ };
192
+ export declare const FUSION_ADDIN_PIN: FusionAddinPin;
193
+ /** A login agent that gives Fusion the add-in's port however Fusion is opened (a GUI app never reads this .env). */
194
+ export declare const FUSION_PORT_AGENT_LABEL = "com.scantomake.mac.fusion-port";
195
+ export type FusionSetupReport = {
196
+ platform: string;
197
+ /** Setup installs on macOS only. */
198
+ supported: boolean;
199
+ fusion: {
200
+ installed: boolean;
201
+ path: string | null;
202
+ };
203
+ pin: {
204
+ repository: string;
205
+ commit: string;
206
+ };
207
+ addin: {
208
+ path: string;
209
+ installed: boolean;
210
+ matches_pin: boolean;
211
+ run_on_startup: boolean;
212
+ };
213
+ port: number;
214
+ port_agent: {
215
+ path: string;
216
+ installed: boolean;
217
+ };
218
+ /** FUSION_MCP_COMMAND is set for this server. */
219
+ configured: boolean;
220
+ /** The .env this server read at start, when there is one. */
221
+ env_file: string | null;
222
+ /** Add-in at the pin, port agent installed and the bridge configured. Fusion itself may still need opening. */
223
+ ready: boolean;
224
+ /** When not ready: what is missing and what to do, in plain words clients show as they are. */
225
+ message?: string;
226
+ /** Set by install. */
227
+ installed?: {
228
+ addin: "installed" | "already-current";
229
+ port_agent: "installed" | "already-current";
230
+ env: "written" | "already-configured" | "no-env-file";
231
+ env_backup?: string;
232
+ };
233
+ };
234
+ export declare class FusionAddinSetup {
235
+ /** FUSION_MCP_PORT, as the bridge resolves it. */
236
+ private readonly port;
237
+ /** The bridge arguments for the pinned server, written with the add-in so the two always match. */
238
+ private readonly serverArgs;
239
+ private readonly system;
240
+ private readonly env;
241
+ private readonly pin;
242
+ constructor(
243
+ /** FUSION_MCP_PORT, as the bridge resolves it. */
244
+ port: () => number,
245
+ /** The bridge arguments for the pinned server, written with the add-in so the two always match. */
246
+ serverArgs: readonly string[], system?: SetupSystem, env?: NodeJS.ProcessEnv, pin?: FusionAddinPin);
247
+ private get addinsFolder();
248
+ private get addinFolder();
249
+ private get portAgent();
250
+ private findFusion;
251
+ /** Each pinned file at its pinned bytes; the manifest may carry only setup's runOnStartup change. Fusion's own caches are ignored. */
252
+ private installedMatchesPin;
253
+ private portAgentPlist;
254
+ /**
255
+ * The agent is installed when it sets this port and launchd has it loaded in the login session: a file whose load
256
+ * failed is installed again. An agent written for another port is replaced by install.
257
+ */
258
+ private portAgentInstalled;
259
+ /** What is installed. Changes nothing. */
260
+ check(): Promise<FusionSetupReport>;
261
+ /** The pinned add-in, downloaded and checked file by file: every entry a regular file or folder, nothing extra, nothing missing. */
262
+ private downloadAddin;
263
+ private installAddin;
264
+ /** Writes the agent and loads it in the person's login session, where its RunAtLoad sets FUSION_MCP_PORT. */
265
+ private installPortAgent;
266
+ /**
267
+ * Adds the bridge settings this server is missing to its own .env, after a copy of the file. A configured
268
+ * FUSION_MCP_COMMAND is kept with its arguments: it may be a reviewed local runtime. The running server takes
269
+ * the new settings at once.
270
+ */
271
+ private writeSettings;
272
+ /** Installs the pinned add-in set to run on startup, the port login item, and this server's missing bridge settings. */
273
+ /** `signal` ends the request: the download and tar are stopped, and nothing more is written once it is aborted. */
274
+ install(signal?: AbortSignal): Promise<FusionSetupReport>;
275
+ private readonly serial;
276
+ private installMissing;
277
+ }
278
+ export declare const FUSION_SETUP_OUTPUT_SCHEMA: {
279
+ readonly type: "object";
280
+ readonly properties: {
281
+ readonly platform: {
282
+ readonly type: "string";
283
+ };
284
+ readonly supported: {
285
+ readonly type: "boolean";
286
+ readonly description: "Setup installs on macOS only.";
287
+ };
288
+ readonly fusion: {
289
+ readonly type: "object";
290
+ readonly properties: {
291
+ readonly installed: {
292
+ readonly type: "boolean";
293
+ };
294
+ readonly path: {
295
+ readonly type: readonly ["string", "null"];
296
+ };
297
+ };
298
+ readonly required: readonly ["installed", "path"];
299
+ };
300
+ readonly pin: {
301
+ readonly type: "object";
302
+ readonly properties: {
303
+ readonly repository: {
304
+ readonly type: "string";
305
+ };
306
+ readonly commit: {
307
+ readonly type: "string";
308
+ };
309
+ };
310
+ readonly required: readonly ["repository", "commit"];
311
+ };
312
+ readonly addin: {
313
+ readonly type: "object";
314
+ readonly properties: {
315
+ readonly path: {
316
+ readonly type: "string";
317
+ };
318
+ readonly installed: {
319
+ readonly type: "boolean";
320
+ };
321
+ readonly matches_pin: {
322
+ readonly type: "boolean";
323
+ };
324
+ readonly run_on_startup: {
325
+ readonly type: "boolean";
326
+ };
327
+ };
328
+ readonly required: readonly ["path", "installed", "matches_pin", "run_on_startup"];
329
+ };
330
+ readonly port: {
331
+ readonly type: "integer";
332
+ };
333
+ readonly port_agent: {
334
+ readonly type: "object";
335
+ readonly properties: {
336
+ readonly path: {
337
+ readonly type: "string";
338
+ };
339
+ readonly installed: {
340
+ readonly type: "boolean";
341
+ };
342
+ };
343
+ readonly required: readonly ["path", "installed"];
344
+ };
345
+ readonly configured: {
346
+ readonly type: "boolean";
347
+ readonly description: "FUSION_MCP_COMMAND is set for this server.";
348
+ };
349
+ readonly env_file: {
350
+ readonly type: readonly ["string", "null"];
351
+ readonly description: "The .env this server read at start, when there is one.";
352
+ };
353
+ readonly ready: {
354
+ readonly type: "boolean";
355
+ readonly description: "The add-in is at the pin and runs on startup, the port login item is installed and the bridge is configured. Fusion may still need opening: see fusion_mcp_status.";
356
+ };
357
+ readonly message: {
358
+ readonly type: "string";
359
+ readonly description: "When not ready: what is missing and what to do, in plain words. Clients show it as it is.";
360
+ };
361
+ readonly installed: {
362
+ readonly type: "object";
363
+ readonly description: "install: what it did.";
364
+ readonly properties: {
365
+ readonly addin: {
366
+ readonly type: "string";
367
+ readonly enum: readonly ["installed", "already-current"];
368
+ };
369
+ readonly port_agent: {
370
+ readonly type: "string";
371
+ readonly enum: readonly ["installed", "already-current"];
372
+ };
373
+ readonly env: {
374
+ readonly type: "string";
375
+ readonly enum: readonly ["written", "already-configured", "no-env-file"];
376
+ };
377
+ readonly env_backup: {
378
+ readonly type: "string";
379
+ };
380
+ };
381
+ };
382
+ };
383
+ readonly required: readonly ["platform", "supported", "fusion", "pin", "addin", "port", "port_agent", "configured", "env_file", "ready"];
384
+ };