Skip to content
MCP server

Caddy MCP Server

Control a Caddy web server through its admin API: config, routes, TLS, PKI and metrics

Runs locallyStatus and history
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
2.6.3
Listing updated
2 days ago

About Caddy MCP Server

Caddy MCP Server is an open-source MCP server for cloud and infrastructure. It runs locally on your machine and is started by your AI client.

Caddy's JSON config can be deeply nested, and this server lets an agent change it by describing intent, such as "Proxy api.local to localhost:3000". Eighteen tools and four resources cover every endpoint in Caddy's admin API reference (load, config paths, @id lookup, adapt, PKI CA, reverse proxy upstreams, metrics). Go runtime debug endpoints are deliberately left out.

Safety is a theme. Writes use ETags with If-Match, so a 412 is reported clearly. caddy_config_set defaults to idempotent overwrite, so repeating a call does not duplicate a route. Writing to the config root, which replaces everything, is refused without confirm=true and snapshots first, like caddy_load. caddy_list_routes copes with malformed config, and error messages show only the origin of the admin URL so tokens in a path do not leak. Metrics can be filtered by name with a line cap.

It runs locally via npx -y @yawlabs/caddy-mcp@latest. Caddy's admin API listens on localhost:2019 by default; CADDY_ADMIN_URL, an optional bearer token, retry and timeout settings and a snapshot directory are configurable. MIT licensed, from Yaw Labs.

Install

Run in a terminal

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

Add to claude_desktop_config.json

{
  "mcpServers": {
    "caddy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/caddy-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "caddy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/caddy-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "caddy-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/caddy-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "caddy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/caddy-mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "caddy-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yawlabs/caddy-mcp"
      ]
    }
  }
}

Tools this server provides (4)

Taken from the project documentation; the running server may differ.

caddy_load
Load a full config, snapshotted first
caddy_config_set
Write config at a path, idempotent overwrite by default
caddy_list_routes
Summarise routes on a server
caddy_metrics
Return Prometheus metrics, optionally filtered

What it does

Full admin API coverage
Every documented endpoint is wrapped, with no placeholder tools.
Idempotent route writes
Passing an id replaces a route instead of duplicating it.
Rollback snapshots
Full configs are saved in memory or to a chosen directory.
Caddyfile conversion
Adapts a config to JSON for review without applying it.
Filtered metrics
Prometheus output can be narrowed by name and line count.
Credential-safe errors
Connection failures show only the URL origin.

Good for

  • Add a reverse proxy by describing it in plain words
  • Review which routes exist on a server
  • Convert a Caddyfile to JSON before applying
  • Ask which route is slowest from Prometheus metrics

Pricing

Open source

Free, MIT licensed.

Prices change. Check yaw.sh before you buy.

Caddy MCP Server FAQ

Is the admin API enabled by default?

Yes, on localhost:2019; point CADDY_ADMIN_URL elsewhere for Docker or remote hosts.

Can it replace my whole config by accident?

A root write needs confirm=true and is snapshotted first.

Does it need a token?

Only if you configured Caddy admin auth, via CADDY_API_TOKEN.

What licence?

MIT.

Is Caddy MCP Server free?

Yes. Caddy MCP Server is open source, so you can use and self-host it for free.

How do I add Caddy MCP Server to Claude Code?

Run this command in your terminal: claude mcp add caddy-mcp -- npx -y @yawlabs/caddy-mcp

What are the best alternatives to Caddy MCP Server?

The closest alternatives to Caddy MCP Server are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Caddy MCP Server

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools