mcp-from-openapi 2.7.0 → 2.8.0

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/esm/index.mjs CHANGED
@@ -2983,6 +2983,8 @@ function nodePinnedTransport(modules) {
2983
2983
  const requestOptions = {
2984
2984
  method: "GET",
2985
2985
  signal,
2986
+ // A pooled keep-alive socket is keyed by host:port only and would skip the pinned lookup.
2987
+ agent: false,
2986
2988
  headers: { ...headers, "accept-encoding": "identity" }
2987
2989
  };
2988
2990
  if (pinned.length > 0) {
@@ -5690,7 +5692,7 @@ function buildHttpRequest(tool, input, options = {}) {
5690
5692
  if (typeof Blob !== "undefined" && v instanceof Blob) {
5691
5693
  form.append(k, v);
5692
5694
  } else if (v instanceof Uint8Array) {
5693
- form.append(k, new Blob([v]));
5695
+ form.append(k, new Blob([new Uint8Array(v)]));
5694
5696
  } else if (isPlainObject(v) || Array.isArray(v)) {
5695
5697
  form.append(k, JSON.stringify(v));
5696
5698
  } else {
package/esm/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-from-openapi",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Production-ready library for converting OpenAPI specifications into MCP tool definitions",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "license": "Apache-2.0",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/agentfront/mcp-from-openapi#readme",
30
30
  "engines": {
31
- "node": ">=20.0.0"
31
+ "node": ">=22.19.0"
32
32
  },
33
33
  "type": "module",
34
34
  "main": "../index.js",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@apidevtools/json-schema-ref-parser": "^15.5.1",
52
+ "@apidevtools/json-schema-ref-parser": "^16.0.2",
53
53
  "openapi-types": "^12.1.3",
54
54
  "yaml": "^2.9.0"
55
55
  },
@@ -58,15 +58,15 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@modelcontextprotocol/sdk": "^1.30.0",
61
- "@swc/core": "~1.5.7",
61
+ "@swc/core": "~1.16.1",
62
62
  "@swc/helpers": "^0.5.18",
63
63
  "@swc/jest": "~0.2.38",
64
- "@types/jest": "^29.5.0",
64
+ "@types/jest": "^30.0.0",
65
65
  "@types/json-schema": "^7.0.15",
66
- "@types/node": "^24.0.0",
66
+ "@types/node": "^26.4.1",
67
67
  "ajv": "^8.17.0",
68
- "esbuild": "^0.27.2",
69
- "jest": "^29.7.0",
68
+ "esbuild": "^0.28.2",
69
+ "jest": "^30.5.1",
70
70
  "tslib": "^2.8.1",
71
71
  "typescript": "^5.0.0",
72
72
  "zod": "^4.0.0"
package/index.js CHANGED
@@ -3071,6 +3071,8 @@ function nodePinnedTransport(modules) {
3071
3071
  const requestOptions = {
3072
3072
  method: "GET",
3073
3073
  signal,
3074
+ // A pooled keep-alive socket is keyed by host:port only and would skip the pinned lookup.
3075
+ agent: false,
3074
3076
  headers: { ...headers, "accept-encoding": "identity" }
3075
3077
  };
3076
3078
  if (pinned.length > 0) {
@@ -5778,7 +5780,7 @@ function buildHttpRequest(tool, input, options = {}) {
5778
5780
  if (typeof Blob !== "undefined" && v instanceof Blob) {
5779
5781
  form.append(k, v);
5780
5782
  } else if (v instanceof Uint8Array) {
5781
- form.append(k, new Blob([v]));
5783
+ form.append(k, new Blob([new Uint8Array(v)]));
5782
5784
  } else if (isPlainObject(v) || Array.isArray(v)) {
5783
5785
  form.append(k, JSON.stringify(v));
5784
5786
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-from-openapi",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Production-ready library for converting OpenAPI specifications into MCP tool definitions",
5
5
  "author": "AgentFront <info@agentfront.dev>",
6
6
  "license": "Apache-2.0",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "homepage": "https://github.com/agentfront/mcp-from-openapi#readme",
30
30
  "engines": {
31
- "node": ">=20.0.0"
31
+ "node": ">=22.19.0"
32
32
  },
33
33
  "type": "commonjs",
34
34
  "main": "./index.js",
@@ -49,7 +49,7 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@apidevtools/json-schema-ref-parser": "^15.5.1",
52
+ "@apidevtools/json-schema-ref-parser": "^16.0.2",
53
53
  "openapi-types": "^12.1.3",
54
54
  "yaml": "^2.9.0"
55
55
  },
@@ -58,15 +58,15 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@modelcontextprotocol/sdk": "^1.30.0",
61
- "@swc/core": "~1.5.7",
61
+ "@swc/core": "~1.16.1",
62
62
  "@swc/helpers": "^0.5.18",
63
63
  "@swc/jest": "~0.2.38",
64
- "@types/jest": "^29.5.0",
64
+ "@types/jest": "^30.0.0",
65
65
  "@types/json-schema": "^7.0.15",
66
- "@types/node": "^24.0.0",
66
+ "@types/node": "^26.4.1",
67
67
  "ajv": "^8.17.0",
68
- "esbuild": "^0.27.2",
69
- "jest": "^29.7.0",
68
+ "esbuild": "^0.28.2",
69
+ "jest": "^30.5.1",
70
70
  "tslib": "^2.8.1",
71
71
  "typescript": "^5.0.0",
72
72
  "zod": "^4.0.0"
package/ssrf.d.ts CHANGED
@@ -26,7 +26,8 @@
26
26
  * guard and the socket share one DNS resolution. This closes the
27
27
  * DNS-rebinding TOCTOU where the client would otherwise re-resolve the
28
28
  * hostname at connect time and reach a different (internal) address. The
29
- * original hostname is preserved for the `Host` header and TLS SNI;
29
+ * original hostname is preserved for the `Host` header and TLS SNI, and
30
+ * every request opens a fresh socket (never a pooled keep-alive one);
30
31
  * - re-validates every redirect hop ({@link safeFetch}) instead of letting the
31
32
  * HTTP client follow 3xx blindly.
32
33
  *
@@ -154,8 +155,9 @@ export declare function makePinnedLookup(pinned: ResolvedAddress[]): (_hostname:
154
155
  /**
155
156
  * Node transport that pins the connection to the validated address(es) via a
156
157
  * custom `lookup`, preserving the original hostname for the `Host` header and
157
- * TLS SNI. Manual redirects only (no `lookup` re-resolution between hops).
158
- * Exported for tests.
158
+ * TLS SNI. Each request uses a one-off agent so a shared keep-alive pool can't
159
+ * hand it a socket connected elsewhere. Manual redirects only (no `lookup`
160
+ * re-resolution between hops). Exported for tests.
159
161
  */
160
162
  export declare function nodePinnedTransport(modules: NodeHttpModules): SsrfTransport;
161
163
  /**