Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran mcp.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Tempat ID organisasi anda diletakkan
Titik akhir ini mengambil org_id sebagai medan dalam kandungan JSON.
ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka 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 log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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`.
Badan permintaan
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
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 | — |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
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. |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 422 · 429