mcp
POST /v1/mcp/connections
Create an MCP connection (Connect AI tool).
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
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
name | string | Oui | — |
client | McpClient | Non | The AI client a connection is for (informational). |
scopes | string[] | Oui | 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 | Non | — |
org_id | Uuid | null | Non | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Non | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Non | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Non | — |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
id | Uuid | Oui | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Oui | — |
client | McpClient | Oui | The AI client a connection is for (informational). |
prefix | string | Oui | The token's public lookup prefix (not a secret). |
scopes | string[] | Oui | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Oui | — |
spend_cap_minor | integer | null | Non | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Non | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Oui | The rolling window the spend cap applies over. |
last_used_at | string | null | Non | — |
revoked_at | string | null | Non | — |
created_at | string | Oui | — |
token | string | Oui | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Oui | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Oui | A paste-ready MCP client config snippet embedding the endpoint + token. |
Erreurs que cet point de terminaison peut renvoyer
401 · 403 · 422 · 429