Authenticatie
Stuur een API-sleutel mee als bearer token. De sleutel moet over de permissie mcp.manage beschikken; een sleutel zonder deze permissie wordt geweigerd met een 403 in plaats van een 404.
Waar je organisatie-id komt te staan
Dit eindpunt verwacht org_id als een veld in de JSON-body.
Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.
Probeer het
Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw 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[]> }'Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console
Details
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`.
Aanvraaglichaam
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
name | string | Ja | — |
client | McpClient | Nee | The AI client a connection is for (informational). |
scopes | string[] | Ja | 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 | Nee | — |
org_id | Uuid | null | Nee | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Nee | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Nee | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Nee | — |
Reactie
| Naam | Type | Verplicht | Wat dit is |
|---|---|---|---|
id | Uuid | Ja | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Ja | — |
client | McpClient | Ja | The AI client a connection is for (informational). |
prefix | string | Ja | The token's public lookup prefix (not a secret). |
scopes | string[] | Ja | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Ja | — |
spend_cap_minor | integer | null | Nee | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Nee | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Ja | The rolling window the spend cap applies over. |
last_used_at | string | null | Nee | — |
revoked_at | string | null | Nee | — |
created_at | string | Ja | — |
token | string | Ja | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Ja | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Ja | A paste-ready MCP client config snippet embedding the endpoint + token. |
Fouten die dit eindpunt kan retourneren
401 · 403 · 422 · 429