@softtor/coolify-mcp-server 1.0.0 → 1.0.1
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 +1 -1
- package/dist/config.js +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Then configure in your MCP settings:
|
|
|
61
61
|
|
|
62
62
|
| Variable | Required | Description |
|
|
63
63
|
|----------|----------|-------------|
|
|
64
|
-
| `COOLIFY_BASE_URL` |
|
|
64
|
+
| `COOLIFY_BASE_URL` | **Yes** | Your Coolify instance URL (e.g., `https://coolify.example.com`) |
|
|
65
65
|
| `COOLIFY_API_KEY` | No* | Default API key |
|
|
66
66
|
| `COOLIFY_DEFAULT_TEAM` | No | Default team name (default: `default`) |
|
|
67
67
|
| `COOLIFY_TEAM_<NAME>_API_KEY` | No* | Team-specific API key |
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
const ConfigSchema = z.object({
|
|
3
|
-
baseUrl: z.string().url(),
|
|
3
|
+
baseUrl: z.string().url("COOLIFY_BASE_URL must be a valid URL"),
|
|
4
4
|
defaultTeam: z.string().min(1),
|
|
5
5
|
});
|
|
6
6
|
function loadTeams() {
|
|
@@ -26,7 +26,10 @@ export function getConfig() {
|
|
|
26
26
|
if (teams.size === 0) {
|
|
27
27
|
throw new Error("No API keys configured. Set COOLIFY_API_KEY or COOLIFY_TEAM_<NAME>_API_KEY environment variables.");
|
|
28
28
|
}
|
|
29
|
-
const baseUrl = process.env.COOLIFY_BASE_URL
|
|
29
|
+
const baseUrl = process.env.COOLIFY_BASE_URL;
|
|
30
|
+
if (!baseUrl) {
|
|
31
|
+
throw new Error("COOLIFY_BASE_URL is required. Set it to your Coolify instance URL (e.g., https://coolify.example.com).");
|
|
32
|
+
}
|
|
30
33
|
const envDefaultTeam = process.env.COOLIFY_DEFAULT_TEAM || "default";
|
|
31
34
|
const defaultTeam = teams.has(envDefaultTeam) ? envDefaultTeam : teams.keys().next().value;
|
|
32
35
|
const validatedConfig = ConfigSchema.parse({
|