@softtor/coolify-mcp-server 1.0.0 → 1.0.2
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 +11 -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 |
|
|
@@ -103,6 +103,16 @@ coolify_list_applications { team: "staging" }
|
|
|
103
103
|
3. Create a new token with appropriate permissions
|
|
104
104
|
4. Copy the token and use it as your API key
|
|
105
105
|
|
|
106
|
+
### Important: Tokens Are Team-Scoped
|
|
107
|
+
|
|
108
|
+
**Coolify API tokens are scoped by team.** Each token only provides access to resources within the team where it was created. This means:
|
|
109
|
+
|
|
110
|
+
- A token created in the "Infocell" team can only access Infocell's applications, databases, and servers
|
|
111
|
+
- To manage resources across multiple teams, you need a separate token for each team
|
|
112
|
+
- When using multi-team configuration, make sure each `COOLIFY_TEAM_<NAME>_API_KEY` corresponds to a token created in that specific team
|
|
113
|
+
|
|
114
|
+
See the [Coolify API documentation](https://coolify.io/docs/api-reference/authorization) for more details on token scopes and permissions.
|
|
115
|
+
|
|
106
116
|
## Available Tools
|
|
107
117
|
|
|
108
118
|
### Applications (6 tools)
|
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({
|