mcp

POST /v1/mcp/connections

Create an MCP connection (Connect AI tool).

Wszystkie punkty końcowe mcp

Uwierzytelnianie

Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie mcp.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.

Miejsce na identyfikator organizacji

Ten punkt końcowy przyjmuje org_id jako pole w treści JSON.

Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.

Wypróbuj

Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.

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

Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API

Szczegóły

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

Treść żądania

NazwaTypWymaganeCo to jest
namestringTak
clientMcpClientNieThe AI client a connection is for (informational).
scopesstring[]TakRBAC 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`,…
sandboxbooleanNie
org_idUuid | nullNieThe org the connection belongs to. Defaults to the caller's sole managed org.
spend_cap_minorinteger | nullNieOptional per-window paid-action budget (integer minor units). Null = no cap.
spend_currencyCurrencyCodeNieISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerNie

Odpowiedź

NazwaTypWymaganeCo to jest
idUuidTakUUIDv7 identifier — sortable by creation time (docs/02 §8).
namestringTak
clientMcpClientTakThe AI client a connection is for (informational).
prefixstringTakThe token's public lookup prefix (not a secret).
scopesstring[]TakThe RBAC permission keys this connection's token may exercise.
sandboxbooleanTak
spend_cap_minorinteger | nullNieOptional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap.
spend_currencyCurrencyCodeNieISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8).
spend_window_secondsintegerTakThe rolling window the spend cap applies over.
last_used_atstring | nullNie
revoked_atstring | nullNie
created_atstringTak
tokenstringTakThe full `zmcp_…` token, shown exactly once.
endpointstringTakThe MCP protocol endpoint URL to configure in the AI client.
configobjectTakA paste-ready MCP client config snippet embedding the endpoint + token.

Błędy, które ten punkt końcowy może zwrócić

401 · 403 · 422 · 429