@yawlabs/caddy-mcp 1.2.0 → 1.2.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 CHANGED
@@ -81,6 +81,7 @@ That's it. Now ask your AI assistant:
81
81
  | `CADDY_ADMIN_URL` | `http://localhost:2019` | Caddy admin API URL. Set to `http://caddy:2019` inside Docker, or an https URL for remote admin. |
82
82
  | `CADDY_API_TOKEN` | (none) | Optional Bearer token for authenticated admin endpoints. Only needed if you've configured Caddy with auth. |
83
83
  | `CADDY_MAX_RETRIES` | `2` | Number of retries on transient failures (5xx, network errors). 4xx and 412 never retry. Hard-capped at 5. Set to `0` to disable. |
84
+ | `CADDY_LOAD_TIMEOUT` | `60000` | Timeout in ms for the `/load` endpoint; raise for ACME-heavy bring-ups where provisioning many certificates can exceed the default. Non-numeric, `<= 0`, or fractional values below 1ms fall back to the default. |
84
85
 
85
86
  **Alternate MCP clients:**
86
87
 
@@ -115,7 +116,7 @@ Use the same JSON block shown above in any of these.
115
116
  ### TLS & config conversion (2)
116
117
 
117
118
  - **caddy_tls** — Check or set TLS settings: ACME email, ACME CA URL. PATCH first; on a fresh install, POSTs a minimal config. On an existing config it deep-merges into the issuer path and PUTs the result back, preserving siblings (custom certs, `on_demand`, additional policies). Refuses with a shape-specific error if the existing structure is unexpected — never clobbers.
118
- - **caddy_adapt** — Convert a Caddyfile (or nginx config) to Caddy JSON without applying it. Great for previewing.
119
+ - **caddy_adapt** — Convert a config in any registered adapter format to Caddy JSON without applying it. `caddyfile` (built-in, default) plus any adapter module compiled into your Caddy binary — e.g., `nginx` ([caddy-nginx-adapter](https://github.com/caddyserver/nginx-adapter)), `yaml` ([caddy-yaml](https://github.com/abiosoft/caddy-yaml)). Great for previewing or porting from existing configs.
119
120
 
120
121
  ### Server operations (6)
121
122
 
package/dist/index.js CHANGED
@@ -330,10 +330,12 @@ function formatWarning(w) {
330
330
  function registerAdaptTools(server) {
331
331
  server.tool(
332
332
  "caddy_adapt",
333
- "Convert a Caddyfile or other config format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces. Returns the adapted JSON and any warnings separately.",
333
+ "Convert a config in any registered adapter format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces, or for porting from nginx/yaml configs when Caddy is built with the matching adapter module ('caddyfile' is built-in; 'nginx', 'yaml', etc. require their adapter modules to be compiled into the Caddy binary). Returns the adapted JSON and any warnings separately.",
334
334
  {
335
- config: z.string().describe("The raw config text (e.g., Caddyfile contents)"),
336
- adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe("Config format adapter (default: 'caddyfile')")
335
+ config: z.string().describe("The raw config text (e.g., Caddyfile contents, nginx.conf, yaml)"),
336
+ adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe(
337
+ "Config format adapter. Must match an adapter Caddy was built with. Built-in: 'caddyfile' (default). Common external adapters: 'nginx' (caddy-nginx-adapter), 'yaml' (caddy-yaml)."
338
+ )
337
339
  },
338
340
  { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
339
341
  async ({ config, adapter }) => {
package/dist/server.js CHANGED
@@ -328,10 +328,12 @@ function formatWarning(w) {
328
328
  function registerAdaptTools(server) {
329
329
  server.tool(
330
330
  "caddy_adapt",
331
- "Convert a Caddyfile or other config format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces. Returns the adapted JSON and any warnings separately.",
331
+ "Convert a config in any registered adapter format to Caddy JSON without loading it. Useful for previewing what a Caddyfile produces, or for porting from nginx/yaml configs when Caddy is built with the matching adapter module ('caddyfile' is built-in; 'nginx', 'yaml', etc. require their adapter modules to be compiled into the Caddy binary). Returns the adapted JSON and any warnings separately.",
332
332
  {
333
- config: z.string().describe("The raw config text (e.g., Caddyfile contents)"),
334
- adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe("Config format adapter (default: 'caddyfile')")
333
+ config: z.string().describe("The raw config text (e.g., Caddyfile contents, nginx.conf, yaml)"),
334
+ adapter: z.string().regex(/^[a-z0-9_-]+$/i, "Adapter must be alphanumeric, hyphens, or underscores").max(64).optional().default("caddyfile").describe(
335
+ "Config format adapter. Must match an adapter Caddy was built with. Built-in: 'caddyfile' (default). Common external adapters: 'nginx' (caddy-nginx-adapter), 'yaml' (caddy-yaml)."
336
+ )
335
337
  },
336
338
  { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
337
339
  async ({ config, adapter }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/caddy-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "MCP server for managing Caddy web servers via the admin API",
5
5
  "license": "MIT",
6
6
  "author": "Yaw Labs <contact@yaw.sh> (https://yaw.sh)",
@@ -39,10 +39,11 @@
39
39
  "zod": "^4.3.6"
40
40
  },
41
41
  "overrides": {
42
- "hono": "^4.12.14",
42
+ "hono": "^4.12.18",
43
43
  "@hono/node-server": "^1.19.13",
44
44
  "postcss": "^8.5.10",
45
- "ip-address": "^10.1.1"
45
+ "ip-address": "^10.1.1",
46
+ "fast-uri": "^3.1.2"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@biomejs/biome": "^2.4.11",