mcp
POST /v1/mcp/connections
Create an MCP connection (Connect AI tool).
Упълномощаване
Изпратете API ключ като токен за носене. Ключът трябва да притежава разрешението 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, за да можете да видите действителния отговор. Отворете този крайpoint в 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 config for the connection's client, embedding the endpoint and token. The shape differs per client: Claude Code gets an http-typed server, Cursor a url +… |
config_file | object | Да | Where that client reads config — e.g. .mcp.json. null when it has no file. |
command | object | Да | A one-line alternative for a client with a command line (Claude Code), else null. It embeds the token, so treat it like the token. |
note | object | Да | Set when the client cannot use a bearer token at all. chatgpt_needs_oauth: ChatGPT connects by OAuth sign-in only, so this token cannot reach it. |
Грешки, които този крайpoint може да върне
401 · 403 · 422 · 429