mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Tous les points de terminaison mcp

Authentification

Envoyez une clé API en tant que jeton du porteur. La clé doit posséder l'autorisation mcp.manage ; une clé qui ne l'a pas est refusée avec le code 403, et non 404.

Où insérer l'ID de votre organisation

Cet endpoint prend org_id comme champ dans le corps JSON.

L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.

Essayer

Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.

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

Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API

Détails

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`.

Corps de la requête

NomTypeObligatoireQu'est-ce que c'est
namestringOui
clientMcpClientNonThe AI client a connection is for (informational).
scopesstring[]OuiRBAC 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`,…
sandboxbooleanNon
org_idUuid | nullNonThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullNonOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeNonISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerNon

Réponse

NomTypeObligatoireQu'est-ce que c'est
idUuidOuiUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringOui
clientMcpClientOuiThe AI client a connection is for (informational).
prefixstringOuiThe token's public lookup prefix (not a secret).
scopesstring[]OuiThe RBAC permission keys this connection's token may exercise.
sandboxbooleanOui
spend_cap_minorinteger | nullNonOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeNonISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerOuiThe rolling window the spend cap applies over.
last_used_atstring | nullNon
revoked_atstring | nullNon
created_atstringOui
tokenstringOuiThe full `zmcp_…` token, shown exactly once.
endpointstringOuiThe MCP protocol endpoint URL to configure in the AI client.
configobjectOuiA paste-ready MCP client config snippet embedding the endpoint + token.

Erreurs que cet point de terminaison peut renvoyer

401 · 403 · 422 · 429