Skip to main content
MCP server CX Codex

Caddy MCP Server — Claude Code MCP server: what it does

Controls Caddy web servers through the admin API: config, routes, TLS, metrics and snapshots directly from your AI assistant.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add caddy-mcp -- npx -y @yawlabs/caddy-mcp
Open on GitHub

What Caddy MCP Server does

The server exposes 18 tools and 4 resources for the full Caddy admin endpoint set: config, routes, reverse proxies, TLS, PKI, metrics and snapshots. Concurrent edits use ETag validation (If-Match) to prevent silent overwrites. The caddy_config_set tool defaults to overwrite mode, not append — calling it twice won't duplicate routes. Config parsing is hardened against crashes even when the structure is malformed.

Caddy runs the admin API on localhost:2019 out of the box. For Docker or remote instances, set CADDY_ADMIN_URL. Without a running Caddy on that port or an address in the environment variable, tools will fail with a connection error. The optional CADDY_API_TOKEN is sent as Authorization: Bearer — only needed if an authenticating proxy sits in front of the admin endpoint.

What it helps with

  • configure reverse proxies from the assistant chat
  • retrieve current routes and TLS settings
  • load a full config snapshot
  • check Prometheus metrics from the web server
  • manage PKI certificates

Example prompts for the agent

  • Proxy api.local to localhost:3000
  • List routes on server srv0
  • Show Prometheus metrics

How to install Caddy MCP Server

Platform CLI

claude mcp add caddy-mcp -- npx -y @yawlabs/caddy-mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Caddy MCP Server

How to install Caddy MCP Server in Claude Code?

Run claude mcp add caddy-mcp -- npx -y @yawlabs/caddy-mcp, then restart Claude Code and approve the server connection when prompted.

What does Caddy MCP Server do?

It provides tools to manage Caddy web servers through the admin API: edit config, routes, TLS and PKI settings, read metrics, and work with snapshots. Everything is accessible from your AI assistant chat.

What is CADDY_ADMIN_URL for?

It specifies the Caddy admin API address. The default is http://localhost:2019. If Caddy runs in Docker or on a remote host, set the corresponding address — for example, http://caddy:2019 inside a Docker network.

Similar MCP servers

All MCP servers for DevOps and infrastructure →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor