---
title: "Create Mcp Token"
method: POST
path: "/api/v1/auth/mcp-tokens"
tags: ["mcp"]
---

# Create Mcp Token

`POST /api/v1/auth/mcp-tokens`

## Request

- Base URL: `https://api.alert.camp` (the document declares no server; this is the origin it was published from)
- URL: `https://api.alert.camp/api/v1/auth/mcp-tokens`
- Auth: none declared

Mint a credential for one agent.

## Headers

- `authorization` string, nullable
- `x-dev-user-id` string, nullable
- `x-app-version` string, nullable

## Request body

- MCPTokenCreate
  - `name` string
  - `scopes` string[], nullable: Subset of alerts:read / alerts:write. Default: both.

## Response `201`

Successful Response

- MCPTokenCreated
  - `jti` string, required
  - `name` string, required
  - `client_id` string, nullable: The client's CIMD URL, for a token minted through the OAuth flow. `name` is the client's own claim about itself; this is the part that was verified.
  - `scopes` string[], required
  - `created_at` string, date-time, required
  - `expires_at` string, date-time, nullable, required
  - `last_used_at` string, date-time, nullable, required
  - `revoked_at` string, date-time, nullable, required
  - `token` string, required: Shown ONCE. Nothing recoverable is stored, so a lost token is re-minted rather than retrieved.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/alert/apis/alertcamp.md) · [All operations](https://skmtc.dev/alert/apis/alertcamp/llms.txt) · [OpenAPI document](https://skmtc.dev/alert/apis/alertcamp/revisions/864c8c9ef833?raw)
