api2ai 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/README.md +0 -0
- package/bun.lock +0 -0
- package/example-petstore/.env.example +0 -0
- package/example-petstore/README.md +0 -0
- package/example-petstore/bun.lock +0 -0
- package/example-petstore/package.json +0 -0
- package/example-petstore/src/http-client.js +0 -0
- package/example-petstore/src/index.js +0 -0
- package/example-petstore/src/tools-config.js +0 -0
- package/example.js +0 -0
- package/generate-mcp-use-server.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
File without changes
|
package/bun.lock
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/example.js
CHANGED
|
File without changes
|
|
@@ -775,7 +775,7 @@ Then open http://localhost:${port}/inspector to test your tools!
|
|
|
775
775
|
export { generateMcpServer, extractTools, loadOpenApiSpec };
|
|
776
776
|
|
|
777
777
|
// CLI entry point
|
|
778
|
-
const isMainModule = process.argv[1]?.includes('
|
|
778
|
+
const isMainModule = process.argv[1]?.includes('api2ai');
|
|
779
779
|
|
|
780
780
|
if (isMainModule) {
|
|
781
781
|
const args = process.argv.slice(2);
|
|
@@ -785,7 +785,7 @@ if (isMainModule) {
|
|
|
785
785
|
OpenAPI to MCP Server Generator (mcp-use framework)
|
|
786
786
|
|
|
787
787
|
Usage:
|
|
788
|
-
|
|
788
|
+
npx api2ai <openapi-spec> [output-folder] [options]
|
|
789
789
|
|
|
790
790
|
Arguments:
|
|
791
791
|
openapi-spec Path to local file or URL to remote OpenAPI spec
|
|
@@ -798,8 +798,8 @@ Options:
|
|
|
798
798
|
--help, -h Show this help message
|
|
799
799
|
|
|
800
800
|
Examples:
|
|
801
|
-
|
|
802
|
-
|
|
801
|
+
npx api2ai ./petstore.json ./my-server
|
|
802
|
+
npx api2ai https://petstore3.swagger.io/api/v3/openapi.json ./petstore-mcp \\
|
|
803
803
|
--name petstore-api --port 8080
|
|
804
804
|
`);
|
|
805
805
|
process.exit(0);
|