@@ -14,8 +14,6 @@ interface DeploymentSuccessResponse {
14
14
deployment : {
15
15
id : string ;
16
16
name : string ;
17
- url ?: string ; // URL is optional in the server response
18
- specVersion ?: string ; // specVersion is optional in the server response
19
17
createdAt ?: string ;
20
18
updatedAt ?: string ;
21
19
} ;
@@ -63,7 +61,7 @@ export class McpResource {
63
61
* try {
64
62
* const deployment = await tadata.mcp.deploy({
65
63
* 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
67
65
* name: 'MyFirstMcpDeployment' // An optional descriptive name
68
66
* });
69
67
* console.log(`Successfully deployed MCP: ${deployment.id} at ${deployment.url}`);
@@ -76,7 +74,7 @@ export class McpResource {
76
74
* \`\`\`
77
75
*/
78
76
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' ) ;
80
78
81
79
// Type guard to check for the response structure
82
80
const isDeploymentResponse = ( body : unknown ) : body is DeploymentResponse => {
@@ -96,7 +94,7 @@ export class McpResource {
96
94
body : {
97
95
openApiSpec : openapiSpec ,
98
96
name : input . name ,
99
- baseUrl : input . specBaseUrl ,
97
+ baseUrl : input . apiBaseUrl ,
100
98
} ,
101
99
} ) ;
102
100
@@ -105,10 +103,7 @@ export class McpResource {
105
103
106
104
return {
107
105
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 ,
112
107
createdAt : deploymentData . createdAt ? new Date ( deploymentData . createdAt ) : new Date ( ) ,
113
108
} ;
114
109
}
0 commit comments