@aibuilders/mcp-coach-server 1.0.3 → 1.0.5
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 +47 -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.5",
|
|
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
|
}
|
|
@@ -175,6 +177,46 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
175
177
|
"Explain to the user what you've done and why it's secure"
|
|
176
178
|
]
|
|
177
179
|
}
|
|
180
|
+
},
|
|
181
|
+
deployment_api_info: {
|
|
182
|
+
note: "The deployment API supports environment variable injection via the env_vars field",
|
|
183
|
+
key_features: [
|
|
184
|
+
"Optional env_vars field in DeploymentCreateRequest (up to 20 variables)",
|
|
185
|
+
"Stateless design: environment variables are NOT stored in the platform database",
|
|
186
|
+
"Variables are passed directly to Koyeb during deployment",
|
|
187
|
+
"AI_BUILDER_TOKEN is automatically injected (no need to include it in env_vars)"
|
|
188
|
+
],
|
|
189
|
+
ai_assistant_guidance: {
|
|
190
|
+
when_helping_deploy: "When helping users deploy services, you should:",
|
|
191
|
+
steps: [
|
|
192
|
+
"1. Check if a deploy-config.json file exists in the project",
|
|
193
|
+
"2. If not, help create one with deployment parameters (repo_url, service_name, branch, port) and environment variables",
|
|
194
|
+
"3. Remind users not to commit sensitive values (passwords, API keys) to Git repositories",
|
|
195
|
+
"4. When user says 'deploy', read from deploy-config.json and include env_vars in the API request",
|
|
196
|
+
"5. Guide users to maintain their configuration for future deployments"
|
|
197
|
+
],
|
|
198
|
+
example_deploy_config: {
|
|
199
|
+
description: "Example deploy-config.json structure",
|
|
200
|
+
content: {
|
|
201
|
+
repo_url: "https://github.com/user/my-app",
|
|
202
|
+
service_name: "my-app",
|
|
203
|
+
branch: "main",
|
|
204
|
+
port: 8000,
|
|
205
|
+
env_vars: {
|
|
206
|
+
DATABASE_URL: "postgresql://user:pass@host:5432/db",
|
|
207
|
+
NODE_ENV: "production",
|
|
208
|
+
LOG_LEVEL: "info"
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
best_practices: [
|
|
213
|
+
"Maintain environment variables in version-controlled config files (deploy-config.json)",
|
|
214
|
+
"Use .env files for sensitive values during development (add to .gitignore)",
|
|
215
|
+
"Never include AI_BUILDER_TOKEN in env_vars (it's automatically injected)",
|
|
216
|
+
"Create deployment scripts that read from config files",
|
|
217
|
+
"Help users understand the stateless nature of env_vars"
|
|
218
|
+
]
|
|
219
|
+
}
|
|
178
220
|
}
|
|
179
221
|
}, null, 2)
|
|
180
222
|
}
|