All integrations
Cloudflare
DNS, zones, Workers, R2 and Cloudflare's product documentation.
Cloud and infrastructure
Docs and knowledge
How an agent reaches it
- MCP
Official MCP server. The agent lists its tools and calls them.
- REST API
Always available. The agent calls the API directly with your credential attached.
- CLI
The `wrangler` command, run on one of your computers with the credential mounted.
How you authenticate
- API key
- No credential needed
- Create a scoped API TOKEN (not the legacy Global API Key) with only the permissions you need.
- The documentation MCP server needs no credential at all.
How agents reach it
- Base URL
- https://api.cloudflare.com/client/v4
- Pagination
- page
- MCP server
- https://docs.mcp.cloudflare.com/mcp
- CLI
- wrangler
Common endpoints
| verify the token | GET /user/tokens/verify |
| list zones | GET /zones |
| list DNS records | GET /zones/{zone_id}/dns_records |
| create a DNS record | POST /zones/{zone_id}/dns_records |
| purge cache | POST /zones/{zone_id}/purge_cache |
Worth knowing
- Every response is wrapped in {success, errors, messages, result}. A 200 with success:false is a failure.
- The legacy Global API Key uses X-Auth-Email plus X-Auth-Key instead of a bearer token. Prefer scoped tokens.
- Zone ids, not domain names, appear in paths.