Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão mcp.manage; uma chave sem ela é recusada com 403, e não 404.
Onde vai o ID da sua organização
Este endpoint aceita org_id como um campo no corpo JSON.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
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[]> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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`.
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
name | string | Sim | — |
client | McpClient | Não | The AI client a connection is for (informational). |
scopes | string[] | Sim | 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 | Não | — |
org_id | Uuid | null | Não | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Não | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Não | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Não | — |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Sim | — |
client | McpClient | Sim | The AI client a connection is for (informational). |
prefix | string | Sim | The token's public lookup prefix (not a secret). |
scopes | string[] | Sim | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Sim | — |
spend_cap_minor | integer | null | Não | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Não | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Sim | The rolling window the spend cap applies over. |
last_used_at | string | null | Não | — |
revoked_at | string | null | Não | — |
created_at | string | Sim | — |
token | string | Sim | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Sim | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Sim | A paste-ready MCP client config snippet embedding the endpoint + token. |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429