Cloudflare MCP Server
This server provides a comprehensive Model Context Protocol (MCP) interface for programmatic management of Cloudflare services through AI agents, offering 13 tools across zones, DNS, caching, Workers KV storage, and analytics.
Zone Management: List all zones with filtering by name, status, and pagination, or retrieve detailed information about specific zones including nameservers and configuration.
DNS Management: Full CRUD operations for DNS records (A, AAAA, CNAME, TXT, MX, etc.) with support for Cloudflare proxy settings, TTL configuration, and priority settings.
Workers KV Storage: Manage key-value storage with operations to list namespaces, read/write/delete key-value pairs with optional metadata and TTL expiration, and list keys with prefix filtering and pagination.
Cache Management: Purge Cloudflare cache for entire zones or selectively by specific files, cache tags, or hosts.
Analytics: Retrieve zone performance metrics including requests, bandwidth, threats, and pageviews with customizable time ranges (ISO 8601 or relative formats).
Agent-to-Agent Integration: Supports A2A protocol for seamless communication between AI agents, enabling multi-agent workflows and distributed operations through a standardized Cloudflare API interface with proper authentication and permission management.
Provides comprehensive management of Cloudflare resources including zones, DNS records, Workers KV storage, cache purging, and analytics through the Cloudflare API
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cloudflare MCP Serverlist DNS records for example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cloudflare MCP Server
A Model Context Protocol (MCP) server that provides seamless integration with the Cloudflare API. Built with Python and managed with uv for blazing-fast dependency management.
Features
š Zone Management
List all zones in your account
Get detailed zone information
Filter zones by name and status
š§ DNS Management
List DNS records with filtering
Create new DNS records (A, AAAA, CNAME, TXT, MX, etc.)
Update existing records
Delete records
Full support for proxied records and TTL configuration
š¾ Workers KV Storage
List KV namespaces
Read values from KV
Write key-value pairs with optional TTL
Delete keys
List keys with prefix filtering
Support for metadata
ā” Cache & Performance
Purge cache (entire zone or specific files/tags/hosts)
Get zone analytics (requests, bandwidth, threats)
Related MCP server: Cloudflare Control
Installation
Prerequisites
Python 3.10 or higher
uv installed
A Cloudflare account with an API token
Quick Start with uv
Clone or create the project:
mkdir cloudflare-mcp-server
cd cloudflare-mcp-serverInstall with uv:
uv pip install -e .Or install from the directory:
uv pip install cloudflare-mcp-serverAlternative: Using pip
pip install -e .Configuration
Getting Your Cloudflare Credentials
API Token (Required):
Go to Cloudflare Dashboard
Click "Create Token"
Use "Edit zone DNS" template or create a custom token with the permissions you need
Copy the token
Account ID (Optional, but required for KV operations):
Go to your Cloudflare dashboard
Select any website
Scroll down on the Overview page to find your Account ID
Environment Variables
Set the following environment variables:
export CLOUDFLARE_API_TOKEN="your_api_token_here"
export CLOUDFLARE_ACCOUNT_ID="your_account_id_here" # Optional, needed for KVOr create a .env file (see .env.example).
Claude Desktop Configuration
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Using uv (recommended):
{
"mcpServers": {
"cloudflare": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/cloudflare-mcp-server",
"run",
"cloudflare-mcp-server"
],
"env": {
"CLOUDFLARE_API_TOKEN": "your_api_token_here",
"CLOUDFLARE_ACCOUNT_ID": "your_account_id_here"
}
}
}
}Using Python directly:
{
"mcpServers": {
"cloudflare": {
"command": "python",
"args": ["-m", "cloudflare_mcp_server"],
"env": {
"CLOUDFLARE_API_TOKEN": "your_api_token_here",
"CLOUDFLARE_ACCOUNT_ID": "your_account_id_here"
}
}
}
}Available Tools
The server provides 13 powerful tools for managing Cloudflare resources:
Zone Operations
list_zones- List all zones (domains) with optional filteringget_zone- Get detailed information about a specific zone
DNS Operations
list_dns_records- List DNS records with filteringcreate_dns_record- Create new DNS recordsupdate_dns_record- Update existing DNS recordsdelete_dns_record- Delete DNS records
Cache Operations
purge_cache- Purge cached content (entire zone or specific files/tags/hosts)
Workers KV Operations
list_kv_namespaces- List all KV namespacesread_kv_value- Read a value from KV storagewrite_kv_value- Write a key-value pair to KVdelete_kv_value- Delete a key from KVlist_kv_keys- List all keys in a namespace
Analytics
get_zone_analytics- Get analytics data for a zone
For detailed documentation on each tool, see EXAMPLES.md.
Agent-to-Agent (A2A) Protocol Support
This MCP server implements the Agent-to-Agent (A2A) protocol, enabling seamless communication between AI agents and autonomous systems. The A2A protocol standardizes how agents discover capabilities, authenticate, and execute operations across distributed systems.
Agent Card
The agent card is located at agent-card.json in the root directory. It provides a machine-readable description of:
Agent capabilities: Streaming support, async operations, task management
Available skills: 5 skill categories with 13 operations total
Authentication requirements: Bearer token configuration
Transport protocols: stdio-based communication via uv or Python
API schema: Complete parameter definitions for all operations
Skills for Agent-to-Agent Communication
The Cloudflare MCP Agent exposes the following skills through the A2A protocol:
1. Zone Management
Manage Cloudflare zones (domains) including listing and detailed queries.
list_zones- List all zones with filtering optionsget_zone- Retrieve detailed zone information
2. DNS Management
Comprehensive DNS record operations supporting all record types (A, AAAA, CNAME, TXT, MX, etc.).
list_dns_records- Query DNS records with filterscreate_dns_record- Create new DNS records with Cloudflare proxy supportupdate_dns_record- Modify existing DNS recordsdelete_dns_record- Remove DNS records
3. Workers KV Storage
Distributed key-value storage with metadata and TTL support.
list_kv_namespaces- List all KV namespacesread_kv_value- Retrieve values by keywrite_kv_value- Store key-value pairs with optional expirationdelete_kv_value- Delete keyslist_kv_keys- List keys with prefix filtering
4. Cache Management
Cloudflare cache purging and invalidation.
purge_cache- Purge by zone, files, tags, or hosts
5. Analytics
Zone performance metrics and analytics.
get_zone_analytics- Get requests, bandwidth, threats, and pageviews
A2A Integration Examples
Example 1: Agent-to-Agent DNS Management
An orchestrator agent can delegate DNS management to this Cloudflare agent:
{
"agent": "cloudflare-mcp-agent",
"skill": "dns_management",
"operation": "create_dns_record",
"parameters": {
"zone_id": "abc123",
"type": "A",
"name": "api",
"content": "192.0.2.100",
"proxied": true
}
}Example 2: Multi-Agent Cache Invalidation
A deployment agent can coordinate with this Cloudflare agent for cache invalidation:
{
"workflow": "deploy-and-invalidate",
"steps": [
{
"agent": "deployment-agent",
"action": "deploy_assets"
},
{
"agent": "cloudflare-mcp-agent",
"skill": "cache_management",
"operation": "purge_cache",
"parameters": {
"zone_id": "abc123",
"files": ["https://example.com/app.js", "https://example.com/style.css"]
}
}
]
}Example 3: KV Storage for Inter-Agent Communication
Agents can use KV storage for shared state:
{
"agent": "cloudflare-mcp-agent",
"skill": "kv_storage",
"operation": "write_kv_value",
"parameters": {
"namespace_id": "kv123",
"key": "agent-state:orchestrator",
"value": "{\"status\": \"processing\", \"tasks\": 5}",
"metadata": {
"agent": "orchestrator-v1",
"timestamp": "2025-12-08T15:00:00Z"
}
}
}A2A Authentication
When integrating with other agents, ensure the following environment variables are set:
export CLOUDFLARE_API_TOKEN="your_api_token_here"
export CLOUDFLARE_ACCOUNT_ID="your_account_id_here" # Required for KV operationsThe agent card specifies the minimum and recommended Cloudflare API permissions required for different operations.
Discovering Agent Capabilities
Other agents can discover this agent's capabilities by reading the agent-card.json file:
import json
# Load agent card
with open("agent-card.json") as f:
agent_card = json.load(f)
# Discover available skills
for skill in agent_card["skills"]:
print(f"Skill: {skill['name']}")
for operation in skill["operations"]:
print(f" - {operation['name']}: {operation['description']}")A2A Protocol Compliance
This agent implements the following A2A protocol features:
Structured agent card with capabilities and skills
Standardized skill and operation definitions
Type-safe parameter schemas
Authentication and authorization declarations
Transport protocol specifications (stdio)
Error handling and status reporting via MCP
For more information on the A2A protocol, see the agent card specification in agent-card.json.
Development
Using uv for Development
# Install in development mode with dev dependencies
uv pip install -e ".[dev]"
# Run the server directly
uv run cloudflare-mcp-server
# Run tests (when implemented)
uv run pytest
# Format code with ruff
uv run ruff format src/
# Lint code
uv run ruff check src/Project Structure
cloudflare-mcp-server/
āāā src/
ā āāā cloudflare_mcp_server/
ā āāā __init__.py # Main server implementation
āāā tests/ # Tests (to be implemented)
āāā pyproject.toml # Project configuration (uv-compatible)
āāā README.md # This file
āāā QUICKSTART.md # Quick start guide
āāā EXAMPLES.md # Usage examples
āāā .env.example # Environment templateUsage Examples
Example 1: List Your Zones
Ask Claude:
"Show me all my Cloudflare zones"
Example 2: Create a DNS Record
Ask Claude:
"Create an A record for api.example.com pointing to 192.0.2.100 with proxy enabled"
Example 3: Purge Cache
Ask Claude:
"Clear the cache for https://example.com/style.css"
For more examples, see EXAMPLES.md.
API Permissions
Your Cloudflare API token needs appropriate permissions based on what operations you want to perform:
Minimum Permissions:
Zone - Zone - Read (for listing zones)
Zone - DNS - Edit (for DNS operations)
Additional Permissions for Advanced Features:
Account - Workers KV Storage - Edit (for KV operations)
Zone - Cache Purge - Purge (for cache operations)
Zone - Analytics - Read (for analytics)
Troubleshooting
Common Issues
"CLOUDFLARE_API_TOKEN environment variable is required"
Make sure you've set the environment variable
Check your Claude Desktop config has the correct token in the
envsection
"Account ID is required"
Set
CLOUDFLARE_ACCOUNT_IDenvironment variable for KV operationsOr pass
account_idparameter directly in tool calls
uv command not found
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | shOr use pip as an alternative
Module not found errors
Make sure you installed the package:
uv pip install -e .Check you're in the right directory
Why uv?
This project uses uv because it's:
ā” 10-100x faster than pip
š More reliable with better dependency resolution
šÆ Simpler - one tool for everything
š Modern - built in Rust, designed for Python
Security Notes
Never commit your API token to version control
Store tokens securely using environment variables
Use API tokens instead of API keys (they're more secure and can be scoped)
Regularly rotate your API tokens
Use the minimum required permissions for your token
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE file for details.
Links
Support
For issues related to:
This MCP server: Open an issue on GitHub
Cloudflare API: Check Cloudflare Developer Docs
MCP Protocol: Check MCP Documentation
uv: Check uv Documentation
Available Tools
13 toolscreate_dns_recordB
Create a new DNS record in a zone. Supports all DNS record types.
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| type | Yes | DNS record type (A, AAAA, CNAME, TXT, MX, etc.) | |
| name | Yes | DNS record name (e.g., 'www' or '@' for root) | |
| content | Yes | DNS record content (e.g., IP address, hostname) | |
| ttl | No | Time to live (1 = automatic, or 120-86400 seconds) | |
| proxied | No | Whether the record is proxied through Cloudflare (only for A, AAAA, CNAME) | |
| priority | No | Priority (for MX, SRV records) | |
| comment | No | Comment for the DNS record |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must cover behavioral traits. Only mentions 'supports all types', but omits validation, permissions, conflict handling, and side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence is efficient, though it could include a brief context sentence. No redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 8 parameters and no output schema, description does not cover return value, error cases, or usage examples, leaving gaps for agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (baseline 3). Description adds no extra information beyond schema, which fully documents parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states action (Create), resource (DNS record), and context (in a zone). Supports all types distinguishes from siblings like delete, update, list.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use vs alternatives. Implies creation but doesn't contrast with update or list. Lacks exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_dns_recordB
Delete a DNS record from a zone
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| record_id | Yes | The DNS record ID to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits like destructiveness, irreversibility, or permission requirements. For a deletion operation, such transparency is important.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no extraneous words. It efficiently conveys the tool's purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no annotations, the description is minimal. It does not explain return values or error handling. However, for a simple delete operation with two well-described parameters, it is minimally adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and both parameters have clear descriptions in the schema. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Delete' and the resource 'DNS record from a zone'. It differentiates from sibling tools like create_dns_record and update_dns_record.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, or any prerequisites or conditions. The usage is implied only by the tool name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_kv_valueB
Delete a key from Workers KV storage
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Account ID (uses default from config if not provided) | |
| namespace_id | Yes | The KV namespace ID | |
| key | Yes | The key to delete |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description says 'Delete' but lacks behavioral details such as whether the operation is irreversible, required permissions, or what happens if the key does not exist. With no annotations, the description carries full burden but provides minimal disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one sentence, directly front-loading the purpose. Every word is necessary, with no redundancy. Ideal conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple delete operation with three parameters, the description covers the basic purpose but omits important context: behavior on missing key, error states, immediacy of deletion, and any side effects. It is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents all parameters. The description adds nothing beyond what the schema provides. According to guidelines, high coverage gives a baseline of 3, and no extra value is added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Delete a key from Workers KV storage', specifying the action (delete) and the resource (Workers KV key). It effectively distinguishes from sibling tools like read_kv_value and write_kv_value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. For example, it does not mention that deletion is permanent or suggest using list_kv_keys first. Context about prerequisites or consequences is absent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_zoneA
Get detailed information about a specific zone by zone ID
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility. It fails to disclose behavioral traits such as read-only nature, error conditions, rate limits, or what 'detailed information' encompasses.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no extraneous information. It is appropriately concise for a simple retrieval tool, though could benefit from slight expansion.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and minimal description, the agent lacks information about the return format or fields. 'Detailed information' is vague, making the tool less complete for accurate invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully describes the single parameter (zone_id) with 'The zone ID'. The description adds 'by zone ID' which reinforces but does not add beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get detailed information'), the resource ('a specific zone'), and the discriminator ('by zone ID'). It effectively distinguishes from sibling tools like list_zones and get_zone_analytics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a zone ID is known, but does not explicitly contrast with sibling tools or state when not to use. The guidance is clear but not exhaustive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_zone_analyticsB
Get analytics data for a zone including requests, bandwidth, threats, and pageviews.
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| since | No | Start time (ISO 8601 format or relative like '-1440' for last 24h) | |
| until | No | End time (ISO 8601 format or relative like '-0') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose behavioral traits like read-only nature, data freshness, or rate limits. It only states it 'gets' data, which implies a read operation but lacks explicit safety or side-effect information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with 13 words, directly stating the tool's purpose with no redundancy or unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description provides some output context (requests, bandwidth, threats, pageviews) but lacks details on output format, time range semantics, and behavioral aspects. Given no output schema, more completeness would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds no new meaning beyond the schema. It does not explain how 'since' and 'until' affect the analytics data or provide context beyond field names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves analytics data for a zone, listing specific data types (requests, bandwidth, threats, pageviews). This distinguishes it from sibling tools like get_zone (zone details) and list_zones (listing zones).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidance is provided. The description does not specify when to use this tool, prerequisites, or alternatives among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_dns_recordsB
List DNS records for a zone. Can filter by type, name, content, etc.
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| type | No | DNS record type (A, AAAA, CNAME, TXT, MX, etc.) | |
| name | No | DNS record name to filter by | |
| content | No | DNS record content to filter by | |
| page | No | Page number for pagination | |
| per_page | No | Number of records per page (max: 100) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions filtering but omits important behavioral traits like pagination (page/per_page parameters exist but no mention of default behavior or limits), sorting, or any rate limits. Minimal disclosure for a listing endpoint.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that conveys the primary action. It is efficiently front-loaded but could include more detail in the same space.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 6 parameters, no output schema, and no annotations, the description is too sparse. It does not explain pagination behavior, default values, sorting, or what happens when no filters are applied. This leaves gaps for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The description adds 'etc.' but doesn't provide meaningful additional semantic context beyond listing a few filterable fields. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists DNS records for a zone, which is a specific verb and resource. However, it does not explicitly differentiate from sibling tools like create/delete/update_dns_record, though the purpose is fairly obvious.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this vs alternatives. Usage is implied by the tool name and context (it's the listing tool among mutation ones), but no exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_kv_keysA
List all keys in a Workers KV namespace. Supports pagination and prefix filtering.
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Account ID (uses default from config if not provided) | |
| namespace_id | Yes | The KV namespace ID | |
| prefix | No | Filter keys by prefix | |
| limit | No | Maximum number of keys to return (default: 1000) | |
| cursor | No | Cursor for pagination |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description provides behavioral traits: supports pagination and prefix filtering. It honestly represents a read operation. However, it does not disclose rate limits, authorization requirements, or behavior for empty results, but the core behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the main action, and no unnecessary words. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description omits return value details (e.g., format, pagination metadata). Given no output schema, this is a gap. Parameters are well-documented in schema, so overall adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all 5 parameters. The description adds context by mentioning 'pagination and prefix filtering', which ties to the prefix, limit, and cursor parameters. This adds marginal value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List', the resource 'keys in a Workers KV namespace', and key features (pagination, prefix filtering). This distinguishes it from siblings like read_kv_value (single key) and list_kv_namespaces (list namespaces).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing keys with optional filtering and pagination but does not explicitly state when to use this tool over alternatives (e.g., when you need to enumerate keys vs reading a known key). No exclusion criteria or prerequisite conditions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_kv_namespacesB
List all Workers KV namespaces in the account. KV is Cloudflare's key-value storage.
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Account ID (uses default from config if not provided) | |
| page | No | Page number for pagination | |
| per_page | No | Number of namespaces per page |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must fully disclose behavioral traits. It only states the basic list action, omitting details like pagination behavior (page and per_page parameters), authentication requirements, rate limits, or whether the result is flat or nested.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at two short sentences, immediately stating the purpose. Every word earns its place; there is no fluff or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity of listing namespaces and full schema coverage, the description is largely complete. However, since there is no output schema, a brief note on the shape of the returned data would be beneficial for full completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema provides 100% coverage with descriptions for all parameters (account_id, page, per_page). The description adds no additional semantic meaning beyond what the schema already conveys, so it meets the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a clear verb and resource ('List all Workers KV namespaces'), establishing a specific purpose. However, it does not differentiate from sibling tools like list_kv_keys, which is a missed opportunity for clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives such as list_kv_keys or list_dns_records. The context of usage is implied but not explicit, and no exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_zonesB
List all zones (domains) in the Cloudflare account. Returns zone details including ID, name, status, and nameservers.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Filter zones by name (optional) | |
| status | No | Filter by status: active, pending, initializing, moved, deleted, deactivated (optional) | |
| page | No | Page number for pagination (default: 1) | |
| per_page | No | Number of zones per page (default: 20, max: 50) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It fails to mention that this is a read-only operation, any rate limits, authentication requirements, or potential side effects, offering only a minimal summary of the return fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-constructed sentence that packs the core purpose and returned fields efficiently, with no fluff. It could be slightly improved by front-loading the filtering capability, but it is already concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 optional parameters, no output schema, and no annotations, the description is incomplete. It omits important context about pagination behavior, default page size, and the scope of 'all zones' (e.g., whether it returns results across all pages).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has 100% coverage; all four parameters are well-described in the schema. The description adds only a brief mention of response details, which does not significantly augment parameter understanding, meeting the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list' and the resource 'zones (domains)' in a Cloudflare account, and distinguishes it from sibling tools like list_dns_records or get_zone by explicitly noting the return of zone details (ID, name, status, nameservers).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lacks any guidance on when to use this tool versus alternatives like get_zone (for a single zone). No exclusions or preferences are indicated, leaving the agent to infer from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
purge_cacheB
Purge Cloudflare's cache for a zone. Can purge everything or specific files/tags/hosts.
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| purge_everything | No | Purge all cached content (use cautiously!) | |
| files | No | Array of URLs to purge | |
| tags | No | Array of cache tags to purge | |
| hosts | No | Array of hosts to purge |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should fully disclose behavior. It mentions the destructive nature of 'purge_everything' with a caution, but omits details on rate limits, authentication requirements, reversibility, or effects on non-purged content.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, with two sentences that efficiently convey the core function and options. No superfluous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of output schema and annotations, the description is incomplete. It doesn't explain return values, error conditions, or the requirement that at least one purge method (purge_everything, files, tags, hosts) must be specified. The 'zone_id' parameter is mentioned but its format is not clarified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema; it simply paraphrases the parameter options without additional constraints or format details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (purge cache), the resource (Cloudflare zone), and the modes (everything or specific files/tags/hosts). It distinctly separates this tool from sibling tools like DNS or KV operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool over others or when not to use it. The only hint is the caution on 'purge_everything', but no differentiation between purge modes or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_kv_valueB
Read a value from Workers KV storage by key. Returns the stored value.
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Account ID (uses default from config if not provided) | |
| namespace_id | Yes | The KV namespace ID | |
| key | Yes | The key to read |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. It only states it reads and returns a value, but does not specify behavior for missing keys (null vs error), repeatability, permissions, or any side effects. This is insufficient for reliable agent invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with no superfluous content. However, it could incorporate a bit more detail (e.g., key existence handling) without harming conciseness. Still, it is efficiently front-loaded and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool without an output schema, the description should clarify the return format or error cases. It only says 'Returns the stored value,' which is vague. An agent lacks information on what happens if the key does not exist or if the namespace is invalid, making the tool incomplete for autonomous use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage with clear descriptions (e.g., account_id defaults to config, namespace_id and key are required). The description adds only 'by key' which is already implied. Since schema coverage is high, baseline 3 is appropriate; no extra nuance is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Read a value'), the resource ('Workers KV storage by key'), and the return behavior ('Returns the stored value'). This unambiguously differentiates it from sibling tools like write_kv_value or delete_kv_value.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage context or alternatives are mentioned. An agent receives no guidance on when to use this tool over, say, list_kv_keys, or what prerequisites are needed (e.g., does the key need to exist?). This omission forces the agent to rely on trial and error.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_dns_recordB
Update an existing DNS record. Can modify type, name, content, TTL, proxy status, etc.
| Name | Required | Description | Default |
|---|---|---|---|
| zone_id | Yes | The zone ID | |
| record_id | Yes | The DNS record ID to update | |
| type | Yes | DNS record type | |
| name | Yes | DNS record name | |
| content | Yes | DNS record content | |
| ttl | No | Time to live | |
| proxied | No | Whether the record is proxied through Cloudflare | |
| priority | No | Priority (for MX, SRV records) | |
| comment | No | Comment for the DNS record |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must fully disclose behavior. It states 'update' but does not mention error handling, idempotency, return value, or authorization requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, 14 words, efficient and clear. Could front-load more critical info but remains concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, no description of return value or error conditions. For a tool with 9 parameters (5 required), more contextual guidance is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all parameters. Description adds minimal value (just lists some fields) but does not significantly extend beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool updates an existing DNS record and lists modifiable fields (type, name, content, TTL, proxy status). It distinguishes from sibling tools like create_dns_record and delete_dns_record.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use update versus create or delete. No mention of prerequisites (record must exist) or context for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_kv_valueC
Write a key-value pair to Workers KV storage. Can store text or metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | No | Account ID (uses default from config if not provided) | |
| namespace_id | Yes | The KV namespace ID | |
| key | Yes | The key to write | |
| value | Yes | The value to store | |
| expiration_ttl | No | Number of seconds for the key to expire | |
| metadata | No | Arbitrary JSON metadata to store with the key |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry full burden. Only states 'Write' implying mutation, but fails to disclose side effects (overwrites?), authorization needs, or limits (e.g., key/value size limits).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no wasted words. Front-loaded with the essential action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Lacks information about return values, error conditions, or usage patterns for optional parameters like expiration_ttl and metadata. Given no output schema and no annotations, description is insufficient for complete understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds minimal value beyond the schema, only mentioning 'text or metadata' which schema already covers.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the action (write) and the resource (key-value pair to Workers KV storage). Distinguishes from sibling read/delete tools, but could be more specific about full capabilities like expiration and metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives or prerequisites. For example, does not mention that keys must exist or that this overwrites existing keys.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct operation within well-separated domains (DNS, KV, zones, cache, analytics). No two tools have overlapping purposes; an agent can easily distinguish them.
All tool names follow a consistent snake_case verb_noun pattern (e.g., create_dns_record, list_kv_keys). There are no deviations or mixed conventions.
With 13 tools covering DNS lifecycle, KV storage operations, zone queries, cache purging, and analytics, the count is well-scoped for a Cloudflare management server.
Core workflows are covered: DNS CRUD, KV operations (create/read/update/delete/list), zone listing/details, cache purge, and analytics. Minor gaps: no single DNS record retrieval (list can filter) and no zone creation, but overall coverage is strong.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage hosts, redirects, SSL, and traffic analytics from Claude and other AI assistants.
Give your AI agents the tools to build, manage, and run automation workflows.
The bridge from K2 agents through Wrangler to your master AI - safe, approval-gated Cloudflare ops.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseBqualityDmaintenanceExposes Cloudflare DNS, security, redirects and zone-settings functionality as structured tools that AI assistants like Claude Desktop can invoke directly.1848MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Cloudflare infrastructure including DNS records, cache purging, SSL settings, Workers, and analytics through the Cloudflare API. Eliminates dashboard context-switching by allowing natural language control of domain management and infrastructure operations.
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the Cloudflare REST API for managing DNS records, zones, and other Cloudflare resources.MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Cloudflare DNS zones and records, including listing, creating, updating, and deleting DNS records through natural language.6MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ry-ops/cloudflare-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server