api2ai 1.0.2 → 1.0.3
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.
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import fs from 'fs/promises';
|
|
17
17
|
import path from 'path';
|
|
18
|
+
import { fileURLToPath } from 'url';
|
|
18
19
|
|
|
19
20
|
// ============================================================================
|
|
20
21
|
// OpenAPI Spec Loading & Parsing
|
|
@@ -246,9 +247,9 @@ function generatePackageJson(serverName, tools, port) {
|
|
|
246
247
|
dev: 'node --watch src/index.js',
|
|
247
248
|
},
|
|
248
249
|
dependencies: {
|
|
249
|
-
'mcp-use': '
|
|
250
|
+
'mcp-use': '1.11.2',
|
|
250
251
|
'zod': '^3.23.0',
|
|
251
|
-
'dotenv': '^
|
|
252
|
+
'dotenv': '^17.2.3',
|
|
252
253
|
},
|
|
253
254
|
engines: { node: '>=18.0.0' },
|
|
254
255
|
}, null, 2);
|
|
@@ -775,7 +776,7 @@ Then open http://localhost:${port}/inspector to test your tools!
|
|
|
775
776
|
export { generateMcpServer, extractTools, loadOpenApiSpec };
|
|
776
777
|
|
|
777
778
|
// CLI entry point
|
|
778
|
-
const isMainModule = process.argv[1]
|
|
779
|
+
const isMainModule = process.argv[1] === fileURLToPath(import.meta.url);
|
|
779
780
|
|
|
780
781
|
if (isMainModule) {
|
|
781
782
|
const args = process.argv.slice(2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api2ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Generate MCP servers from OpenAPI specs using the mcp-use framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "generate-mcp-use-server.js",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"generate": "node generate-mcp-use-server.js",
|
|
13
13
|
"example:petstore": "node generate-mcp-use-server.js https://petstore3.swagger.io/api/v3/openapi.json ./example-petstore --name petstore-api --port 3000"
|
|
14
14
|
},
|
|
15
|
-
"dependencies": {
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"js-yaml": "^4.1.0"
|
|
17
|
+
},
|
|
16
18
|
"devDependencies": {
|
|
17
19
|
"js-yaml": "^4.1.0"
|
|
18
20
|
},
|