Cloudflare MCP server for AI agents
Manage Cloudflare zones, DNS records and cache, and list Workers scripts.
- Auth
- Access token
- Tools
- 10
- Triggers
- 0
- Category
- Infrastructure, Developer tools
Tools and triggers
Verify the API token
CLOUDFLARE_VERIFY_TOKEN
Checks that the API token is valid and active, and returns its id and expiry. Works for user tokens.read-only
List accounts
CLOUDFLARE_LIST_ACCOUNTS
Lists the Cloudflare accounts the token can access, with their ids.read-only
List zones
CLOUDFLARE_LIST_ZONES
Lists the domains (zones) the token can access, with their ids and status.read-only
Get a zone
CLOUDFLARE_GET_ZONE
Returns a zone's details: status, name servers, plan and account.read-only
List DNS records
CLOUDFLARE_LIST_DNS_RECORDS
Lists the DNS records of a zone. Filter by type, name or content.read-only
Create a DNS record
CLOUDFLARE_CREATE_DNS_RECORD
Adds a DNS record to a zone.
Update a DNS record
CLOUDFLARE_UPDATE_DNS_RECORD
Changes fields of an existing DNS record; fields left out stay unchanged. This replaces the live record.destructive
Delete a DNS record
CLOUDFLARE_DELETE_DNS_RECORD
Permanently deletes a DNS record from a zone.destructive
Purge the cache
CLOUDFLARE_PURGE_CACHE
Clears Cloudflare's cached copies of specific URLs, or of the whole zone with `purge_everything`. Give exactly one option.destructive
List Workers scripts
CLOUDFLARE_LIST_WORKERS_SCRIPTS
Lists the Workers scripts deployed in an account.read-only
Connect via MCP
Create an MCP server for Cloudflare in the dashboard, then add its URL to your client. This is the Claude Code command; the client guide has the others.
claude mcp add --transport http cloudflare \
"https://www.prompt-tm.com/mcp/<server id>?user_id=<your user>" \
--header "x-api-key: ptm_…"Connect via REST
Run a tool with one request. The response is { data, error, successful, log_id } for every tool.
curl -X POST https://www.prompt-tm.com/api/v3/tools/execute/CLOUDFLARE_VERIFY_TOKEN \
-H "x-api-key: $PROMPT_TM_KEY" -H "content-type: application/json" \
-d '{ "user_id": "alice", "arguments": {} }'