mcp-3d-printer-server 1.2.21 → 1.2.22
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 +6 -0
- package/dist/counterpart/service.js +8 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/counterpart/service.ts +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.22] – 2026-11-02
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `camera_snapshot` tries both 127.0.0.1 and ::1 for a `localhost` snapshot URL. Node 18 resolves `localhost` to ::1 first with no IPv4 fallback, so a webcam that listens on IPv4 only was missed. Verified with the OctoPrint Classic Webcam test on Node 18.20.8 and the full suite on Node 22.
|
|
8
|
+
|
|
3
9
|
## [1.2.21] – 2026-11-02
|
|
4
10
|
|
|
5
11
|
### Added
|
|
@@ -201,6 +201,14 @@ export class CounterpartService {
|
|
|
201
201
|
throw new Error(`Unsupported snapshot URL scheme: ${parsed.protocol}`);
|
|
202
202
|
if (LOOPBACK.has(parsed.hostname) && !LOOPBACK.has(target.host))
|
|
203
203
|
parsed.hostname = target.host;
|
|
204
|
+
// "localhost" can resolve to ::1 first, and Node 18 has no IPv4 fallback for it: try both loopbacks.
|
|
205
|
+
if (parsed.hostname === "localhost") {
|
|
206
|
+
const v4 = new URL(parsed.toString());
|
|
207
|
+
v4.hostname = "127.0.0.1";
|
|
208
|
+
const v6 = new URL(parsed.toString());
|
|
209
|
+
v6.hostname = "[::1]";
|
|
210
|
+
return [v4.toString(), v6.toString()];
|
|
211
|
+
}
|
|
204
212
|
return [parsed.toString()];
|
|
205
213
|
}
|
|
206
214
|
async fetchJpeg(url, target, timeout) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-3d-printer-server",
|
|
3
3
|
"mcpName": "io.github.DMontgomery40/mcp-3d-printer-server",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.22",
|
|
5
5
|
"description": "MCP server for connecting Claude with 3D printer management systems",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"repository": "https://github.com/DMontgomery40/mcp-3D-printer-server",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/DMontgomery40/mcp-3D-printer-server",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "1.2.
|
|
10
|
+
"version": "1.2.22",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "mcp-3d-printer-server",
|
|
15
|
-
"version": "1.2.
|
|
15
|
+
"version": "1.2.22",
|
|
16
16
|
"runtimeHint": "npx",
|
|
17
17
|
"transport": {
|
|
18
18
|
"type": "stdio"
|
|
@@ -223,6 +223,12 @@ export class CounterpartService {
|
|
|
223
223
|
}
|
|
224
224
|
if (!["http:", "https:"].includes(parsed.protocol)) throw new Error(`Unsupported snapshot URL scheme: ${parsed.protocol}`);
|
|
225
225
|
if (LOOPBACK.has(parsed.hostname) && !LOOPBACK.has(target.host)) parsed.hostname = target.host;
|
|
226
|
+
// "localhost" can resolve to ::1 first, and Node 18 has no IPv4 fallback for it: try both loopbacks.
|
|
227
|
+
if (parsed.hostname === "localhost") {
|
|
228
|
+
const v4 = new URL(parsed.toString()); v4.hostname = "127.0.0.1";
|
|
229
|
+
const v6 = new URL(parsed.toString()); v6.hostname = "[::1]";
|
|
230
|
+
return [v4.toString(), v6.toString()];
|
|
231
|
+
}
|
|
226
232
|
return [parsed.toString()];
|
|
227
233
|
}
|
|
228
234
|
|