mcp-3d-printer-server 1.0.1 → 1.0.2

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/dist/index.js CHANGED
File without changes
@@ -129,10 +129,16 @@ export class BambuImplementation extends PrinterImplementation {
129
129
  const remotePath = `gcodes/${remoteFilename}`.replace(/\\/g, '/');
130
130
  // 1. Connect FTP if necessary (via bambu-js helper)
131
131
  if (!printerFTP.isConnected) {
132
- console.log(`Connecting Bambu FTP ${host} (${serial}) before uploading...`);
133
- await printerFTP.connect(); // Connects MQTT and FTP
132
+ console.log(`Connecting Bambu FTP ${host} (${serial}) on port 990 (assumed) before uploading...`);
133
+ try {
134
+ await printerFTP.connect(); // Connects MQTT and FTP
135
+ console.log(`Connected Bambu FTP successfully.`);
136
+ }
137
+ catch (ftpConnectError) {
138
+ console.error(`Bambu FTP Connection Error:`, ftpConnectError);
139
+ throw new Error(`Failed to connect to Bambu FTP: ${ftpConnectError.message}`);
140
+ }
134
141
  // await printerFTP.awaitInitialState(10000); // Might not be needed just for FTP
135
- console.log(`Connected Bambu FTP.`);
136
142
  }
137
143
  // 2. Upload the file via FTP
138
144
  console.log(`Uploading ${options.filePath} to ${remotePath} via FTP...`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-3d-printer-server",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for connecting Claude with 3D printer management systems",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://github.com/DMontgomery40/mcp-3D-printer-server",
@@ -194,10 +194,15 @@ export class BambuImplementation extends PrinterImplementation {
194
194
 
195
195
  // 1. Connect FTP if necessary (via bambu-js helper)
196
196
  if (!printerFTP.isConnected) {
197
- console.log(`Connecting Bambu FTP ${host} (${serial}) before uploading...`);
198
- await printerFTP.connect(); // Connects MQTT and FTP
197
+ console.log(`Connecting Bambu FTP ${host} (${serial}) on port 990 (assumed) before uploading...`);
198
+ try {
199
+ await printerFTP.connect(); // Connects MQTT and FTP
200
+ console.log(`Connected Bambu FTP successfully.`);
201
+ } catch (ftpConnectError) {
202
+ console.error(`Bambu FTP Connection Error:`, ftpConnectError);
203
+ throw new Error(`Failed to connect to Bambu FTP: ${(ftpConnectError as Error).message}`);
204
+ }
199
205
  // await printerFTP.awaitInitialState(10000); // Might not be needed just for FTP
200
- console.log(`Connected Bambu FTP.`);
201
206
  }
202
207
 
203
208
  // 2. Upload the file via FTP