AgileMonitor runs an [MCP](https://modelcontextprotocol.io) server, so an AI assistant such as Claude Code, Codex or Cursor can set up and manage a team's monitoring for you: check the plan, create monitors and alert contacts, and read checks and incidents.

| | |
|---|---|
| URL | `https://monitor.agilepixel.io/mcp` |
| Transport | Streamable HTTP |
| Authentication | `Authorization: Bearer <token>`, the same team API token as the REST API. See [Authentication](https://monitor.agilepixel.io/docs/api/authentication) |
| Rate limit | 120 requests per minute per user |

The assistant acts with the token creator's role: a Viewer's token can read but not change anything.

## Connect a client
### Claude Code

```bash
claude mcp add --transport http agilemonitor https://monitor.agilepixel.io/mcp \
  --header "Authorization: Bearer $AGILEMONITOR_TOKEN"
```

### Codex

In `~/.codex/config.toml`, with the token in the `AGILEMONITOR_TOKEN` environment variable:

```toml
[mcp_servers.agilemonitor]
url = "https://monitor.agilepixel.io/mcp"
bearer_token_env_var = "AGILEMONITOR_TOKEN"
```

### Cursor and other clients

Most clients take an `mcpServers` entry like this:

```json
{
  "mcpServers": {
    "agilemonitor": {
      "url": "https://monitor.agilepixel.io/mcp",
      "headers": {"Authorization": "Bearer 3|example-sanctum-token"}
    }
  }
}
```

Keep the token out of files you commit. Where the client can read environment variables, use one.

## Tools
| Tool | Does |
|---|---|
| `get-plan-usage` | The plan, its monitor limit, how many are used and the shortest check interval. Call it before `create-monitor` |
| `list-monitors` | The team's monitors and their status |
| `get-monitor` | One monitor, with SSL details, 30-day uptime and its `heartbeat_url` |
| `create-monitor` | Creates a monitor. Takes the same fields as [Create a monitor](https://monitor.agilepixel.io/docs/api/monitors#create-monitor) |
| `update-monitor` | Changes only the fields sent; `notification_contact_ids` replaces the set |
| `toggle-monitor` | Pauses or resumes a monitor |
| `delete-monitor` | Deletes a monitor |
| `list-notification-contacts` | The team's alert contacts and their IDs |
| `create-notification-contact` | Creates a contact. `config` holds the [keys its type needs](https://monitor.agilepixel.io/docs/api/notification-contacts#contact-config) |
| `list-recent-checks` | A monitor's latest checks, up to 100 |
| `list-incidents` | The team's newest 50 incidents |

The server also offers a guidelines resource that explains the monitor types, intervals, heartbeats and alert contacts to the assistant.

## A first prompt
> Monitor https://shop.example.com every 5 minutes, check its certificate, and email ops@example.com when either fails.

The assistant should call `get-plan-usage`, create an email contact, then create an `http` and an `ssl` monitor with that contact's ID in `notification_contact_ids`.

## Errors
A tool that fails, for example because of invalid input or the plan's monitor limit, returns a tool error with a message the assistant can act on. A missing or revoked token is an HTTP `401`, and a token that isn't pinned to a team is a `403`.
