> ## Documentation Index
> Fetch the complete documentation index at: https://zepeed.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect AI tools like Claude, Cursor, and GitHub Copilot to your Zepeed instance.

Zepeed exposes an **MCP (Model Context Protocol)** server that allows AI agents to query *and manage* your monitoring data programmatically. This enables scenarios like asking your AI assistant to "check the latest speedtest results," "create a maintenance window," or "trigger a speedtest now."

### Server URL

The MCP server is available at:

```bash theme={null}
https://your-zepeed-instance.com/mcp/zepeed
```

### Authentication

The MCP server requires authentication using a **Sanctum API Token**. It enforces the same token abilities as the REST API — read tools accept the module's `:view` ability, while write tools require their specific ability (e.g. `speedtest:run`, `webhooks:create`).

1. Log in to the Zepeed web UI.
2. Navigate to **Settings > API Tokens**.
3. Create a new token (e.g., named "AI-Assistant") and grant the abilities the assistant should have.
4. Copy the generated token — you will need it for your AI client configuration.

### Client Configuration

#### Claude Desktop

Add the following to your `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "zepeed": {
      "type": "url",
      "url": "https://your-zepeed-instance.com/mcp/zepeed",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE"
      }
    }
  }
}
```

#### Cursor

Create or edit `.cursor/mcp.json` in your project root:

```json theme={null}
{
  "mcpServers": {
    "zepeed": {
      "type": "url",
      "url": "https://your-zepeed-instance.com/mcp/zepeed",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE"
      }
    }
  }
}
```

#### VS Code / GitHub Copilot

Create `.vscode/mcp.json` in your workspace:

```json theme={null}
{
  "mcpServers": {
    "zepeed": {
      "type": "url",
      "url": "https://your-zepeed-instance.com/mcp/zepeed",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN_HERE"
      }
    }
  }
}
```

### Available Tools

Once connected, your AI assistant will have access to the following tools (tool names use kebab-case):

#### Speedtest

* `list-speedtest-results`: Query speedtest results with pagination, filtering, sorting, and search.
* `run-speedtest`: Trigger an immediate manual speedtest run for a provider. Skipped automatically if the provider is under a maintenance window.
* `list-providers`: List configured speedtest providers.
* `update-provider`: Update a provider's configuration. Disabling an enabled provider also disables all of its active schedules.
* `list-provider-schedules`: List provider schedules.

#### Ping

* `list-ping-results`: Query recent ping latency data with pagination, filtering, and sorting.

#### Maintenance

* `list-maintenance-windows`: List maintenance windows with pagination, filtering, and sorting.
* `create-maintenance-window`: Create a one-time or recurring maintenance window.
* `update-maintenance-window`: Update a maintenance window by id.
* `delete-maintenance-window`: Delete a maintenance window by id.
* `toggle-global-pause`: Toggle the global indefinite pause on/off. When active, all providers are suppressed from running scheduled tests.

#### Webhooks

* `list-webhooks`: List webhook configurations with pagination.
* `create-webhook`: Create a new webhook configuration (secret is stored encrypted and never returned).
* `update-webhook`: Update an existing webhook configuration by id.
* `delete-webhook`: Delete a webhook configuration by id.
* `test-webhook`: Send a synchronous test delivery to a webhook endpoint.

#### Workflow Rules

Workflow rule tools manage both speedtest and ping rules. Ping rules are created with `event: "ping"` plus a `ping_target_id`, and their conditions use ping metrics (`latency_avg`, `latency_max`, `packet_loss`, `consecutive_failures`) with a `lookback_minutes` window.

* `list-workflow-rules`: List workflow rules with pagination and optional `is_active` / `event` filters.
* `create-workflow-rule`: Create a speedtest or ping workflow rule with its conditions and actions.
* `update-workflow-rule`: Update a speedtest or ping workflow rule by id.
* `delete-workflow-rule`: Delete a workflow rule by id.
* `toggle-workflow-rule`: Toggle the active state of a workflow rule.

#### Exports

* `list-exports`: List the authenticated user's export requests, newest first.
* `create-export`: Queue an asynchronous export of speedtest or ping results (csv, xlsx, or json).
* `get-export`: Show a single export request; optionally include the completed file content.

#### App

* `get-app-version`: Get application version and environment information.
