Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin mcp.manage; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Tempat ID organisasi Anda dimasukkan
Titik akhir ini memerlukan org_id sebagai field dalam bodi JSON.
ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
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[]> }'Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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`.
Isi permintaan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
name | string | Ya | — |
client | McpClient | Tidak | The AI client a connection is for (informational). |
scopes | string[] | Ya | 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 | Tidak | — |
org_id | Uuid | null | Tidak | The org the connection belongs to. Defaults to the caller's sole managed org. |
spend_cap_minor | integer | null | Tidak | Optional per-window paid-action budget (integer minor units). Null = no cap. |
spend_currency | CurrencyCode | Tidak | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Tidak | — |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
name | string | Ya | — |
client | McpClient | Ya | The AI client a connection is for (informational). |
prefix | string | Ya | The token's public lookup prefix (not a secret). |
scopes | string[] | Ya | The RBAC permission keys this connection's token may exercise. |
sandbox | boolean | Ya | — |
spend_cap_minor | integer | null | Tidak | Optional per-window budget (integer minor units, CLAUDE.md §2.8) for AI-triggered paid actions. Null = no cap. |
spend_currency | CurrencyCode | Tidak | ISO 4217 currency code (money is minor units + this code — CLAUDE.md §2.8). |
spend_window_seconds | integer | Ya | The rolling window the spend cap applies over. |
last_used_at | string | null | Tidak | — |
revoked_at | string | null | Tidak | — |
created_at | string | Ya | — |
token | string | Ya | The full `zmcp_…` token, shown exactly once. |
endpoint | string | Ya | The MCP protocol endpoint URL to configure in the AI client. |
config | object | Ya | A paste-ready MCP client config snippet embedding the endpoint + token. |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 422 · 429