cloud
Cloudflare MCP, CLI, and Lua Integration for AI Agents
Cloudflare integration docs for AI agents: MCP gateway setup, Cloudflare CLI commands, Lua API reference, credentials, and function schemas.
7 functions 6 read 1 write Bearer token auth
Cloudflare for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
cloudflare- route_slug
cloudflare- package
cloudflare- auth_strategy
bearer_tokenBearer token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Cloudflare CLIHeadless setup and direct function calls. Cloudflare MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Cloudflare MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Cloudflare.
Claude Code Cloudflare MCP setup for Claude Code. Cursor Cloudflare MCP setup for Cursor. Codex Cloudflare MCP setup for Codex. OpenAI Agents Cloudflare MCP setup for OpenAI Agents SDK. Claude Agent SDK Cloudflare MCP setup for Claude Agent SDK. Vercel AI SDK Cloudflare MCP setup for Vercel AI SDK. LangChain Cloudflare MCP setup for LangChain. LangGraph Cloudflare MCP setup for LangGraph. CrewAI Cloudflare MCP setup for CrewAI. MCP clients Cloudflare MCP setup for Generic MCP Clients.
Cloudflare CLI Matrix
Use these pages for direct Cloudflare CLI workflows in scripts, CI, cron, and agent wrappers.
CI Cloudflare CLI for CI. Cron Jobs Cloudflare CLI for cron jobs. Shell Scripts Cloudflare CLI for shell scripts. Headless Automation Cloudflare CLI for headless automation. Coding Agents Cloudflare CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
cloudflare.cloudflare_list_zones | Read read | 4 | 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. |
cloudflare.cloudflare_get_zone | Read read | 1 | Get detailed information about a specific Cloudflare zone, including its ID, name, status, nameservers, and plan. |
cloudflare.cloudflare_list_dns_records | Read read | 6 | List DNS records for a Cloudflare zone. Returns record IDs, types, names, content, TTL, and proxy status. |
cloudflare.cloudflare_create_dns_record | Write write | 6 | Create a new DNS record in a Cloudflare zone. Supports A, AAAA, CNAME, MX, TXT, NS, SRV, and other record types. |
cloudflare.cloudflare_list_page_rules | Read read | 4 | List page rules for a Cloudflare zone. Returns rule IDs, targets, actions, and priority. |
cloudflare.cloudflare_get_analytics | Read read | 4 | Get analytics dashboard data for a Cloudflare zone. Returns HTTP requests, bandwidth, threats, and pageview metrics over a time range. |
cloudflare.cloudflare_get_current_user | Read read | 0 | Get details of the currently authenticated Cloudflare user. Returns user ID, email, username, and account info. |