# StackPath MCP

> StackPath manages global edge computing deployments and CDN delivery via a single API gateway. You can list all resource stacks, deploy containerized workloads to specific regions, create new content delivery sites, or instantly purge cached content across your entire network using natural conversation with any AI agent.

## Overview
- **Category:** cloud-infrastructure
- **Price:** Free
- **Tags:** edge-computing, cdn, content-delivery, serverless, infrastructure-as-code

## Description

This server lets you manage your entire edge infrastructure and content delivery network (CDN) straight from any AI agent. You don't gotta log into some clunky console; you just talk to your client, and it handles the heavy lifting of deploying resources across a global footprint.

**Manage Infrastructure Stacks.** You need a high-level view of where everything lives? Use `list_stacks` to pull up the names and IDs for every single logical container—every stack—you've deployed across your network. This gives you one place to see all your resource groupings, keeping your massive infrastructure organized.

**List Active Resources.** Need a quick status check on what’s running right now? If you want to know what CDNs are up and humming, `list_cdn_sites` pulls that list for you. Similarly, if you wanna check the compute workloads inside a specific stack, `list_workloads` gives you a rundown of all active containers or VMs currently operating there.

**Configure CDN Sites.** Gotta roll out new content delivery? You use `create_cdn_site`. This tool sets up a brand-new CDN endpoint that points directly to your origin servers. It's how you make sure fresh content hits the edge network exactly where it needs to go.

**Force Cache Purges.** Users shouldn't see old stuff, right? When you run `purge_content`, you trigger an immediate purge request that clears out cached content across *the entire* CDN network. It’s instant; every node gets hit so your users only see the live updates.

**Deploy Edge Workloads.** You need low latency and compute power at a specific corner of the globe? Use `create_workload`. This tool deploys and provisions full compute capacity—whether it's containerized or a virtual machine workload—at an exact edge location. This means your app runs fast, no matter where your user is.

When you combine these functions, you're controlling the whole lifecycle of your global edge presence. You can list every stack using `list_stacks`, then use that stack ID to deploy compute capacity via `create_workload`. Once that workload is live, if you need a new delivery endpoint for it, you run `create_cdn_site`. If you need to verify the CDN site exists, check with `list_cdn_sites`. You can't forget about keeping things current; after any major deployment or content change, running `purge_content` ensures stale data never makes it to a user. Finally, if you just wanna confirm everything is deployed and working before calling anyone, you use `list_workloads` to verify the compute status.

## Tools

### create_cdn_site
Sets up a brand new content delivery network site pointing to your origin.

### create_workload
Deploys and provisions compute capacity (a workload) at an edge location.

### list_cdn_sites
Retrieves a list of all CDN sites currently configured within a stack.

### list_stacks
Fetches the names and IDs of every logical container (stack) in your account.

### list_workloads
Lists all active compute workloads running inside a specific stack.

### purge_content
Triggers an immediate purge request, clearing cached content across the entire CDN network.

## Prompt Examples

**Prompt:** 
```
List all my StackPath stacks.
```

**Response:** 
```
I've retrieved your stacks. You have 2 active stacks: 'Production-Edge' (ID: st-12345) and 'Staging-Global' (ID: st-67890).
```

**Prompt:** 
```
Purge the cache for https://example.com/logo.png in stack st-12345.
```

**Response:** 
```
The purge request for 'https://example.com/logo.png' has been successfully submitted to stack st-12345.
```

**Prompt:** 
```
List all CDN sites in stack st-12345.
```

**Response:** 
```
I found 1 CDN site in stack st-12345: 'www.example.com' pointing to origin 'origin.example.com'.
```

## Capabilities

### Manage Infrastructure Stacks
List all high-level resource containers (stacks) across your global edge network.

### Deploy Edge Workloads
Create and deploy containerized or virtual machine workloads to specific edge locations for low latency.

### Configure CDN Sites
Set up new content delivery network (CDN) sites pointing to your origin servers.

### Force Cache Purges
Instantly clear cached content from the CDN, ensuring users see live updates across all nodes.

### List Active Resources
Retrieve current lists of deployed stacks, CDNs, and workloads for quick status checks.

## Use Cases

### The emergency hotfix rollout
A developer pushes an urgent fix that needs instant global visibility. Instead of waiting 2 hours for cache expiration, they ask their agent to run `purge_content` on the production stack. The system confirms the purge request is submitted immediately, guaranteeing users see the new code right away.

### Scaling a new feature area
A team needs a dedicated environment for testing a high-traffic regional service. They run `list_stacks` to confirm available names, and then use `create_workload` to spin up the compute capacity in the required region without touching production.

### Auditing old deployments
An SRE needs to check if a deprecated service is still running anywhere. They run `list_stacks`, find the relevant stack ID, and then immediately call `list_workloads` to see exactly what compute resources are consuming capacity.

### Launching a new marketing site
Marketing needs a temporary landing page for a campaign. They use their agent to run `create_cdn_site`, point it at the correct origin, and get a live endpoint URL back—all in seconds.

## Benefits

- Force cache purges with `purge_content`. When you push an update, the content is instantly invalidated everywhere. No more stale images or old data showing up for users—it just works.
- Manage resources at scale by running `list_stacks`. See all your separate development, staging, and production environments in one call, so you know exactly which stack you're touching.
- Deploy compute power with `create_workload`. You can spin up a new containerized service right at the edge for super low latency without manual SSH into multiple regions.
- Get an instant infrastructure status check using `list_cdn_sites` or `list_workloads`. This is way faster than opening ten different tabs and running commands one by one.
- Create new endpoints with `create_cdn_site`. When you launch a new product line, you don't have to manually configure the CDN—you just call the tool.

## How It Works

The bottom line is you manage complex global infrastructure by simply talking to your AI agent instead of writing specific CLI commands.

1. Subscribe to this server and provide your StackPath Client ID and Secret.
2. Your AI client authenticates with the Vinkius Marketplace using these credentials.
3. You ask your agent to perform an action (e.g., 'Purge the cache for example.com'). The agent calls the appropriate tool, executes the command, and reports the result.

## Frequently Asked Questions

**How do I check all my environments using list_stacks?**
Run `list_stacks`. This tool returns a complete inventory of every logical container you have set up, giving you the exact stack IDs needed for subsequent operations.

**What's the difference between list_cdn_sites and list_workloads?**
`list_cdn_sites` shows your public-facing URLs and how they are routed. `list_workloads` tells you if the actual compute engine (the code running) is active inside a stack.

**If I run purge_content, does it clear everything?**
Yes, `purge_content` forces an immediate cache flush across the entire configured CDN network for your specified content. It's the fastest way to ensure freshness.

**Can I deploy a new service without knowing the stack ID?**
No, you usually need the context of existing stacks first. Use `list_stacks` to get all available IDs, and then reference that ID when calling `create_workload`.

**When I run `create_cdn_site`, what specific formats must the hostname and origin URL follow?**
Both require standard, fully qualified domain names (FQDNs). The hostname is your public-facing site address. The origin must be an accessible internal endpoint that hosts the raw content you want served.

**If `create_workload` returns an error, what status code tells me it's a resource limit issue?**
The tool response will include an explicit error object detailing the failure. Look for HTTP 429 or specific messages indicating that the target stack has exceeded its allocated container count.

**After running `purge_content`, how long until the cached content is gone globally?**
The purge request submits immediately, but cache invalidation propagates across edge nodes. You should expect full global clearance within a few minutes, depending on your current network configuration.

**Does `list_workloads` support querying for workloads from multiple stack IDs in one command?**
No. The tool requires you to specify a single stack ID per request. You must run the command for each stack individually and then compile the full list yourself.

**How do I clear the CDN cache for specific assets?**
You can use the `purge_content` tool. Provide the `stack_id` and a list of `urls` you want to invalidate. You can also set `recursive` to true to purge entire directories.

**Can I deploy a new container to the edge using this agent?**
Yes! Use the `create_workload` tool. You'll need to specify the `stack_id`, a `name`, `slug`, and the container `image` (e.g., 'nginx:latest').

**How do I find the ID of my infrastructure stacks?**
Simply run the `list_stacks` tool. It will return all logical stacks associated with your account along with their unique IDs.