Cloudflare MCP
Give AI agents governed, hands-on control of your Cloudflare edge and Workers
A Model Context Protocol integration connects autonomous AI agents to Cloudflare's API surface so they can inspect and change your edge configuration in a controlled way. Agents can read DNS, cache, WAF, and Workers state, deploy and roll back code, query analytics and logs, and manage R2, D1, and KV — all through scoped tokens and audited tool calls rather than a human clicking through the dashboard.
Publish, update, and roll back Worker scripts, routes, cron triggers, and environment bindings from natural-language intent.
Create and edit DNS records, page rules, cache policies, redirects, and WAF and rate-limiting rules with change previews.
Query traffic, cache-hit, latency, and threat analytics plus Logpush data to diagnose incidents and performance regressions.
Provision and read R2 buckets, D1 databases, and KV namespaces, and manage the bindings that wire them to Workers.
An agent watches Core Web Vitals and cache-hit analytics, identifies slow or uncached routes, and proposes cache rules or Worker fixes for a human to approve before deploy.
On a traffic anomaly, the agent reads WAF and rate-limit analytics, drafts and stages mitigation rules, and rolls them back once threat signal normalizes.
Ahead of a launch, the agent stands up redirects, geo rules, Turnstile-protected forms, and cache policies from a brief, then verifies them against staging.
Only within the scope you grant. We issue least-privilege API tokens, gate risky actions behind human approval, and keep every change previewable and reversible through versioned deploys.
Every MCP tool call maps to a Cloudflare API request logged with its token and payload, so there is a full trail of what the agent read and changed, and we mirror it into your logging stack.
We expose the surfaces your workflow needs — typically Workers, DNS, cache and WAF rules, analytics, and R2, D1, and KV — and deliberately leave billing and account-level controls out of scope.
