mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Tutti gli endpoint mcp

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione mcp.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come campo nel corpo JSON.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

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[]> }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

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 della richiesta

NomeTipoObbligatorioChe cos'è
namestring
clientMcpClientNoThe 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`,…
sandboxbooleanNo
org_idUuid | nullNoThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullNoOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeNoISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerNo

Risposta

NomeTipoObbligatorioChe cos'è
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestring
clientMcpClientThe AI client a connection is for (informational).
prefixstringThe token's public lookup prefix (not a secret).
scopesstring[]The RBAC permission keys this connection's token may exercise.
sandboxboolean
spend_cap_minorinteger | nullNoOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeNoISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerThe rolling window the spend cap applies over.
last_used_atstring | nullNo
revoked_atstring | nullNo
created_atstring
tokenstringThe full `zmcp_…` token, shown exactly once.
endpointstringThe MCP protocol endpoint URL to configure in the AI client.
configobjectA paste-ready MCP client config snippet embedding the endpoint + token.

Errori che questo endpoint può restituire

401 · 403 · 422 · 429