@jimrarras/coolify-mcp 0.1.0 → 0.1.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 CHANGED
@@ -16,9 +16,12 @@ npm install -g @jimrarras/coolify-mcp
16
16
  # dependencies — it installs on any machine with no C/C++ toolchain and runs no
17
17
  # install scripts. No flags needed.
18
18
 
19
- # Copy and fill in env
20
- cp .env.example .env
21
- $EDITOR .env
19
+ # Configure guided wizard writes ~/.coolify-mcp/config.json (recommended)
20
+ coolify-mcp init
21
+
22
+ # …or just set the two required env vars (token format: <id>|<secret>):
23
+ export COOLIFY_BASE_URL="https://coolify.example.com"
24
+ export COOLIFY_TOKEN="<id>|<secret>"
22
25
 
23
26
  # Run (API tier only)
24
27
  coolify-mcp
package/dist/cli/index.js CHANGED
@@ -240,6 +240,9 @@ var init_env_expand = __esm({
240
240
  import { readFileSync, existsSync } from "fs";
241
241
  import { homedir } from "os";
242
242
  import { join } from "path";
243
+ function isMissingConfigError(e) {
244
+ return e instanceof CoolifyError && e.message === MISSING_CONFIG_MESSAGE;
245
+ }
243
246
  function parseFlags(argv, env) {
244
247
  const f = { enableHostOps: false, allowDestructive: false, extraHeaders: {} };
245
248
  for (let i = 0; i < argv.length; i++) {
@@ -284,7 +287,7 @@ function resolveSshPaths(cfg, home) {
284
287
  }
285
288
  function fromEnvFallback(flags, env) {
286
289
  const baseUrl = env.COOLIFY_BASE_URL;
287
- if (!baseUrl) throw new CoolifyError("invalid_input", "No config file found and COOLIFY_BASE_URL is not set");
290
+ if (!baseUrl) throw new CoolifyError("invalid_input", MISSING_CONFIG_MESSAGE);
288
291
  const token = env.COOLIFY_TOKEN;
289
292
  if (!token) throw new CoolifyError("invalid_input", "COOLIFY_TOKEN is required");
290
293
  const raw = {
@@ -343,6 +346,7 @@ function loadConfig(argv, env) {
343
346
  resolveSshPaths(cfg, home);
344
347
  return cfg;
345
348
  }
349
+ var MISSING_CONFIG_MESSAGE;
346
350
  var init_load = __esm({
347
351
  "src/core/config/load.ts"() {
348
352
  "use strict";
@@ -350,6 +354,7 @@ var init_load = __esm({
350
354
  init_env_expand();
351
355
  init_schema();
352
356
  init_validate();
357
+ MISSING_CONFIG_MESSAGE = "No config file found and COOLIFY_BASE_URL is not set";
353
358
  }
354
359
  });
355
360
 
@@ -42403,7 +42408,7 @@ function isLocalhost(host) {
42403
42408
  }
42404
42409
  function buildServer(registry2, tools) {
42405
42410
  const multi = registry2.names().length > 1;
42406
- const server = new Server({ name: "coolify-mcp", version: "0.1.0" }, { capabilities: { tools: {} } });
42411
+ const server = new Server({ name: "coolify-mcp", version: "0.1.1" }, { capabilities: { tools: {} } });
42407
42412
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
42408
42413
  tools: tools.map((t) => ({
42409
42414
  name: t.name,
@@ -42528,6 +42533,20 @@ var init_server3 = __esm({
42528
42533
  });
42529
42534
 
42530
42535
  // src/cli/index.ts
42536
+ init_config();
42537
+ function configGuidance() {
42538
+ return [
42539
+ "coolify-mcp is not configured yet.",
42540
+ "",
42541
+ "Set it up in one of these ways:",
42542
+ " 1. Guided setup (recommended): coolify-mcp init",
42543
+ " 2. Environment variables: set COOLIFY_BASE_URL and COOLIFY_TOKEN (token format: <id>|<secret>)",
42544
+ " 3. Config file: ~/.coolify-mcp/config.json",
42545
+ "",
42546
+ "Then verify with: coolify-mcp doctor",
42547
+ "Docs: https://github.com/jimrarras/coolify-mcp#configuration"
42548
+ ].join("\n");
42549
+ }
42531
42550
  async function dispatch2(argv, deps) {
42532
42551
  const sub = argv[0];
42533
42552
  const rest = argv.slice(1);
@@ -42541,8 +42560,16 @@ async function dispatch2(argv, deps) {
42541
42560
  return runInit2(rest, env);
42542
42561
  }
42543
42562
  const runServer = deps?.runServer ?? (await Promise.resolve().then(() => (init_server3(), server_exports))).main;
42544
- await runServer();
42545
- return 0;
42563
+ try {
42564
+ await runServer();
42565
+ return 0;
42566
+ } catch (e) {
42567
+ if (isMissingConfigError(e)) {
42568
+ process.stderr.write(configGuidance() + "\n");
42569
+ return 1;
42570
+ }
42571
+ throw e;
42572
+ }
42546
42573
  }
42547
42574
  var isMain = process.argv[1] ? new URL(import.meta.url).pathname === new URL(`file://${process.argv[1].replace(/\\/g, "/")}`).pathname : false;
42548
42575
  if (isMain) {
@@ -42558,5 +42585,6 @@ if (isMain) {
42558
42585
  );
42559
42586
  }
42560
42587
  export {
42588
+ configGuidance,
42561
42589
  dispatch2 as dispatch
42562
42590
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimrarras/coolify-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "MCP server for self-hosted Coolify instances",
5
5
  "type": "module",
6
6
  "license": "MIT",