mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Alle mcp-eindpunten

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

NaamTypeVerplichtWat dit is
namestringJa
clientMcpClientNeeThe AI client a connection is for (informational).
scopesstring[]JaRBAC 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`,…
sandboxbooleanNee
org_idUuid | nullNeeThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullNeeOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeNeeISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerNee

Reactie

NaamTypeVerplichtWat dit is
idUuidJaUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringJa
clientMcpClientJaThe AI client a connection is for (informational).
prefixstringJaThe token's public lookup prefix (not a secret).
scopesstring[]JaThe RBAC permission keys this connection's token may exercise.
sandboxbooleanJa
spend_cap_minorinteger | nullNeeOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeNeeISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerJaThe rolling window the spend cap applies over.
last_used_atstring | nullNee
revoked_atstring | nullNee
created_atstringJa
tokenstringJaThe full `zmcp_…` token, shown exactly once.
endpointstringJaThe MCP protocol endpoint URL to configure in the AI client.
configobjectJaA paste-ready MCP client config snippet embedding the endpoint + token.

Fouten die dit eindpunt kan retourneren

401 · 403 · 422 · 429