# Cloudflare MCP for AI Agents AI Agent Connect

> Cloudflare MCP lets you manage your edge infrastructure through a natural conversation. Audit DNS records, deploy Workers, manage KV storage, and inspect firewall rules or CDN analytics. It turns your AI into an infrastructure engineer that handles the heavy lifting of network security and content delivery.

## Overview
- **Category:** ship-it
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_WQLp8s6hFtNcm5KlFgrwF5hX4bJhIm9dSsqteSJv/ai-agent-connect
- **Tags:** dns-management, cdn, edge-computing, firewall, serverless, network-security

## Description

Imagine you're in the middle of a production incident. Instead of hunting through a complex dashboard to find which firewall rule is blocking a specific IP range, you just tell your agent what's happening. This Connector connects your Cloudflare account to your AI client so you can manage your entire edge presence using plain English. It handles the tedious parts of infrastructure management, like updating DNS records for a new deployment or checking the health of your load balancers across different regions. You can query your KV namespaces to see if your feature flags updated correctly or audit your WAF rules to ensure your site stays secure against bots. Because it's listed in the Vinkius catalog, you can get this connected and running in minutes without digging through documentation. It takes the friction out of network administration, letting you focus on building features while your agent keeps an eye on traffic spikes, bandwidth usage, and threat mitigation. It's like having a dedicated DevOps specialist who knows your specific configuration inside and out, ready to pull logs or adjust settings whenever you need them.

## Tools

### create_dns_record
Add a new DNS record with custom TTL and proxy settings. This is useful for pointing your domain to new origins.

### get_zone_analytics
Audit CDN performance and identify traffic spikes in a specific zone. This helps you see real-time traffic patterns.

### delete_dns_record
Remove an existing DNS record from your zone immediately. Use this to clean up old records quickly.

### list_dns_records
See all current DNS records for a specific domain. It helps you verify your current configuration at a glance.

### list_firewall_rules
Review all active WAF rules and their filter expressions. This is essential for security audits.

### get_kv_value
Read configuration data or feature flags from a KV namespace. This is great for checking edge state.

### get_zone
View the high-level details and status of a specific domain. Use this to check your zone's current plan and state.

### list_cloudflare_ips
Get the full list of Cloudflare IP ranges for your allow-lists. This is perfect for configuring your origin firewall.

### list_kv_namespaces
See all KV namespaces available in your account. This helps you organize your edge data storage.

### list_load_balancers
Check the status and steering policies of your load balancers. Use this to ensure high availability across regions.

### list_pages_projects
View all Cloudflare Pages projects and their build history. This keeps your hosting projects organized.

### put_kv_value
Write new data to a KV namespace for your serverless functions. Use this to update flags or configs dynamically.

### update_dns_record
Modify the content, TTL, or proxy status of an existing record. This lets you make quick changes to active records.

### list_workers
View all deployed serverless scripts and their resource usage. This helps you monitor your edge computing load.

### list_zones
List every domain managed within your Cloudflare account. This gives you a bird's eye view of your entire portfolio.

## Prompt Examples

**Prompt:** 
```
Check if my 'api.example.com' DNS record is proxied.
```

**Response:** 
```
I checked your DNS records for example.com. The `api` record is currently **not proxied** (DNS only). It's pointing to `203.0.113.11` with a TTL of 3600. Would you like me to enable the proxy for you?
```

**Prompt:** 
```
Are there any active firewall rules blocking traffic?
```

**Response:** 
```
You have 3 active rules in your production zone: 
- **Block Bot Traffic**: Enabled, filters known malicious IPs.
- **Geo-Block**: Enabled, challenges requests from high-risk regions.
- **Rate Limit**: Enabled, limits /api to 1000 req/5min.
All other rules are currently disabled.
```

**Prompt:** 
```
List my current KV namespaces.
```

**Response:** 
```
I found 2 KV namespaces in your account:
1. `prod_config` (ID: 8f2...)
2. `feature_flags` (ID: 9a1...)
Which one would you like to read or write to?
```

## Capabilities

### Create and update DNS records
Add or modify A, CNAME, MX, and TXT records with custom TTL and proxy settings.

### Audit WAF firewall rules
Review your Web Application Firewall configurations to see what traffic is being blocked or allowed.

### Read and write KV storage
Manage key-value pairs for Worker configurations, feature flags, and edge-cached data.

### Inspect load balancer health
Check the status and steering policies of your load balancers across different regions.

### Review CDN traffic analytics
Pull data on request counts, bandwidth, and threat mitigation for your specific zone.

### Track Cloudflare Pages deployments
View your hosting projects, Git sources, and build statuses in one place.

## Use Cases

### Updating a production DNS record
A developer needs to point the API to a new IP. They ask the agent to use create_dns_record to update the A record and enable the proxy.

### Troubleshooting a blocked request
A security engineer sees a 403 error. They ask the agent to use list_firewall_rules to find the specific WAF expression blocking the user.

### Checking a feature flag state
A product manager wants to know if a new button is live. The agent uses get_kv_value to check the current state of the flag in the production namespace.

### Monitoring CDN performance
During a sale, an ops lead asks the agent to use get_zone_analytics to identify any traffic spikes or bandwidth issues in the production zone.

### Verifying load balancer health
A site goes slow, so an engineer asks the agent to use list_load_balancers to ensure all origin pools are healthy and steering correctly.

## Benefits

- Stop manual DNS updates: Use create_dns_record and update_dns_record to change records in seconds without logging into a dashboard.
- Faster security audits: Quickly review WAF configurations using list_firewall_rules to spot potential holes in your network.
- Instant KV access: Read and write configuration data directly via get_kv_value and put_kv_value to manage your edge state.
- Real-time health checks: Keep an eye on your traffic distribution by checking load balancers with list_load_balancers.
- Rapid deployment tracking: Monitor your hosting status by listing your Pages projects and Workers scripts instantly.
- Data-driven decisions: Use get_zone_analytics to see exactly how your CDN is performing and where your traffic is coming from.

## How It Works

The bottom line is you get a voice-controlled dashboard for your entire edge infrastructure.

1. Subscribe to the Cloudflare MCP on Vinkius.
2. Provide your Cloudflare API Token in your AI client.
3. Ask your agent to check your DNS, audit your firewall, or pull analytics.

## Frequently Asked Questions

**Can the Cloudflare MCP manage my DNS records?**
Yes, it lets you create, update, delete, and list DNS records like A, CNAME, and MX records through your AI client.

**Does Cloudflare MCP support WAF rules?**
It allows you to audit and review your Web Application Firewall rules to see what is being blocked or allowed.

**Can I use it to check my Worker scripts?**
Yes, the Connector can list your deployed Workers, showing you their names, last deployment times, and resource usage.

**How do I use it for KV storage?**
You can use it to read and write key-value pairs for your Workers, which is great for managing feature flags or edge-cached data.

**Does it show CDN analytics?**
Yes, it can pull data on request counts, bandwidth, and threat mitigation for your specific Cloudflare zone.

**Can it manage my Cloudflare Pages?**
It lets you view all your Pages projects, including their Git sources, production branches, and build statuses.

**Is it safe to use with my API token?**
Yes, it uses your standard Cloudflare API token to perform actions just like your own manual requests would.

**How do I create a Cloudflare API Token?**
Log in to the [**Cloudflare dashboard**](https://dash.cloudflare.com/profile/api-tokens), go to **My Profile** > **API Tokens** > **Create Token**. Use the 'Edit zone DNS' template or create a custom token with permissions for Zones, DNS, Workers, KV, Pages and Firewall as needed. Copy the token immediately — it won't be shown again.

**Can I modify DNS records for multiple domains?**
Yes! First use `list_zones` to find the zone ID for each domain. Then use `create_dns_record`, `update_dns_record` or `delete_dns_record` with the appropriate zone_id. You can manage DNS records across all zones your API token has access to.

**Where do I find my Cloudflare Account ID?**
Your Account ID appears in the Cloudflare dashboard URL after logging in (e.g. `dash.cloudflare.com//...`). You can also find it in Organization Settings. The Account ID is needed for Workers, KV namespaces and Pages project queries.