Skip to main content
Prerequisites Before you begin, create an account and get your API Key.

Getting started

Connect to Cloudflare to manage DNS records, deploy Workers, configure firewalls, and optimize web performance through AI agents.
  • API
  • UI
  • Open Source
1

Install the SDKs (optional)

pip install klavis
2

Create a Strata MCP Server with Cloudflare

from klavis import Klavis
from klavis.types import McpServerName

klavis_client = Klavis(api_key="YOUR_API_KEY")

# Create a Strata MCP server with Cloudflare
response = klavis_client.mcp_server.create_strata_server(
    servers=[McpServerName.CLOUDFLARE],
    user_id="user123"
)

API Reference

Full Strata API endpoints
3

Authenticate with API Key

klavis_client.mcp_server.set_strata_auth(
    strata_id=response.strata_id,
    server_name=McpServerName.CLOUDFLARE,
    auth_data={
        "api_key": "YOUR_CLOUDFLARE_API_KEY"
    }
)
🎉 Your Cloudflare MCP Server is ready! Once authentication is complete, you can use your MCP server URL with any MCP-compatible client.

Available Tools

Tool NameDescription
manage_dns_recordsCreate, update, or delete DNS records for your domains
deploy_workerDeploy a Cloudflare Worker script to the edge network
configure_firewallConfigure Cloudflare firewall rules and security settings
purge_cachePurge cached content from Cloudflare’s CDN
analytics_queryQuery analytics data for your Cloudflare-enabled domains
For more details about tool input schema, use the get_tools API.

Next Steps

I