KosmoKrator

productivity

Caddy MCP Integration for OpenAI Agents SDK

Connect Caddy to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 5 read 2 write Bearer token auth

Connect Caddy to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

Caddy MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-caddy": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=caddy",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=caddy --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Caddy instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Caddy Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the Caddy integration catalog.

MCP toolSource functionTypeDescription
integration__caddy__caddy_list_sites caddy.caddy_list_sites Read List all Caddy sites. Returns site IDs, domain names, status, and configuration details.
integration__caddy__caddy_get_site caddy.caddy_get_site Read Get detailed information about a specific Caddy site, including its configuration, domain, and status.
integration__caddy__caddy_create_site caddy.caddy_create_site Write Create a new site in Caddy. Specify the domain name and optional configuration parameters.
integration__caddy__caddy_delete_site caddy.caddy_delete_site Write Delete a site from Caddy. This action is irreversible and will remove the site and its configuration.
integration__caddy__caddy_list_certificates caddy.caddy_list_certificates Read List all TLS certificates managed by Caddy. Returns certificate IDs, domains, expiry dates, and status.
integration__caddy__caddy_get_certificate caddy.caddy_get_certificate Read Get detailed information about a specific TLS certificate, including domain, issuer, validity, and SANs.
integration__caddy__caddy_get_current_user caddy.caddy_get_current_user Read Get details of the currently authenticated Caddy user. Returns user ID, email, username, and account info.

Related Caddy Pages