Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл mcp.manage; ключ без нього відхиляється з кодом 403, а не 404.
Де вказується ідентифікатор вашої організації
Цей ендпоінт приймає org_id як поле в тілі JSON.
Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X POST https://api.zinndigital.com/v1/mcp/connections \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string>, "scopes": <string[]> }'Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API
Деталі
Mints a per-tool MCP connection and returns the full `zmcp_…` token **once** (only its hash is stored) plus a paste-ready client config snippet. The requested `scopes` must be permissions the caller already holds in the target org — an unheld scope is a `403` (a connection can never out-scope its creator), an unknown one a `422`. An optional spend cap bounds AI-triggered paid actions. Requires `mcp.manage`.
Тіло запиту
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
name | string | Так | — |
client | McpClient | Ні | The AI client a connection is for (informational). |
scopes | string[] | Так | RBAC permission keys to grant the token. Each must be a permission the caller holds in the target org (a connection can never out-scope its creator); an unheld scope is a `403`,… |
sandbox | boolean | Ні | — |
org_id | Uuid | null | Ні | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Ні | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Ні | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Ні | — |
Відповідь
| Назва | Тип | Обов'язкове | Що це таке |
|---|---|---|---|
id | Uuid | Так | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Так | — |
client | McpClient | Так | The AI client a connection is for (informational). |
prefix | string | Так | The token's public lookup prefix (not a secret). |
scopes | string[] | Так | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Так | — |
spend_cap_minor | integer | null | Ні | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Ні | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Так | The rolling window the spend cap applies over. |
last_used_at | string | null | Ні | — |
revoked_at | string | null | Ні | — |
created_at | string | Так | — |
token | string | Так | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Так | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Так | A paste-ready MCP client config snippet embedding the endpoint + token. |
Помилки, які може повертати ця кінцева точка
401 · 403 · 422 · 429