caddy_config_get
Read config at any JSON path (or the full config).
How to use it
caddy_config_get is exposed by the Caddy MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the caddy_config_get tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
FULL CADDY MCP LISTINGOther tools in Caddy MCP (17)
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), yaml (caddy-yaml). Great for previewing or porting from existing configs.
Add a route with full match/handle control (any Caddy handler).
Get/set/delete config by @id tag — much easier than navigating deep paths. The delete action requires confirm=true.
Delete config at a path. Requires confirm=true (deleting a parent path also removes every descendant).
Write config at a path. Modes: overwrite (PATCH, default, idempotent), append (POST), insert (PUT, for array positions).
Human-readable route summary. Defensive: never crashes on weird config.
List all HTTP servers with names, addresses, route counts, and TLS status.
Replace the entire config atomically. 60-second timeout for cert provisioning. Auto-snapshots the prior config.
Prometheus metrics (request counts, durations, connections, TLS handshakes). Optional filter (substring match on metric name, keeps # HELP / # TYPE lines for retained metrics) and maxlines (default 500) keep responses compact on busy servers.
CA info and certificate chains (default CA: local).
Remove a route by @id (preferred) or by index. Requires confirm=true.
Add a reverse proxy in one call: from='api.local' to=['localhost:3000']. Pass an optional id for idempotent writes — repeat calls replace the route in place instead of duplicating.
Manage config snapshots for rollback. Actions: list, save, apply (confirm-gated). In-memory, last 10.
Connectivity check + config summary (server count, routes, TLS mode).
Graceful shutdown. Requires confirm=true to prevent accidents.
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, ondemand, additional policies). Refuses with a shape-specific error if t
Reverse proxy backend health.