Skip to main content

MCP server for Caddy web server management — routes, upstreams, certificates, reload

Project description

mcp-caddy

MCP server for Caddy web server management. Exposes 7 tools for inspecting routes, upstream health, certificates, and reloading configuration via the Caddy admin API.

Quick Start

With uvx (recommended):

CADDY_HOST=http://10.0.0.31:2019 uvx mcp-caddy

With Docker:

docker run -i \
  -e CADDY_HOST=http://10.0.0.31:2019 \
  ghcr.io/aaronckj/mcp-caddy:latest

Add to Claude Code:

claude mcp add caddy -s user -e CADDY_HOST=http://10.0.0.31:2019 -- uvx mcp-caddy

Configuration

Variable Required Default Description
CADDY_HOST No http://localhost:2019 Caddy admin API URL
CADDY_TIMEOUT No 30 HTTP timeout in seconds

Finding Your CADDY_HOST

The Caddy admin API binds to localhost:2019 by default. Depending on your setup:

  1. MCP server on same host as Caddy → use the default http://localhost:2019
  2. Caddy in Docker, MCP server on the same Docker host → add ports: ["127.0.0.1:2019:2019"] to your Caddy compose service, then use http://localhost:2019
  3. Remote Caddy host → SSH tunnel: ssh -L 2019:localhost:2019 user@caddy-host, then use http://localhost:2019
  4. Caddy exposes admin via reverse proxy → set CADDY_HOST=https://caddy-admin.example.com

The Caddy admin API has no authentication by default. If you expose it beyond localhost, add Caddy basic auth to that route.

Tools

Tool Description
server_info Caddy version and loaded modules
get_config Full configuration as JSON
list_routes All virtual hosts with upstream targets
list_upstreams Upstream proxy health status
get_certificates TLS automation policies and ACME issuers
adapt_config Convert a Caddyfile snippet to JSON
reload Reload config from a JSON string or file path

Development

git clone https://github.com/aaronckj/mcp-caddy
cd mcp-caddy
uv sync --extra dev
uv run pytest -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_caddy-0.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_caddy-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_caddy-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_caddy-0.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcp_caddy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f01306db1235555853d56aa27bb55abd1390673db427bf672ad08c064835a62a
MD5 3354f729357d532a3fc19b994accc5ad
BLAKE2b-256 0a23fa41acd9002f0fc417d1db949314a9aacb1ecc93082741fafbb01cb38634

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_caddy-0.1.0.tar.gz:

Publisher: publish.yml on aaronckj/mcp-caddy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_caddy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_caddy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcp_caddy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f16c44c1843e31f953b948546d20e6aa64c2ad4249020879cabf20dcc7e4e18
MD5 6786b7459ed4d77c26a6c6541aa26010
BLAKE2b-256 e64ce2494980e314f428ff8b0f02b1ba4b48f31e44f461a792aa84b306b74229

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_caddy-0.1.0-py3-none-any.whl:

Publisher: publish.yml on aaronckj/mcp-caddy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page