KosmoKrator

cloud

Cloudflare MCP Integration for OpenAI Agents SDK

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

7 functions 6 read 1 write Bearer token auth

Connect Cloudflare 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.

Cloudflare MCP Config for OpenAI Agents SDK

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

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

Run the Gateway Manually

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

Why Use KosmoKrator Here

Scoped tools

Expose only Cloudflare 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.

Cloudflare Tools Visible to OpenAI Agents

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

MCP toolSource functionTypeDescription
integration__cloudflare__cloudflare_list_zones cloudflare.cloudflare_list_zones Read List all Cloudflare zones (domains). Returns zone IDs, names, status, and plan info. Use this to discover zone identifiers needed for DNS and analytics operations.
integration__cloudflare__cloudflare_get_zone cloudflare.cloudflare_get_zone Read Get detailed information about a specific Cloudflare zone, including its ID, name, status, nameservers, and plan.
integration__cloudflare__cloudflare_list_dns_records cloudflare.cloudflare_list_dns_records Read List DNS records for a Cloudflare zone. Returns record IDs, types, names, content, TTL, and proxy status.
integration__cloudflare__cloudflare_create_dns_record cloudflare.cloudflare_create_dns_record Write Create a new DNS record in a Cloudflare zone. Supports A, AAAA, CNAME, MX, TXT, NS, SRV, and other record types.
integration__cloudflare__cloudflare_list_page_rules cloudflare.cloudflare_list_page_rules Read List page rules for a Cloudflare zone. Returns rule IDs, targets, actions, and priority.
integration__cloudflare__cloudflare_get_analytics cloudflare.cloudflare_get_analytics Read Get analytics dashboard data for a Cloudflare zone. Returns HTTP requests, bandwidth, threats, and pageview metrics over a time range.
integration__cloudflare__cloudflare_get_current_user cloudflare.cloudflare_get_current_user Read Get details of the currently authenticated Cloudflare user. Returns user ID, email, username, and account info.

Related Cloudflare Pages