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

# Create Mcp Token

`POST /api/v1/mcp/tokens`

## Request

- Base URL: `https://api.cohearence.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cohearence.app/api/v1/mcp/tokens`
- Auth: HTTP bearer

Mint a new MCP token. The raw secret is returned once — store it securely.

## Request body

- McpTokenCreateRequest: Body for creating a new MCP personal access token.
  - `label` string, nullable
  - `expiry_preset` '30d' | '90d' | '1y' | 'never', required

## Response `200`

Successful Response

- McpTokenCreateResponse: One-time response after token creation — includes the raw secret.
  - `id` integer, required
  - `token` string, required
  - `token_prefix` string, required
  - `label` string, nullable, required
  - `expires_at` string, date-time, nullable, required
  - `mcp_url` string, required
  - `cursor_snippet` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cohearence/apis/health-agent-api.md) · [All operations](https://skmtc.dev/cohearence/apis/health-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cohearence/apis/health-agent-api/revisions/c7aee7d6ecf0?raw)
