@@ -14,8 +14,6 @@ interface DeploymentSuccessResponse {
1414 deployment : {
1515 id : string ;
1616 name : string ;
17- url ?: string ; // URL is optional in the server response
18- specVersion ?: string ; // specVersion is optional in the server response
1917 createdAt ?: string ;
2018 updatedAt ?: string ;
2119 } ;
@@ -63,7 +61,7 @@ export class McpResource {
6361 * try {
6462 * const deployment = await tadata.mcp.deploy({
6563 * spec: source, // Your OpenApiSource object
66- * specBaseUrl : 'https://api.example.com', // The base URL your API will be proxied to
64+ * apiBaseUrl : 'https://api.example.com', // The base URL your API will be proxied to
6765 * name: 'MyFirstMcpDeployment' // An optional descriptive name
6866 * });
6967 * console.log(`Successfully deployed MCP: ${deployment.id} at ${deployment.url}`);
@@ -76,7 +74,7 @@ export class McpResource {
7674 * \`\`\`
7775 */
7876 async deploy ( input : McpDeployInput ) : Promise < McpDeploymentResult > {
79- this . logger . info ( 'Deploying Model Context Protocol ( MCP) server from OpenAPI spec' ) ;
77+ this . logger . info ( 'Deploying MCP server from OpenAPI spec' ) ;
8078
8179 // Type guard to check for the response structure
8280 const isDeploymentResponse = ( body : unknown ) : body is DeploymentResponse => {
@@ -96,7 +94,7 @@ export class McpResource {
9694 body : {
9795 openApiSpec : openapiSpec ,
9896 name : input . name ,
99- baseUrl : input . specBaseUrl ,
97+ baseUrl : input . apiBaseUrl ,
10098 } ,
10199 } ) ;
102100
@@ -105,10 +103,7 @@ export class McpResource {
105103
106104 return {
107105 id : deploymentData . id ,
108- // Provide a default value for specVersion if undefined
109- specVersion : deploymentData . specVersion || '1.0.0' ,
110- // Provide a default URL value (required by type) if not returned from server
111- url : deploymentData . url || `http://localhost:3000/mcp/${ deploymentData . id } ` ,
106+ updated : response . body . data . updated ,
112107 createdAt : deploymentData . createdAt ? new Date ( deploymentData . createdAt ) : new Date ( ) ,
113108 } ;
114109 }
0 commit comments