Skip to main content
Manage DNS records and view nameservers via the Cloudflare API

Capabilities

Once connected, your agent can manage DNS records for domains hosted on Cloudflare.
  • List zones (domains) in your Cloudflare account
  • View authoritative nameservers for a zone
  • List DNS records for a zone
  • Create DNS records (A/AAAA/CNAME/TXT/MX/NS)
  • Update existing DNS records
  • Delete DNS records

Setup Guide

Follow these steps to connect Cloudflare to your instances.

1. Create a Cloudflare account

Go to dash.cloudflare.com and create an account.

2. Create an API Token

Go to API Tokens and click “Create Token”. Recommended permissions:
  • Zone:Read — list zones and view nameservers
  • DNS:Edit — create/update/delete DNS records

3. Store the token in Environment

Go to Environment and create this variable:
  • Name: CLOUDFLARE_API_TOKEN Value: Your Cloudflare API token (keep this secret!)

4. Grant access to instances

Choose how instances should access the token (global or instance-specific).
Important: Your registrar nameservers cannot be changed via Cloudflare API. Cloudflare gives you the nameservers for each zone; you must update them in your domain registrar.

Usage Examples

Ask your agent to manage DNS using natural language. List your zones
“List all my Cloudflare zones”
Get nameservers
“Show me the Cloudflare nameservers for example.com”
Create a DNS record
“Add an A record for api.example.com pointing to 203.0.113.10 (DNS-only)”
Delete a DNS record
“Delete the TXT record _acme-challenge.example.com”