# KeyCDN MCP

> Manage your global content delivery network (CDN) directly through conversation. This MCP lets you purge specific cached URLs or entire zones, create new pull zones for origin servers, and monitor detailed traffic bandwidth reports without logging into a web dashboard.

## Overview
- **Category:** cloud-infrastructure
- **Price:** Free
- **Tags:** cdn, edge-caching, content-delivery, web-performance, cache-invalidation, traffic-monitoring

## Description

Need to update an image on your site and make sure the old version doesn't show up anywhere? Forget jumping between developer consoles. This MCP connects your content delivery infrastructure to your AI agent, giving you full control over your global edge caching from natural conversation. You can instantly purge a zone's entire cache or target just one file URL, ensuring fresh assets hit your users immediately. It handles everything from setting up new pull zones to managing custom domain aliases for branded URLs. For monitoring, you can retrieve detailed bandwidth consumption reports over any time period. When you connect this MCP via Vinkius, your agent gains the authority needed to perform complex infrastructure tasks—like inspecting caching rules or deleting entire acceleration zones—all while staying within your preferred AI client.

## Tools

### add_zone_alias
Attaches a custom domain name to an existing KeyCDN zone, allowing you to use your own branded URL for assets.

### add_pull_zone
Creates and sets up a new pull zone, which points KeyCDN's global network back to your original content server.

### delete_zone_alias
Removes a custom domain name alias from a specific KeyCDN zone when you change branding or structure.

### delete_zone
Completely removes an entire, dedicated KeyCDN zone and all its associated wildcard subdomains.

### get_zone
Retrieves detailed configuration information for one specific KeyCDN zone.

### list_zone_aliases
Lists all custom domain aliases currently bound across every zone in your account.

### list_traffic_reports
Generates and retrieves detailed reports showing how much bandwidth was consumed over a given time period.

### list_zones
Returns an immutable list of all existing KeyCDN zones and their primary endpoints.

### purge_specific_url
Invalidates a single file URL within a zone, letting you clear only the necessary asset without purging everything else.

### purge_zone_cache_all
Wipes out the entire content cache for a specified KeyCDN zone at once.

## Prompt Examples

**Prompt:** 
```
List all my KeyCDN zones
```

**Response:** 
```
I've found 3 zones in your account: 'main-assets' (ID: 123, Endpoint: main-123.kxcdn.com), 'video-streaming' (ID: 456), and 'staging-static' (ID: 789). Which one would you like to see the configuration for?
```

**Prompt:** 
```
Purge the cache for this URL in zone 123: https://main-123.kxcdn.com/styles/app.css
```

**Response:** 
```
Purge request for 'styles/app.css' sent successfully. The resource has been invalidated across the global KeyCDN network. It will be re-fetched from your origin server on the next visitor request.
```

**Prompt:** 
```
How much traffic did we use in the last 7 days?
```

**Response:** 
```
Retrieving traffic reports… In the last 7 days, your account consumed a total of 1.24 TB of bandwidth. The peak usage occurred on Tuesday at 4 PM with 45 GB/hour. Your current credit balance is sufficient for this usage level.
```

## Capabilities

### Invalidate Specific Assets
Target and clear the cache for a single file URL in a zone, avoiding the need to purge everything.

### Execute Full Cache Purge
Instantly wipe the entire cache for an assigned KeyCDN zone when content changes globally.

### Build New Pull Zones
Create and configure new pull zones, connecting your origin servers directly to KeyCDN's global network points.

### Manage Domain Aliases
Bind or unbind custom domain names (CNAMEs) to existing zones, maintaining branded asset delivery URLs.

### Audit and Delete Infrastructure
Retrieve zone configuration details, list all active zones, or permanently delete entire acceleration zones.

## Use Cases

### The Broken Image Fix
A frontend dev notices a user is seeing an old logo image after deployment. They ask their agent to run `purge_specific_url` on the asset's path, instantly resolving the stale content issue without impacting other assets.

### The Quarterly Budget Check
An SRE needs to justify CDN spend to a manager. They ask their agent to run `list_traffic_reports` for the last quarter, getting precise bandwidth data instantly for review.

### Multi-Site Rollout
A DevOps engineer is setting up a new client site and needs a dedicated content source. They use `add_pull_zone` to connect the site's origin servers, completing the setup in one conversation.

### The Site Cleanup
An administrator confirms that an old testing zone is no longer needed. They ask their agent to run `delete_zone`, ensuring all associated assets and subdomains are revoked instantly.

## Benefits

- Save time on cache invalidation. Instead of manually purging every single URL, use `purge_specific_url` to hit only the files that changed after a code deployment.
- Gain full visibility into spending. Run `list_traffic_reports` to pull bandwidth consumption data and track CDN costs without opening a billing dashboard.
- Manage branded assets easily. Use `add_zone_alias` to map custom domains, keeping your URLs clean while still using the global CDN network.
- Scale infrastructure with confidence. Need a new content source? Run `add_pull_zone` directly through your agent instead of navigating multiple console tabs.
- Audit zone health on demand. Use `list_zones` and `get_zone` to quickly verify that all required endpoints are active and configured correctly across environments.

## How It Works

The bottom line is that you control complex CDN operations using simple natural language prompts instead of navigating multiple web forms.

1. Subscribe to this MCP and provide your unique KeyCDN API key.
2. Connect the credentials to any compatible AI client (like Cursor or VS Code).
3. Ask your agent to perform an action, like listing all zones or purging a specific URL.

## Frequently Asked Questions

**How do I list all my zones using the KeyCDN MCP?**
You run the `list_zones` tool. This immediately returns a complete, updated list of every active zone endpoint associated with your account.

**Can I purge only one file in KeyCDN using this MCP?**
Yes. Use `purge_specific_url`. This is much better than running a full cache purge because it limits the invalidation to just the single asset path you specify.

**What if my custom domain alias stops working with KeyCDN MCP?**
You can check all configured aliases using `list_zone_aliases`. If necessary, you can remove a broken link using `delete_zone_alias`.

**Is the KeyCDN MCP safe for deleting zones?**
Yes, but be careful. The `delete_zone` tool permanently removes an entire zone and all its associated assets. Always confirm the name before executing this action.