mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Усі кінцеві точки mcp

Автентифікація

Надішліть ключ 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`.

Тіло запиту

НазваТипОбов'язковеЩо це таке
namestringТак
clientMcpClientНіThe AI client a connection is for (informational).
scopesstring[]Так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`,…
sandboxbooleanНі
org_idUuid | nullНіThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullНіOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeНіISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerНі

Відповідь

НазваТипОбов'язковеЩо це таке
idUuidТакUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringТак
clientMcpClientТакThe AI client a connection is for (informational).
prefixstringТакThe token's public lookup prefix (not a secret).
scopesstring[]ТакThe RBAC permission keys this connection's token may exercise.
sandboxbooleanТак
spend_cap_minorinteger | nullНіOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeНіISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerТакThe rolling window the spend cap applies over.
last_used_atstring | nullНі
revoked_atstring | nullНі
created_atstringТак
tokenstringТакThe full `zmcp_…` token, shown exactly once.
endpointstringТакThe MCP protocol endpoint URL to configure in the AI client.
configobjectТакA paste-ready MCP client config snippet embedding the endpoint + token.

Помилки, які може повертати ця кінцева точка

401 · 403 · 422 · 429