# Using CDNPulse with AI Agents


> Connect AI agents and coding assistants to CDNPulse via the MCP server or REST API to automate CDN monitoring setup and analytics queries.




CDNPulse exposes a fully documented REST API, an MCP server, and Agent Skills — so AI coding assistants can set up CDN monitoring and query analytics on your behalf.

## Quick start: copy prompt for AI

The fastest way to get started with an AI assistant is to use the following prompt:

```text
Help me set up CDN performance monitoring using CDNPulse (https://cdnpulse.io).

First read these skill guides:
- Setup: https://cdnpulse.io/.well-known/agent-skills/cdnpulse-setup/SKILL.md
- Analytics: https://cdnpulse.io/.well-known/agent-skills/cdnpulse-analytics/SKILL.md

Then help me: (1) sign up, (2) create an application for my website, (3) add the monitoring script, and (4) interpret the CDN performance analytics.
```

## MCP server

CDNPulse exposes an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server at:

```
https://api.cdnpulse.io/mcp
```

This lets AI agents in Cursor, Claude Desktop, VS Code, and other MCP-capable clients call CDNPulse API operations directly as tools — no copy-pasting required.

### Available tools

| Tool | Description |
|---|---|
| `get_all_apps` | List all your monitored applications |
| `create_app` | Register a new application |
| `get_app_by_name` | Get details of one application |
| `update_app` | Update application settings |
| `delete_app` | Remove an application |
| `get_analytics_summary` | Aggregate metrics (TTFB, latency percentiles, error rate) |
| `get_analytics_regions` | Performance breakdown by region |
| `get_analytics_cities` | Performance breakdown by city |
| `get_analytics_timeseries` | Hourly latency time series |
| `get_analytics_data` | Full analytics in one call |
| `get_public_analytics_data` | Analytics for public apps (no auth) |
| `get_public_analytics_timeseries` | Time series for public apps (no auth) |

### Authentication

CDNPulse's sign-in flow requires checking your email for a verification code, so it can't be automated end-to-end. Obtain a Bearer token once via the REST API, then configure your MCP client to send it:

**Step 1 — get a token** (run once, e.g. with `curl`):

```bash
# 1. Request a code
curl -s -X POST https://api.cdnpulse.io/auth/signin \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

# 2. Check your inbox, then verify
curl -s -X POST https://api.cdnpulse.io/auth/verify \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "code": "123456"}'
# → {"access_token": "eyJ...", "token_type": "bearer"}
```

**Step 2 — configure your MCP client:**

{{< tabs >}}
{{< tab "Cursor / Claude Desktop" >}}
```json
{
  "mcpServers": {
    "cdnpulse": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.cdnpulse.io/mcp",
        "--header",
        "Authorization:Bearer ${CDNPULSE_TOKEN}"
      ],
      "env": {
        "CDNPULSE_TOKEN": "eyJ..."
      }
    }
  }
}
```
{{< /tab >}}
{{< tab "VS Code (settings.json)" >}}
```json
{
  "mcp": {
    "servers": {
      "cdnpulse": {
        "type": "http",
        "url": "https://api.cdnpulse.io/mcp",
        "headers": {
          "Authorization": "Bearer eyJ..."
        }
      }
    }
  }
}
```
{{< /tab >}}
{{< /tabs >}}

## Agent Skills

CDNPulse publishes [Agent Skills](https://agentskills.io) — structured instruction files that AI agents can fetch to understand exactly how to use the API:

| Skill | URL | Description |
|---|---|---|
| `cdnpulse-setup` | [`/cdnpulse-setup/SKILL.md`](/.well-known/agent-skills/cdnpulse-setup/SKILL.md) | Sign up, create an app, add the script |
| `cdnpulse-analytics` | [`/cdnpulse-analytics/SKILL.md`](/.well-known/agent-skills/cdnpulse-analytics/SKILL.md) | Query CDN performance metrics |

The discovery index is at [`/.well-known/agent-skills/index.json`](/.well-known/agent-skills/index.json) (Agent Skills Discovery RFC v0.2.0).

## REST API & OpenAPI spec

The full API is described in an OpenAPI 3.1 spec:

```
https://cdnpulse.io/openapi.yaml
```

You can paste this URL into any AI assistant or API client (Postman, Bruno, Scalar) to get a complete, interactive description of every endpoint.

## OAuth Protected Resource metadata

For agents that support [RFC 9728](https://www.rfc-editor.org/rfc/rfc9728), CDNPulse publishes protected resource metadata at:

```
https://cdnpulse.io/.well-known/oauth-protected-resource
```

This tells agents the authorization server, supported scopes, and where to find the API spec.




