@aibuilders/mcp-coach-server 1.0.3 → 1.0.4
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/dist/index.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -93,7 +93,7 @@ async function getCachedDeploymentGuide() {
|
|
|
93
93
|
}
|
|
94
94
|
const server = new Server({
|
|
95
95
|
name: "ai-builder-mcp",
|
|
96
|
-
version: "1.0.
|
|
96
|
+
version: "1.0.4",
|
|
97
97
|
}, {
|
|
98
98
|
capabilities: {
|
|
99
99
|
tools: {},
|
|
@@ -104,20 +104,22 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
104
104
|
try {
|
|
105
105
|
switch (name) {
|
|
106
106
|
case "get_api_specification": {
|
|
107
|
-
const response = await fetch("https://space.ai-builders.com/
|
|
107
|
+
const response = await fetch("https://space.ai-builders.com/backend/openapi.json");
|
|
108
108
|
if (!response.ok) {
|
|
109
109
|
throw new Error(`Failed to fetch OpenAPI specification: HTTP ${response.status}`);
|
|
110
110
|
}
|
|
111
111
|
const openapiSpec = await response.json();
|
|
112
|
-
let baseUrl = "https://space.ai-builders.com/
|
|
112
|
+
let baseUrl = "https://space.ai-builders.com/backend";
|
|
113
113
|
try {
|
|
114
114
|
if (openapiSpec?.servers?.length) {
|
|
115
115
|
const url = openapiSpec.servers[0].url;
|
|
116
116
|
if (url.startsWith("http")) {
|
|
117
117
|
baseUrl = url;
|
|
118
118
|
}
|
|
119
|
-
else {
|
|
120
|
-
|
|
119
|
+
else if (url.startsWith("/")) {
|
|
120
|
+
// Relative path: use the backend base URL directly
|
|
121
|
+
// Don't append the servers path, use the base URL as-is
|
|
122
|
+
baseUrl = "https://space.ai-builders.com/backend";
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
125
|
}
|