INFRASTRUCTURE · MCP

Cloudflare MCP

Give AI agents governed, hands-on control of your Cloudflare edge and Workers

Overview

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.

What agents can do
01
Deploy and manage Workers

Publish, update, and roll back Worker scripts, routes, cron triggers, and environment bindings from natural-language intent.

02
Configure DNS and edge rules

Create and edit DNS records, page rules, cache policies, redirects, and WAF and rate-limiting rules with change previews.

03
Read analytics and security signal

Query traffic, cache-hit, latency, and threat analytics plus Logpush data to diagnose incidents and performance regressions.

04
Operate edge data stores

Provision and read R2 buckets, D1 databases, and KV namespaces, and manage the bindings that wire them to Workers.

Agentic workflows we build
Autonomous performance triage

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.

Incident-response copilot

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.

Campaign infrastructure prep

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.

INTEGRATIONBuilding with CloudflareSee the integration →THE PRACTICEHeadless Web & AI DevelopmentExplore the service →
FAQ
Can agents make destructive changes to production?

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.

How do you keep agent actions auditable?

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.

Which Cloudflare surfaces can the agent reach?

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.

More infrastructure