Caddy MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Caddy MCPshow the current active config"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Caddy MCP
MCP server for safely inspecting and operating a local Caddy admin API. Built for homelab and personal-infra workflows where an AI assistant should be able to inspect active routes, validate Caddyfile snippets, and preview admin-API mutations before applying them.
Features
FastMCP stdio and SSE transports.
Safe default Caddy admin URL:
http://127.0.0.1:2019.Read-only tools for active config and reverse-proxy upstream inventory.
Caddyfile validation/adaptation helpers using the local
caddybinary.Mutating tools default to
dry_run=true.Redacted admin API errors.
Installable package layout, Dockerfile, Compose sidecar, CI, tests, and client examples.
Related MCP server: MCP Manager
Tools
Tool | Purpose | Mutates |
| Read active JSON config, optionally below | no |
| Summarize host matchers and | no |
| Validate Caddyfile text with | no |
| Convert Caddyfile text to JSON; dry-run preview by default | no |
| Replace active config with | yes, unless dry-run |
| Patch one config path with | yes, unless dry-run |
| Stop Caddy with | yes, unless dry-run |
Quick start
git clone https://github.com/euisuh/caddy-mcp.git
cd caddy-mcp
python -m venv .venv
. .venv/bin/activate
pip install -e .
CADDY_ADMIN_URL=http://127.0.0.1:2019 caddy-mcpFor SSE sidecar mode:
MCP_TRANSPORT=sse MCP_HOST=127.0.0.1 MCP_PORT=8000 caddy-mcpDocker sidecar
docker compose up --buildThe Compose file binds the MCP port to localhost and points at host Caddy's admin API via host.docker.internal:2019.
Safety model
Caddy's admin API is powerful. Keep it bound to loopback or an internal network.
This server does not expose credentials and does not persist tokens.
Mutating tools default to dry-run and return the exact method/path/value preview.
Use
load_configandpatch_configonly after validating/adapting configs.stop_caddyexists for completeness but also defaults to dry-run.
Development
pip install -e . -r requirements-dev.txt
ruff check .
pytest -q
python -m build --sdist --wheel
twine check dist/*Live smoke against a local Caddy
CADDY_ADMIN_URL=http://127.0.0.1:2019 python - <<'PY'
import asyncio
from fastmcp import Client
from caddy_mcp.server import build_server
async def main():
async with Client(build_server()) as client:
print([tool.name for tool in await client.list_tools()])
print((await client.call_tool('list_reverse_proxy_upstreams', {})).data)
asyncio.run(main())
PYLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/euisuh/caddy-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server