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